Skip to content

DLPack: fix test using PyTorch API.#8348

Merged
JackCaoG merged 1 commit intomasterfrom
ysiraichi/fix-dlpack-test
Dec 5, 2024
Merged

DLPack: fix test using PyTorch API.#8348
JackCaoG merged 1 commit intomasterfrom
ysiraichi/fix-dlpack-test

Conversation

@ysiraichi
Copy link
Copy Markdown
Collaborator

This PR fixes the test introduced in #7213, where it called PyTorch's to_dlpack() function before actually calling from_dlpack(). Meaning that both Tensor.__dlpack__ and Tensor.__dlpack_device__ functions weren't getting called, which were the functions that that test was supposed to be testing.

This should be merged after pytorch/pytorch#138470.

cc @JackCaoG @vanbasten23 @qihqi

@ysiraichi
Copy link
Copy Markdown
Collaborator Author

At first, I won't add the .torch_pin file, so as to make sure the test is failing without pytorch/pytorch#138470. Then, I will add it, so as to make sure it is the reason the test passes.

@ysiraichi ysiraichi force-pushed the ysiraichi/fix-dlpack-test branch from ca03671 to d567592 Compare December 5, 2024 14:51
@ysiraichi
Copy link
Copy Markdown
Collaborator Author

@JackCaoG @vanbasten23 It looks like CUDA build/tests are not running. Do I need to add a label for it?

@JackCaoG
Copy link
Copy Markdown
Collaborator

JackCaoG commented Dec 5, 2024

cuda test was disabled on head due to some build issue.

@ysiraichi
Copy link
Copy Markdown
Collaborator Author

Oh, I see. Is it ok if we merge this one? pytorch/pytorch#138470 was already merged.

@JackCaoG JackCaoG merged commit 4c99d21 into master Dec 5, 2024
rpsilva-aws pushed a commit to rpsilva-aws/xla that referenced this pull request Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants