You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
dlpack interface with pytorch has unexpected behavior with F-aligned arrays ? #1241
changed the title [-]`dlpack` interface with pytorch has unexpected behavior with F-aligned arrays ?[/-][+]`dlpack` interface with `pytorch` has unexpected behavior with F-aligned arrays ?[/+]on Jun 13, 2023
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.
Activity
[-]`dlpack` interface with pytorch has unexpected behavior with F-aligned arrays ?[/-][+]`dlpack` interface with `pytorch` has unexpected behavior with F-aligned arrays ?[/+]fcharras commentedon Jun 13, 2023
Cross posted with intel extension for pytorch repo at intel/intel-extension-for-pytorch#369
Environment informations:
fcharras commentedon Jun 13, 2023
It's probably an issue on
dpctlside, I've noticed thatdpt.from_dlpack(array_dpt_gpu_F_aligned)has the same issues.oleksandr-pavlyk commentedon Aug 1, 2023
Smaller reproducer:
oleksandr-pavlyk commentedon Aug 1, 2023
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.
Closes gh-1241
Add tests based on gh-1241 example