Closed ndgrigorian closed 1 month ago
Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. :crossed_fingers:
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_336 ran successfully. Passed: 884 Failed: 8 Skipped: 92
@oleksandr-pavlyk The commit from the memory work branch seems to have broken the dlpack tests on Windows.
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_337 ran successfully. Passed: 883 Failed: 9 Skipped: 92
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_339 ran successfully. Passed: 884 Failed: 8 Skipped: 92
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_340 ran successfully. Passed: 883 Failed: 9 Skipped: 92
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_340 ran successfully. Passed: 884 Failed: 8 Skipped: 92
The check need tweaking:
In [9]: x.__dlpack__(max_version=1)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[9], line 1
----> 1 x.__dlpack__(max_version=1)
File ~/repos/dpctl_tmp/dpctl/tensor/_usmarray.pyx:1131, in dpctl.tensor._usmarray.usm_ndarray.__dlpack__()
1129 else:
1130 dpctl_dlpack_version = get_build_dlpack_version()
-> 1131 if max_version >= dpctl_dlpack_version or max_version[0] == dpctl_dlpack_version[0]:
1132 # DLManagedTensorVersioned path
1133 # TODO: add logic for targeting a device
TypeError: '>=' not supported between instances of 'int' and 'tuple'
The check should check that max_version
is a 2-tuple of integers. But looking at this check, what is the purpose of overriding clause max_version[0] == dpctl_dlpack_version[0]
?
Please update dpctl/tensor/include/dlpack/README.md
with version and SHA of the vendored dlpack.h
The check need tweaking:
In [9]: x.__dlpack__(max_version=1) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In[9], line 1 ----> 1 x.__dlpack__(max_version=1) File ~/repos/dpctl_tmp/dpctl/tensor/_usmarray.pyx:1131, in dpctl.tensor._usmarray.usm_ndarray.__dlpack__() 1129 else: 1130 dpctl_dlpack_version = get_build_dlpack_version() -> 1131 if max_version >= dpctl_dlpack_version or max_version[0] == dpctl_dlpack_version[0]: 1132 # DLManagedTensorVersioned path 1133 # TODO: add logic for targeting a device TypeError: '>=' not supported between instances of 'int' and 'tuple'
The check should check that
max_version
is a 2-tuple of integers. But looking at this check, what is the purpose of overriding clausemax_version[0] == dpctl_dlpack_version[0]
?
max_version[0] >= dpctl_dlpack_version[0]
should be enough.
The spec recommends that if the major versions match, it's a strong enough condition to return a capsule with our own max_version
.
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_344 ran successfully. Passed: 888 Failed: 17 Skipped: 91
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_345 ran successfully. Passed: 888 Failed: 17 Skipped: 91
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_346 ran successfully. Passed: 888 Failed: 17 Skipped: 91
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_346 ran successfully. Passed: 888 Failed: 17 Skipped: 91
It would be good to factor out common code from to_dlpack_capsule
and to_dlpack_versioned_capsule
into a function.
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_348 ran successfully. Passed: 888 Failed: 17 Skipped: 91
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_349 ran successfully. Passed: 889 Failed: 16 Skipped: 91
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_351 ran successfully. Passed: 888 Failed: 17 Skipped: 91
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_352 ran successfully. Passed: 889 Failed: 16 Skipped: 91
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