-
Notifications
You must be signed in to change notification settings - Fork 259
Closed
Description
Problem description
nanobind uses an "unversioned" managed_dltensor struct which corresponds to the legacy DLManagedTensor:
Lines 10 to 14 in 879bca4
| struct managed_dltensor { | |
| dlpack::dltensor dltensor; | |
| void *manager_ctx; | |
| void (*deleter)(managed_dltensor *); | |
| }; |
This lacks the flags attribute that is present in the DLManagedTensorVersioned struct:
An important flag is DLPACK_FLAG_BITMASK_READ_ONLY which indicates if the array is read-only or writable.
Since numpy/numpy#28600 NumPy's from_dlpack function sets readonly = 1 for unversioned DLPacks.
Metadata
Metadata
Assignees
Labels
No labels