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
@antonwolfy This is because dpnp,ndarray does not yet support max_version keyword in its __dlpack__ method:
(dev_dpctl) opavlyk@sprpvcbenchlin01:/localdisk/work/opavlyk/repos/dpctl$ ipython
Python 3.12.4 | packaged by conda-forge | (main, Jun 17 2024, 10:23:07) [GCC 12.3.0]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.26.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import dpnp, dpctl, dpctl.tensor as dpt
In [2]: x = dpt.linspace(100, 0, num=101, dtype="f8")
In [3]: x.flags["W"] = False
In [4]: y = dpnp.linspace(100, 0, num=101, dtype="f8")
In [5]: y.flags["W"] = False
In [6]: x.__dlpack__(max_version=(1, 0))
Out[6]: <capsule object "dltensor_versioned" at 0x7f71dcefa8e0>
In [7]: y.__dlpack__(max_version=(1, 0))
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[7], line 1
----> 1 y.__dlpack__(max_version=(1, 0))
TypeError: dpnp_array.__dlpack__() got an unexpected keyword argument 'max_version'
Once added, from_dlpack would preserve the flag as it does for dpctl.tensor.
The below example:
demonstrates that writable flag set to
False
for dpnp arraya
was not preserved afterdpt.from_dlpack(a)
call.The text was updated successfully, but these errors were encountered: