Skip to content
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

Update dlpack to v1.0rc #1667

Merged
merged 18 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
83241ee
Implements DLPack changes necessitated by memory object work
ndgrigorian May 7, 2024
da0f04f
`usm_ndarray` constructor now honors the writable flag when passed a …
ndgrigorian May 9, 2024
fac5b84
Adds support for DLPack v1.0
ndgrigorian May 9, 2024
8697c83
Adds check for major version of versioned dlpack tensor to `from_dlpa…
ndgrigorian May 9, 2024
e9a3396
Add missing device_type enumerators from `dlpack.h`
ndgrigorian May 9, 2024
a113eaa
usm_ary -> ary_base in `to_dlpack_versioned_capsule`
ndgrigorian May 9, 2024
a7d255a
Changes to exception messages throughout _dlpack.pyx
ndgrigorian May 9, 2024
c4b34e5
Versioned DLpack tensor deleter and owner tweaked
ndgrigorian May 9, 2024
c54a90a
Updates `dpctl/tensor/include/dlpack/README.md`
ndgrigorian May 10, 2024
9afae01
Adds check that `max_version` is a 2-tuple to `__dlpack__`
ndgrigorian May 10, 2024
aba58c4
Add more dlpack tests (#1670)
oleksandr-pavlyk May 10, 2024
85f12d0
Test the writable flag of a usm_ndarray from read-only DLPack capsule
ndgrigorian May 10, 2024
470bb7c
Factor out device-id computation
oleksandr-pavlyk May 11, 2024
1205b0b
Merge pull request #1671 from IntelPython/factor-out-device-id-comput…
oleksandr-pavlyk May 11, 2024
3e3ab03
Reuse get parent device ordinal id routine (#1672)
oleksandr-pavlyk May 12, 2024
7a0e4d1
Adds more DLPack tests to improve coverage
ndgrigorian May 12, 2024
bff131a
Adds a test for boolean arrays in test_legacy_dlpack_capsule
ndgrigorian May 12, 2024
f0ced4e
DLPack tests for `copy` and `stream` kwargs in `__dlpack__`
ndgrigorian May 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions dpctl/tensor/_dlpack.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,24 @@ from ._usmarray cimport usm_ndarray

cdef extern from 'dlpack/dlpack.h' nogil:
int device_CPU 'kDLCPU'
int device_oneAPI 'kDLOneAPI'
int device_CUDA 'kDLCUDA'
int device_CUDAHost 'kDLCUDAHost'
int device_CUDAManaged 'kDLCUDAManaged'
int device_DLROCM 'kDLROCM'
int device_ROCMHost 'kDLROCMHost'
int device_OpenCL 'kDLOpenCL'

int device_Vulkan 'kDLVulkan'
int device_Metal 'kDLMetal'
int device_VPI 'kDLVPI'
int device_OneAPI 'kDLOneAPI'
int device_WebGPU 'kDLWebGPU'
int device_Hexagon 'kDLHexagon'
int device_MAIA 'kDLMAIA'

cpdef object to_dlpack_capsule(usm_ndarray array) except +
cpdef object to_dlpack_versioned_capsule(usm_ndarray array, bint copied) except +
cpdef usm_ndarray from_dlpack_capsule(object dltensor) except +

cpdef from_dlpack(array)

cdef int get_parent_device_ordinal_id(SyclDevice dev) except *

cdef class DLPackCreationError(Exception):
Expand Down
Loading