Skip to content

test_usm_ndarray_print has 1 test failed on Iris XE #1069

Closed
@vlad-perevezentsev

Description

@vlad-perevezentsev

x(asarray) is created as float32 on gpu device without double type support and its printable representation shows with dtype which causes this test to fall.

The example code from WSL:

def test_print_repr(self):
        ...
        x = dpt.asarray([np.nan, np.inf], sycl_queue=q)
>       assert repr(x) == "usm_ndarray([nan, inf])"
E       AssertionError: assert 'usm_ndarray(...type=float32)' == 'usm_ndarray([nan, inf])'
E         - usm_ndarray([nan, inf])
E         + usm_ndarray([nan, inf], dtype=float32)
E         ?                       +++++++++++++++

Suggested action:

Add if x.sycl_device.has_aspect_fp64 to check for double type support

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions