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
Documentation of dpctl.tensor.from_dlpack clearly states to return usm_ndarray array, but it will result into numpy.ndarray for an input object passed as numpy array:
importnumpy, dpctl, dpctl.tensorasdptdpctl.__version__# Out: '0.19.0dev0+280.g4a94ef9c25'numpy.__version__# Out: '2.1.3'x=numpy.arange(10)
b=dpt.from_dlpack(x)
type(b)
# Out: numpy.ndarray# setting `device` to a value will change the behavior:b=dpt.from_dlpack(x, device='cpu')
type(b)
# Out: dpctl.tensor._usmarray.usm_ndarrayb=dpt.from_dlpack(x, device='gpu')
type(b)
# Out: dpctl.tensor._usmarray.usm_ndarray