-
Notifications
You must be signed in to change notification settings - Fork 26
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
Callbacks with parameters. #596
Conversation
659b5d3
to
8cf8b3a
Compare
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.
It looks good to me! Mostly questions for my understanding.
Do we agree that there is no restriction on the arguments pytree structure? It could be dictionnaries for example?
@rmoyard I don't think build wheels are required here. I am not changing the build system. The wheels were checked in the previous merge. |
As long as they implement the pytree interface, they should work. The tests here include a dictionary. |
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.
great job 🥇
Context: Callbacks with parameters. Second step in implementing callbacks. Next step will be return values.
Description of the Change:
PythonCallOp
.PythonCallOp
to anLLVM::CallOp
where the first parameter is the function pointer, the second parameter is the number of parameters, and the rest of the parameters are pointers to memrefs.va_list
to collect all memrefs.va_list
to pybind moduleva_list
and add these to a python listva_list
pointers to jax arrays.Benefits: Callbacks with parameters.
[sc-58870]