Fix JAX DLPack export to use __dlpack__ protocol directly#6247
Open
JanuszL wants to merge 1 commit intoNVIDIA:mainfrom
Open
Fix JAX DLPack export to use __dlpack__ protocol directly#6247JanuszL wants to merge 1 commit intoNVIDIA:mainfrom
JanuszL wants to merge 1 commit intoNVIDIA:mainfrom
Conversation
- Replaces deprecated jax.dlpack.to_dlpack() calls with the standard tensor.__dlpack__() method, which is the correct DLPack protocol interface for JAX 0.6+. Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
Collaborator
|
CI MESSAGE: [45688155]: BUILD STARTED |
Contributor
Greptile SummaryThis PR fixes a deprecation issue in the JAX DLPack integration by replacing
Confidence Score: 5/5
Sequence DiagramsequenceDiagram
participant DALI
participant JAX
Note over DALI,JAX: Import direction (unchanged)
DALI->>JAX: jax.dlpack.from_dlpack(dl_capsule)
JAX-->>DALI: jax.Array
Note over DALI,JAX: Export direction (this PR)
DALI->>JAX: tensor.__dlpack__(stream=stream)
JAX-->>DALI: DLPack PyCapsule (GPU, with stream sync)
DALI->>JAX: tensor.__dlpack__()
JAX-->>DALI: DLPack PyCapsule (CPU, no stream)
Last reviewed commit: bb3fb17 |
mzient
approved these changes
Mar 9, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tensor.dlpack() method, which is the correct DLPack protocol
interface for JAX 0.6+.
Category:
Bug fix (non-breaking change which fixes an issue)
Description:
tensor.dlpack() method, which is the correct DLPack protocol
interface for JAX 0.6+.
Additional information:
Affected modules and functionalities:
Key points relevant for the review:
Tests:
Checklist
Documentation
DALI team only
Requirements
REQ IDs: N/A
JIRA TASK: N/A