diff --git a/dpnp/backend/kernels/dpnp_krnl_logic.cpp b/dpnp/backend/kernels/dpnp_krnl_logic.cpp index 2080306aeade..429f9d96f1ea 100644 --- a/dpnp/backend/kernels/dpnp_krnl_logic.cpp +++ b/dpnp/backend/kernels/dpnp_krnl_logic.cpp @@ -173,6 +173,28 @@ static sycl::event dpnp_allclose(sycl::queue &q, partial &= (array1[i] == array2[i]); continue; } + + // workaround for std::inf which does not work on CPU + // [CMPLRLLVM-51856] + if (array1[i] == std::numeric_limits<_DataType1>::infinity()) { + partial &= (array1[i] == array2[i]); + continue; + } + else if (array1[i] == + -std::numeric_limits<_DataType1>::infinity()) { + partial &= (array1[i] == array2[i]); + continue; + } + else if (array2[i] == + std::numeric_limits<_DataType2>::infinity()) { + partial &= (array1[i] == array2[i]); + continue; + } + else if (array2[i] == + -std::numeric_limits<_DataType2>::infinity()) { + partial &= (array1[i] == array2[i]); + continue; + } } // casting integeral to floating type to avoid bad behavior diff --git a/tests/skipped_tests.tbl b/tests/skipped_tests.tbl index 128b7f7f5da2..9d82b93db882 100644 --- a/tests/skipped_tests.tbl +++ b/tests/skipped_tests.tbl @@ -72,12 +72,6 @@ tests/test_linalg.py::test_norm1[None-3-[7]] tests/test_linalg.py::test_norm1[None-3-[1, 2]] tests/test_linalg.py::test_norm1[None-3-[1, 0]] -tests/test_logic.py::test_allclose[int32] -tests/test_logic.py::test_allclose[int64] -tests/test_logic.py::test_allclose[float32] -tests/test_logic.py::test_allclose[float64] -tests/test_logic.py::test_allclose[None] - tests/test_random.py::TestPermutationsTestShuffle::test_shuffle1[lambda x: dpnp.asarray([[i, i] for i in x])] tests/test_random.py::TestPermutationsTestShuffle::test_shuffle1[lambda x: (dpnp.asarray([(i, i) for i in x], [("a", int), ("b", int)]).view(dpnp.recarray))] tests/test_random.py::TestPermutationsTestShuffle::test_shuffle1[lambda x: dpnp.asarray([(i, i) for i in x], [("a", object), ("b", dpnp.int32)])]]