Closed
Description
The below example triggers an exception on Iris Xe, but expected to be working:
import numpy, dpctl, dpctl.tensor as dpt
a = dpt.arange(10, dtype=numpy.int64)
b = dpt.arange(10, dtype=numpy.float32)
dpt.concat((a, b))
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[4], line 1
----> 1 dpt.concat((a, b))
File ~/miniconda3/envs/dpnp_dev/lib/python3.9/site-packages/dpctl/tensor/_manipulation_functions.py:615, in concat(arrays, axis)
609 res_shape_axis = res_shape_axis + X.shape[axis]
611 res_shape = tuple(
612 X0_shape[i] if i != axis else res_shape_axis for i in range(X0.ndim)
613 )
--> 615 res = dpt.empty(
616 res_shape, dtype=res_dtype, usm_type=res_usm_type, sycl_queue=exec_q
617 )
619 hev_list = []
620 fill_start = 0
File ~/miniconda3/envs/dpnp_dev/lib/python3.9/site-packages/dpctl/tensor/_ctors.py:739, in empty(shape, dtype, order, device, usm_type, sycl_queue)
737 sycl_queue = normalize_queue_device(sycl_queue=sycl_queue, device=device)
738 dtype = _get_dtype(dtype, sycl_queue)
--> 739 _ensure_native_dtype_device_support(dtype, sycl_queue.sycl_device)
740 res = dpt.usm_ndarray(
741 shape,
742 dtype=dtype,
(...)
745 buffer_ctor_kwargs={"queue": sycl_queue},
746 )
747 return res
File ~/miniconda3/envs/dpnp_dev/lib/python3.9/site-packages/dpctl/tensor/_ctors.py:313, in _ensure_native_dtype_device_support(dtype, dev)
300 """Check that dtype is natively supported by device.
301
302 Arg:
(...)
310 ValueError - if device does not natively support this dtype.
311 """
312 if dtype in [dpt.float64, dpt.complex128] and not dev.has_aspect_fp64:
--> 313 raise ValueError(
314 f"Device {dev.name} does not provide native support "
315 "for double-precision floating point type."
316 )
317 if (
318 dtype
319 in [
(...)
322 and not dev.has_aspect_fp16
323 ):
324 raise ValueError(
325 f"Device {dev.name} does not provide native support "
326 "for half-precision floating point type."
327 )
ValueError: Device Intel(R) Graphics [0x9a49] does not provide native support for double-precision floating point type.
dpctl.__version__
# Out: '0.14.6dev0+84.gbf2d1ff3a'
Metadata
Metadata
Assignees
Labels
No labels