Add a test to convert xla gpu tensor to cuda tensor by using the protocol.#7213
Closed
vanbasten23 wants to merge 2 commits intomasterfrom
Closed
Add a test to convert xla gpu tensor to cuda tensor by using the protocol.#7213vanbasten23 wants to merge 2 commits intomasterfrom
vanbasten23 wants to merge 2 commits intomasterfrom
Conversation
3c50178 to
b3e3a1a
Compare
JackCaoG
approved these changes
Jun 7, 2024
This was referenced Oct 21, 2024
Collaborator
|
Closing in favor of: #8294 |
pytorchmergebot
pushed a commit
to pytorch/pytorch
that referenced
this pull request
Dec 5, 2024
Taking over: #128176. In summary, this PR: - `__dlpack__`: Calls PyTorch/XLA `to_dlpack` function, if the tensor lives in an XLA:CUDA device - `__dlpack_device__`: Correctly maps PyTorch/XLA tensors to `kDLGPU`, if XLA:CUDA is being used The tests are introduced in pytorch/xla#7213. Pull Request resolved: #138470 Approved by: https://github.com/albanD Co-authored-by: iefgnoix <isaacwxf23@gmail.com>
AmdSampsa
pushed a commit
to AmdSampsa/pytorch
that referenced
this pull request
Dec 9, 2024
Taking over: pytorch#128176. In summary, this PR: - `__dlpack__`: Calls PyTorch/XLA `to_dlpack` function, if the tensor lives in an XLA:CUDA device - `__dlpack_device__`: Correctly maps PyTorch/XLA tensors to `kDLGPU`, if XLA:CUDA is being used The tests are introduced in pytorch/xla#7213. Pull Request resolved: pytorch#138470 Approved by: https://github.com/albanD Co-authored-by: iefgnoix <isaacwxf23@gmail.com>
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.
Needs pytorch/pytorch#128176
Test plan: PJRT_DEVICE=CUDA python pytorch/xla/test/test_operations.py -k test_dlpack_xla_to_pytorch_cuda_protocol_conversion