Skip to content

Skip test_digitize_empty on LNL Windows #2407

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions dpnp/tests/test_histogram.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import dpctl
import dpctl.utils as du
import numpy
import pytest
from numpy.testing import (
Expand All @@ -21,6 +22,7 @@
get_integer_dtypes,
get_integer_float_dtypes,
has_support_aspect64,
is_win_platform,
numpy_version,
)

Expand Down Expand Up @@ -101,6 +103,17 @@ def test_digitize_empty(self, x, bins, dtype):
x_dp = dpnp.array(x)
bins_dp = dpnp.array(bins)

# SAT-7822: w/a to avoid crash on Windows (observing on LNL)
# TODO: remove the w/a once resolved
if x_dp.size == 0 and is_win_platform():
device_mask = (
du.intel_device_info(x_dp.sycl_device).get("device_id", 0)
& 0xFF00
)
# upper byte of device_id for LNL architecture
if device_mask in [0x6400]:
Comment on lines +109 to +114
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be good to have a helper function which obtains a mask for the default or input device and checks if it matches with specified device architecture.
While for LNL arch value it'd be better to expose it as a enum value.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meanwhile it might be helpful to add a link to the enum description on GitHub page where to find the values of device architectures.

pytest.skip("SAT-7822: crash on LNL Windows")

result = dpnp.digitize(x_dp, bins_dp)
expected = numpy.digitize(x, bins)
assert_dtype_allclose(result, expected)
Expand Down
Loading