-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question about expectation on cross-hardware #132
Comments
That snippet is not expected to work. DLPack is a zero-copy interop protocol describing a memory layout, so CUDA -> CPU won't work. The "cross hardware" description means that it supports a wide range of hardware, however the producer and consumer must be able to share memory. |
Thanks for the clarification. There is some discussion about that ongoing at data-apis/array-api#626 . There is some confusion coming from the Array API spec for
which then is misleading at the moment, if the returned array cannot be a copy. |
Ah okay, I see the confusion. The rationale for that is given as "Zero-copy semantics where possible, making a copy only if needed (e.g. when data is not contiguous in memory).". So you are right, it's not always zero-copy. We need to distinguish a couple of things here:
|
Many thanks ! |
From the dlpack standard reference, should this snippet work ?
it currently fails with:
RuntimeError: Unsupported device in DLTensor.
the purpose excerpt says:
but also
So I'd like to clarify if the error in this snippet should be reported as a bug to the maintainers, or if it is expected that the dlpack data exchange can only work on a same device.
The text was updated successfully, but these errors were encountered: