-
Notifications
You must be signed in to change notification settings - Fork 493
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
[PJRT] Expose ExecutionContext
when executing a LoadedExecutable
#20429
Conversation
Co-authored-by: Steeve Morin <[email protected]>
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.
Could you please help add a unit test for this as well?
I'm not sure anything useful can be added as a test, but PR needs a rebase because I bumped pjrt version yesteday |
Addressed in 5b97f17 |
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.
Thank you!
…xecutable` Imported from GitHub PR #20429 Currently, there is no way to provide an `ExecutionContext` when launching an executable. This prevents using it in custom calls through FFI. I exposed the field in the `PJRT_ExecuteOptions` struct and wired it in `xla::ExecuteOptions` Copybara import of the project: -- d22969c by Corentin Godeau <[email protected]>: [PJRT] Expose ExecutionContext when executing a LoadedExecutable -- 67d8c21 by Corentin Godeau <[email protected]>: Update xla/pjrt/c/pjrt_c_api.h Co-authored-by: Steeve Morin <[email protected]> -- 5017a0e by Corentin Godeau <[email protected]>: Added changes to the changelog Merging this change closes #20429 FUTURE_COPYBARA_INTEGRATE_REVIEW=#20429 from Corendos:corendos/pjrt-execution-context 5b97f17 PiperOrigin-RevId: 707074459
…xecutable` Imported from GitHub PR openxla/xla#20429 Currently, there is no way to provide an `ExecutionContext` when launching an executable. This prevents using it in custom calls through FFI. I exposed the field in the `PJRT_ExecuteOptions` struct and wired it in `xla::ExecuteOptions` Copybara import of the project: -- d22969c1ed76cc52dd2b99882cd6dc8d0acc7dbc by Corentin Godeau <[email protected]>: [PJRT] Expose ExecutionContext when executing a LoadedExecutable -- 67d8c2146239558ecae141d90aaf707823f89a7d by Corentin Godeau <[email protected]>: Update xla/pjrt/c/pjrt_c_api.h Co-authored-by: Steeve Morin <[email protected]> -- 5017a0ed720492ecf8d47cafd8d2b09d7222cbf8 by Corentin Godeau <[email protected]>: Added changes to the changelog Merging this change closes #20429 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#20429 from Corendos:corendos/pjrt-execution-context 5b97f17549fc5ec0671d19f3fe86a598973f5b61 PiperOrigin-RevId: 707074459
…xecutable` Imported from GitHub PR #20429 Currently, there is no way to provide an `ExecutionContext` when launching an executable. This prevents using it in custom calls through FFI. I exposed the field in the `PJRT_ExecuteOptions` struct and wired it in `xla::ExecuteOptions` Copybara import of the project: -- d22969c by Corentin Godeau <[email protected]>: [PJRT] Expose ExecutionContext when executing a LoadedExecutable -- 67d8c21 by Corentin Godeau <[email protected]>: Update xla/pjrt/c/pjrt_c_api.h Co-authored-by: Steeve Morin <[email protected]> -- 5017a0e by Corentin Godeau <[email protected]>: Added changes to the changelog Merging this change closes #20429 FUTURE_COPYBARA_INTEGRATE_REVIEW=#20429 from Corendos:corendos/pjrt-execution-context 5b97f17 PiperOrigin-RevId: 707074459
…xecutable` Imported from GitHub PR openxla/xla#20429 Currently, there is no way to provide an `ExecutionContext` when launching an executable. This prevents using it in custom calls through FFI. I exposed the field in the `PJRT_ExecuteOptions` struct and wired it in `xla::ExecuteOptions` Copybara import of the project: -- d22969c1ed76cc52dd2b99882cd6dc8d0acc7dbc by Corentin Godeau <[email protected]>: [PJRT] Expose ExecutionContext when executing a LoadedExecutable -- 67d8c2146239558ecae141d90aaf707823f89a7d by Corentin Godeau <[email protected]>: Update xla/pjrt/c/pjrt_c_api.h Co-authored-by: Steeve Morin <[email protected]> -- 5017a0ed720492ecf8d47cafd8d2b09d7222cbf8 by Corentin Godeau <[email protected]>: Added changes to the changelog Merging this change closes #20429 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#20429 from Corendos:corendos/pjrt-execution-context 5b97f17549fc5ec0671d19f3fe86a598973f5b61 PiperOrigin-RevId: 707074459
…xecutable` Imported from GitHub PR #20429 Currently, there is no way to provide an `ExecutionContext` when launching an executable. This prevents using it in custom calls through FFI. I exposed the field in the `PJRT_ExecuteOptions` struct and wired it in `xla::ExecuteOptions` Copybara import of the project: -- d22969c by Corentin Godeau <[email protected]>: [PJRT] Expose ExecutionContext when executing a LoadedExecutable -- 67d8c21 by Corentin Godeau <[email protected]>: Update xla/pjrt/c/pjrt_c_api.h Co-authored-by: Steeve Morin <[email protected]> -- 5017a0e by Corentin Godeau <[email protected]>: Added changes to the changelog Merging this change closes #20429 FUTURE_COPYBARA_INTEGRATE_REVIEW=#20429 from Corendos:corendos/pjrt-execution-context 5b97f17 PiperOrigin-RevId: 707074459
…xecutable` Imported from GitHub PR openxla/xla#20429 Currently, there is no way to provide an `ExecutionContext` when launching an executable. This prevents using it in custom calls through FFI. I exposed the field in the `PJRT_ExecuteOptions` struct and wired it in `xla::ExecuteOptions` Copybara import of the project: -- d22969c1ed76cc52dd2b99882cd6dc8d0acc7dbc by Corentin Godeau <[email protected]>: [PJRT] Expose ExecutionContext when executing a LoadedExecutable -- 67d8c2146239558ecae141d90aaf707823f89a7d by Corentin Godeau <[email protected]>: Update xla/pjrt/c/pjrt_c_api.h Co-authored-by: Steeve Morin <[email protected]> -- 5017a0ed720492ecf8d47cafd8d2b09d7222cbf8 by Corentin Godeau <[email protected]>: Added changes to the changelog Merging this change closes #20429 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#20429 from Corendos:corendos/pjrt-execution-context 5b97f17549fc5ec0671d19f3fe86a598973f5b61 PiperOrigin-RevId: 707074459
|
Indeed, thanks ! Addressed in 7128d16 |
I think it's bazel test //folder/..., just run all tests under pjrt, it should be enough |
034e6cc
to
4001094
Compare
4001094
to
4e19b2a
Compare
Ok, so it was a bit harder than I thought due to struct visibility. I had to make Maybe we should do like the other structures and have a |
Ok, I've been thinking about this and I think it all boils down to the fact that, contrary to the other One improvement that could be done to avoid being dependent on the |
We certainly can't include impl.h headers anywhere :( I started looking at it, and got a bit lost in all our C APIs and structs, will try to come up with something today |
I think I have a plan, will send PR later today |
Context: #20429 PiperOrigin-RevId: 714327866
After a few attempts I think this is the one that will work: #21317 |
Context: openxla/xla#20429 PiperOrigin-RevId: 714327866
Context: #20429 PiperOrigin-RevId: 714327866
Context: openxla/xla#20429 PiperOrigin-RevId: 714327866
Awesome, I'm looking forward to it being merged ! I guess I'll close this PR then |
Context: #20429 PiperOrigin-RevId: 714327866
Context: openxla/xla#20429 PiperOrigin-RevId: 714327866
+ Correctly (zero/value-)initialize PJRT_ExecuteOptions in tests and pjrt_c_api_client ``` If the number of initializer clauses is less than the number of members or initializer list is completely empty, the remaining members are value-initialized ``` Context: #20429 PiperOrigin-RevId: 714327866
+ Correctly (zero/value-)initialize PJRT_ExecuteOptions in tests and pjrt_c_api_client ``` If the number of initializer clauses is less than the number of members or initializer list is completely empty, the remaining members are value-initialized ``` Context: openxla/xla#20429 PiperOrigin-RevId: 714327866
+ Correctly (zero/value-)initialize PJRT_ExecuteOptions in tests and pjrt_c_api_client ``` If the number of initializer clauses is less than the number of members or initializer list is completely empty, the remaining members are value-initialized ``` Context: #20429 PiperOrigin-RevId: 714327866
+ Correctly (zero/value-)initialize PJRT_ExecuteOptions in tests and pjrt_c_api_client ``` If the number of initializer clauses is less than the number of members or initializer list is completely empty, the remaining members are value-initialized ``` Context: openxla/xla#20429 PiperOrigin-RevId: 714327866
+ Correctly (zero/value-)initialize PJRT_ExecuteOptions in tests and pjrt_c_api_client ``` If the number of initializer clauses is less than the number of members or initializer list is completely empty, the remaining members are value-initialized ``` Context: #20429 PiperOrigin-RevId: 714327866
+ Correctly (zero/value-)initialize PJRT_ExecuteOptions in tests and pjrt_c_api_client ``` If the number of initializer clauses is less than the number of members or initializer list is completely empty, the remaining members are value-initialized ``` Context: #20429 PiperOrigin-RevId: 714327866
+ Correctly (zero/value-)initialize PJRT_ExecuteOptions in tests and pjrt_c_api_client ``` If the number of initializer clauses is less than the number of members or initializer list is completely empty, the remaining members are value-initialized ``` Context: openxla/xla#20429 PiperOrigin-RevId: 714327866
+ Correctly (zero/value-)initialize PJRT_ExecuteOptions in tests and pjrt_c_api_client ``` If the number of initializer clauses is less than the number of members or initializer list is completely empty, the remaining members are value-initialized ``` Context: #20429 PiperOrigin-RevId: 715906024
Submitted in 7ce927a |
+ Correctly (zero/value-)initialize PJRT_ExecuteOptions in tests and pjrt_c_api_client ``` If the number of initializer clauses is less than the number of members or initializer list is completely empty, the remaining members are value-initialized ``` Context: openxla/xla#20429 PiperOrigin-RevId: 715906024
Thanks a lot @ezhulenev ! |
Currently, there is no way to provide an
ExecutionContext
when launching an executable. This prevents using it in custom calls through FFI.I exposed the field in the
PJRT_ExecuteOptions
struct and wired it inxla::ExecuteOptions