-
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
Update dlpack to v1.0rc #1667
Update dlpack to v1.0rc #1667
Conversation
Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞 |
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_336 ran successfully. |
@oleksandr-pavlyk |
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_337 ran successfully. |
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_339 ran successfully. |
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_340 ran successfully. |
Use `ary_base` rather than `usm_ary` as manager_ctx in DLManagedTensor struct. Tests for DLPack use fixture to provide all devices to take advantage of caching.
…read-only array as `buffer` argument
* Uses `dlpack.h` as per DLPack v1.0 rc * Implements `device` and `copy` keywords into `__dlpack__` and `from_dlpack` * Implements `max_version` argument into `__dlpack__` * Adds `DLDeviceType` enumerator to `_usmarray.pyx` for representing device types as enumerators * Reimplements `dpt._dlpack.get_build_dlpack_version` to return a tuple of the major version and the minor version
…ck_versioned_capsule` Also adjusts some error messages in _dlpack.pyx
These tweaks are based on similar changes made for the managed tensor during memory work
6920790
to
c4b34e5
Compare
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_340 ran successfully. |
The check need tweaking:
The check should check that |
Please update |
The spec recommends that if the major versions match, it's a strong enough condition to return a capsule with our own |
DLPack version updated and new SHA for `dlpack.h` added
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_344 ran successfully. |
* Fixture all_root_devices is to keep only 2 devices from each platform This is done to speed-up test suite execution on multi-GPU system, like Aurora. * Add tests for legacy/versions capsule import-export * Expand tests more to improve coverage Use F-contiguous array to both legacy and versioned capsule. Add tests for read-only array and for use of copy=True keyword for __dlpack__ call
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_345 ran successfully. |
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_346 ran successfully. |
Also adds a test checking for the writable flag of a usm_ndarray constructed with a read-only usm_ndarray as the buffer Removes some commented out `flags` checks from `test_meshgrid2`. These checks were malformed, as `dpt.meshgrid` returns a non-contiguous view in the test.
99f03ce
to
85f12d0
Compare
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_346 ran successfully. |
It would be good to factor out common code from |
Reuse that in both capsule producers to avoid code duplication
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_348 ran successfully. |
* Reused get_parent_device_ordinal_id routine * test_legacy_dlpack_capsule uses 4 kinds of dtype Added test to use non-default copy keyword, and non-default device keyword argument.
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_349 ran successfully. |
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_351 ran successfully. |
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_352 ran successfully. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you @ndgrigorian
This PR bumps the version of dlpack by bringing in the new
dlpack.h
from v1.0rc.As a result of changes introduced in v1.0rc
get_build_dlpack_version
now returns a tuple giving the major and minor DLPack version dpctl was built withDLManagedTensorVersioned
struct has been added, including full support of the newflags
attribute__dlpack__
method ofusm_ndarray
has been updated to choose betweenDLManagedTensorVersioned
andDLManagedTensor
paths based on the newmax_version
keyword argument, and also now hasdl_device
andcopy
keyword argumentsfrom_dlpack
method has been updated withdevice
andcopy
keyword arguments and now has a path for arrays supporting the new__dlpack__
interface andDLManagedTensorVersioned
.from_dlpack
also honors the read-only bitmask that can now be present on aDLManagedTensorVersioned
object_usmarray.pyx
This pull request also slips in a minor change to
usm_ndarray
's constructor to honor the writable flag whenbuffer
is anotherusm_ndarray