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.
At first, I won't add the .torch_pin file, so as to make sure the test is failing without https://github.com/pytorch/pytorch/pull/138470. Then, I will add it, so as to make sure it is the reason the test passes.
This PR fixes the test introduced in #7213, where it called PyTorch's
to_dlpack()
function before actually callingfrom_dlpack()
. Meaning that bothTensor.__dlpack__
andTensor.__dlpack_device__
functions weren't getting called, which were the functions that that test was supposed to be testing.This should be merged after https://github.com/pytorch/pytorch/pull/138470.
cc @JackCaoG @vanbasten23 @qihqi