-
-
Notifications
You must be signed in to change notification settings - Fork 12.1k
Open
Labels
00 - BugsprintableIssue fits the time-frame and setting of a sprintIssue fits the time-frame and setting of a sprint
Description
Describe the issue:
In the from_dlpack docs it says:
BufferError – The dlpack and dlpack_device methods on the input array may raise BufferError when the data cannot be exported as DLPack (e.g., incompatible dtype, strides, or device).
I read the meaning as: incompatible dtype, incompatible strides, or incompatible device - which would suggest a BufferError should be raised when device is incompatible?
I understand BufferError may seem like an odd choice (#30341 (comment)) but just raising the question from my interpretation of the docs.
Reproduce the code example:
x_torch = torch.arange(5, device='cuda')
np.from_dlpack(x_torch)Error message:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
RuntimeError: Unsupported device in DLTensor.Python and NumPy Versions:
2.4.2
3.14.2 | packaged by conda-forge | (main, Feb 4 2026, 15:49:49) [GCC 14.3.0]
Runtime Environment:
No response
How does this issue affect you or how did you find it:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
00 - BugsprintableIssue fits the time-frame and setting of a sprintIssue fits the time-frame and setting of a sprint