-
Notifications
You must be signed in to change notification settings - Fork 30
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
dlpack
interface with pytorch
has unexpected behavior with F-aligned arrays ?
#1241
Comments
dlpack
interface with pytorch has unexpected behavior with F-aligned arrays ?dlpack
interface with pytorch
has unexpected behavior with F-aligned arrays ?
Cross posted with intel extension for pytorch repo at intel/intel-extension-for-pytorch#369 Environment informations:
|
It's probably an issue on |
Smaller reproducer:
|
When encoding the array into DLPack structure, both 'F'-contiguous and 'C'-contiguous arrays have null strides pointer. The exporter must populate the strides vector in DLPack when exporting 'F'-contiguous arrays, since null strides pointer is reserved to signal the C-contiguous allocation. |
Reproducer:
where
array_torch
first (truncated) row outputs:which is different from
array_dpt_gpu
orarray_dpt_gpu_F_aligned
:it seems that
from_dlpack
in pytorch can't see F-alignments and assumes C-contiguous buffer instead.The text was updated successfully, but these errors were encountered: