diff --git a/dpnp/dpnp_iface_mathematical.py b/dpnp/dpnp_iface_mathematical.py index 1e56782c7d43..dd08de3fa3ba 100644 --- a/dpnp/dpnp_iface_mathematical.py +++ b/dpnp/dpnp_iface_mathematical.py @@ -39,7 +39,6 @@ import dpctl.tensor as dpt -import dpctl.utils as du import numpy from numpy.core.numeric import ( normalize_axis_index, @@ -2266,32 +2265,7 @@ def prod( """ - # Product reduction for complex output are known to fail for Gen9 with 2024.0 compiler - # TODO: get rid of this temporary work around when OneAPI 2024.1 is released - dpnp.check_supported_arrays_type(a) - _dtypes = (a.dtype, dtype) - _any_complex = any( - dpnp.issubdtype(dt, dpnp.complexfloating) for dt in _dtypes - ) - device_mask = ( - du.intel_device_info(a.sycl_device).get("device_id", 0) & 0xFF00 - ) - if _any_complex and device_mask in [0x3E00, 0x9B00]: - res = call_origin( - numpy.prod, - a, - axis=axis, - dtype=dtype, - out=out, - keepdims=keepdims, - initial=initial, - where=where, - ) - if dpnp.isscalar(res): - # numpy may return a scalar, convert it back to dpnp array - return dpnp.array(res, sycl_queue=a.sycl_queue, usm_type=a.usm_type) - return res - elif initial is not None: + if initial is not None: raise NotImplementedError( "initial keyword argument is only supported with its default value." ) diff --git a/tests/test_linalg.py b/tests/test_linalg.py index 013ad15f122f..9177466d7d5a 100644 --- a/tests/test_linalg.py +++ b/tests/test_linalg.py @@ -229,9 +229,6 @@ def test_cond(arr, p): class TestDet: - # TODO: Remove the use of fixture for test_det - # when dpnp.prod() will support complex dtypes on Gen9 - @pytest.mark.usefixtures("allow_fall_back_on_numpy") @pytest.mark.parametrize( "array", [ @@ -1054,9 +1051,6 @@ def test_solve_errors(self): class TestSlogdet: - # TODO: Remove the use of fixture for test_slogdet_2d and test_slogdet_3d - # when dpnp.prod() will support complex dtypes on Gen9 - @pytest.mark.usefixtures("allow_fall_back_on_numpy") @pytest.mark.parametrize("dtype", get_all_dtypes(no_bool=True)) def test_slogdet_2d(self, dtype): a_np = numpy.array([[1, 2], [3, 4]], dtype=dtype) @@ -1068,7 +1062,6 @@ def test_slogdet_2d(self, dtype): assert_allclose(sign_expected, sign_result) assert_allclose(logdet_expected, logdet_result, rtol=1e-3, atol=1e-4) - @pytest.mark.usefixtures("allow_fall_back_on_numpy") @pytest.mark.parametrize("dtype", get_all_dtypes(no_bool=True)) def test_slogdet_3d(self, dtype): a_np = numpy.array( diff --git a/tests/test_mathematical.py b/tests/test_mathematical.py index 16c2375a8038..9b8c17f979f2 100644 --- a/tests/test_mathematical.py +++ b/tests/test_mathematical.py @@ -752,7 +752,6 @@ def test_positive_boolean(): class TestProd: - @pytest.mark.usefixtures("allow_fall_back_on_numpy") @pytest.mark.parametrize("func", ["prod", "nanprod"]) @pytest.mark.parametrize("axis", [None, 0, 1, -1, 2, -2, (1, 2), (0, -2)]) @pytest.mark.parametrize("keepdims", [False, True]) @@ -790,7 +789,6 @@ def test_prod_nanprod_bool(self, func, axis, keepdims): dpnp_res = getattr(dpnp, func)(ia, axis=axis, keepdims=keepdims) assert_dtype_allclose(dpnp_res, np_res) - @pytest.mark.usefixtures("allow_fall_back_on_numpy") @pytest.mark.usefixtures("suppress_complex_warning") @pytest.mark.usefixtures("suppress_invalid_numpy_warnings") @pytest.mark.parametrize("func", ["prod", "nanprod"])