Update how we input kwargs (#314)
Summary:
Pull Request resolved: https://github.com/pytorch/executorch/pull/314
Previously, the code for passing inputs to exported program was:
```
if kwargs:
return (args, kwargs)
else:
return args
```
However, this causes some inconsistency where if the original input contains args and kwargs, the treespec would be a tuple containing a tuple of arguments, and a dictionary of keyword arguments. But if the original input only contained args, the treespec would just be a tuple of arguments.
So I updated the code to just always keep the kwargs around
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx chenyang78 aakhundov kadeng
X-link: https://github.com/pytorch/pytorch/pull/109160
Reviewed By: zhxchen17
Differential Revision: D49218534
Pulled By: angelayi
fbshipit-source-id: dbc481aaa93df349dc3171a1d66a306ec4dd2370 A
angelayi committed
49d2e683c92290467159f403731ae2ea9ebd9396
Parent: b78576e
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
on 9/18/2023, 11:55:06 PM