Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JAX] Implement the
stream
argument to jax.Array.__dlpack__ for CUD…
…A GPU Also implements jax.Array.__dlpack_device__. See https://dmlc.github.io/dlpack/latest/python_spec.html This requires plumbing the raw CUDA stream pointer through PJRT and StreamExecutor (since the GPU PJRT implementation is still based on SE). This is done via the new PJRT method ExternalReference::WaitUntilBufferReadyOnStream. I haven't plumbed this through the PJRT C API yet, because I'm still debating whether this should be part of the main API or a GPU-specific extension (plus either way it should probably be its own change). PiperOrigin-RevId: 558245360
- Loading branch information
Showing
3 changed files
with
87 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters