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
/*
* Note: the `dlpack.h` header suggests/standardizes that `data` must be
* 256-byte aligned. We ignore this intentionally, because `__dlpack__`
* standardizes that `byte_offset` must be 0 (for now) to not break pytorch:
* https://github.com/data-apis/array-api/issues/293#issuecomment-964111413
*
* We further assume that exporting fully unaligned data is OK even without
* `byte_offset` since the standard does not reject it.
* Presumably, pytorch will support importing `byte_offset != 0` and NumPy
* can choose to use it starting about 2023. At that point, it may be
* that NumPy MUST use `byte_offset` to adhere to the standard (as
* specified in the header)!
*/
It seems entirely possible that what NumPy should do changes sooner or later. This should either be reviewed or updated according to whatever is decided for dlpack.h and/or __dlpack__.
Marked as milestone, since this should – by my current understanding – be reviewed around 2023.
Activity
rgommers commentedon Nov 12, 2021
Bumping this to the next release; good to revisit before then, but for
1.22.0we're good.seberg commentedon Jul 24, 2024
I am going to close this. It's still broken, but I don't feel like keeping a NumPy issue about it.