xla
xla copied to clipboard
DLPack: add test using PyTorch DLPack functions.
Taking over: #7213
This PR introduces a test using PyTorch's to_dlpack
and from_dlpack
functions. In order to use the former, PyTorch's tensor __dlpack__
and __dlpack_device__
methods had to be modified. The actual changes are in https://github.com/pytorch/pytorch/pull/138470.