-
Notifications
You must be signed in to change notification settings - Fork 26.3k
wrap_pybind_function: support member function pointers #88932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This updates `wrap_pybind_function` to use `invoke` and adds the `invoke_traits` object which is analogous to `function_traits` but for member functions it includes the class as an explicit argument. To test this is working properly, I've also applied it to the `CUDAGraph` binding code. [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/88932
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 9d2b287: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This updates `wrap_pybind_function` to use `invoke` and adds the `invoke_traits` object which is analogous to `function_traits` but for member functions it includes the class as an explicit argument. To test this is working properly, I've also applied it to the `CUDAGraph` binding code. ghstack-source-id: 8a4fce6 Pull Request resolved: #88932
albanD
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
This updates `wrap_pybind_function` to use `invoke` and adds the `invoke_traits` object which is analogous to `function_traits` but for member functions it includes the class as an explicit argument. To test this is working properly, I've also applied it to the `CUDAGraph` binding code. Pull Request resolved: pytorch#88932 Approved by: https://github.com/albanD
Stack from ghstack (oldest at bottom):
This updates
wrap_pybind_functionto useinvokeand adds theinvoke_traitsobject which is analogous tofunction_traitsbutfor member functions it includes the class as an explicit argument.
To test this is working properly, I've also applied it to the
CUDAGraphbinding code.