Closed
Description
Trying to create a float32
array of size (50000000, 64)
from a numpy array of same size and type using dpctl.asarray
with order="F"
:
dpt.asarray(np.arange(50000000*64).astype(np.float32).reshape(50000000,64), order="F")
gives the following error message:
Unexpected exception formatting exception. Falling back to standard exception
Traceback (most recent call last):
File "dpctl/tensor/_usmarray.pyx", line 1044, in dpctl.tensor._usmarray.usm_ndarray.__setitem__
File "/opt/venv/lib/python3.9/site-packages/dpctl/tensor/_copy_utils.py", line 103, in _copy_from_numpy_into
ti._copy_numpy_ndarray_into_usm_ndarray(
RuntimeError: Provided range is out of integer limits. Pass `-fno-sycl-id-queries-fit-in-int' to disable range check. -30 (PI_ERROR_INVALID_VALUE)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/venv/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 3460, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-4-b4a5d944067b>", line 1, in <module>
dpt.asarray(np.arange(50000000*64).astype(np.float32).reshape(50000000,64), order="F")
File "/opt/venv/lib/python3.9/site-packages/dpctl/tensor/_ctors.py", line 423, in asarray
return _asarray_from_numpy_ndarray(
File "/opt/venv/lib/python3.9/site-packages/dpctl/tensor/_ctors.py", line 275, in _asarray_from_numpy_ndarray
res[...] = ary
File "dpctl/tensor/_usmarray.pyx", line 1046, in dpctl.tensor._usmarray.usm_ndarray.__setitem__
ValueError: Input of type <class 'numpy.ndarray'> could not be converted to usm_ndarray
it looks like some int32 value is used to index the flattened array maybe ? but large arrays would require int64.
Metadata
Metadata
Assignees
Labels
No labels