15
15
16
16
import dpnp
17
17
from dpnp .dpnp_array import dpnp_array
18
+ from tests .third_party .cupy import testing
18
19
19
20
from .helper import (
20
21
assert_dtype_allclose ,
25
26
get_integer_dtypes ,
26
27
has_support_aspect64 ,
27
28
is_cpu_device ,
28
- is_win_platform ,
29
29
)
30
30
31
31
@@ -125,8 +125,7 @@ def test_input_nan(self):
125
125
expected = numpy .clip (np_a , - 1 , 1 )
126
126
assert_array_equal (result , expected )
127
127
128
- # TODO: unmute the test once dpctl resolves the issue
129
- @pytest .mark .skip (reason = "dpctl-1489 issue" )
128
+ @testing .with_requires ("numpy>=1.25.0" )
130
129
@pytest .mark .parametrize (
131
130
"kwargs" ,
132
131
[
@@ -138,7 +137,7 @@ def test_input_nan(self):
138
137
],
139
138
)
140
139
def test_nan_edges (self , kwargs ):
141
- np_a = numpy .arange (7 )
140
+ np_a = numpy .arange (7.0 )
142
141
dp_a = dpnp .asarray (np_a )
143
142
144
143
result = dp_a .clip (** kwargs )
@@ -424,7 +423,6 @@ def test_add(self, dtype, lhs, rhs):
424
423
def test_arctan2 (self , dtype , lhs , rhs ):
425
424
self ._test_mathematical ("arctan2" , dtype , lhs , rhs )
426
425
427
- @pytest .mark .usefixtures ("allow_fall_back_on_numpy" )
428
426
@pytest .mark .parametrize (
429
427
"dtype" , get_all_dtypes (no_bool = True , no_complex = True )
430
428
)
@@ -564,7 +562,7 @@ def test_op_with_scalar(array, val, func, data_type, val_type):
564
562
pytest .skip (
565
563
"(0j ** 0) is different: (NaN + NaNj) in dpnp and (1 + 0j) in numpy"
566
564
)
567
- # TODO: Remove when #1378 (dpctl) is solved
565
+ # TODO: Remove when #1378 (dpctl) is solved and 2024.1 is released (coverage is failing otherwise)
568
566
elif (
569
567
is_cpu_device ()
570
568
and dpnp_a .dtype == dpnp .complex128
@@ -1002,7 +1000,7 @@ def test_power(array, val, data_type, val_type):
1002
1000
dpnp_a = dpnp .array (array , dtype = data_type )
1003
1001
val_ = val_type (val )
1004
1002
1005
- # TODO: Remove when #1378 (dpctl) is solved
1003
+ # TODO: Remove when #1378 (dpctl) is solved and 2024.1 is released (coverage is failing otherwise)
1006
1004
if (
1007
1005
is_cpu_device ()
1008
1006
and (
@@ -2306,12 +2304,6 @@ def test_complex_values(self):
2306
2304
dp_arr = dpnp .array (np_arr )
2307
2305
func = lambda x : x ** 2
2308
2306
2309
- # TODO: unmute the test once it's available
2310
- if is_win_platform ():
2311
- pytest .skip (
2312
- "Until the latest dpctl is available on internal channel"
2313
- )
2314
-
2315
2307
assert_dtype_allclose (func (dp_arr ), func (np_arr ))
2316
2308
2317
2309
@pytest .mark .parametrize ("val" , [0 , 1 ], ids = ["0" , "1" ])
@@ -2696,9 +2688,6 @@ def test_matmul_dtype_matrix_inputs(self, dtype1, dtype2, shape_pair):
2696
2688
with pytest .raises (TypeError ):
2697
2689
dpnp .matmul (b1 , b2 , dtype = dtype2 )
2698
2690
2699
- # TODO: Temporary skipping the test, until Internal CI is updated with
2700
- # recent changed in dpctl regarding dpt.result_type function
2701
- @pytest .mark .skip ("Temporary skipping the test" )
2702
2691
@pytest .mark .parametrize ("dtype1" , get_all_dtypes (no_bool = True ))
2703
2692
@pytest .mark .parametrize ("dtype2" , get_all_dtypes (no_bool = True ))
2704
2693
@pytest .mark .parametrize (
@@ -2846,9 +2835,6 @@ def test_exe_q(self):
2846
2835
with pytest .raises (ValueError ):
2847
2836
dpnp .matmul (x1 , x2 )
2848
2837
2849
- # TODO: Temporary skipping the test, until Internal CI is updated with
2850
- # recent changed in dpctl regarding dpt.result_type function
2851
- @pytest .mark .skip ("Temporary skipping the test" )
2852
2838
def test_matmul_casting (self ):
2853
2839
a1 = dpnp .arange (2 * 4 , dtype = dpnp .float32 ).reshape (2 , 4 )
2854
2840
a2 = dpnp .arange (4 * 3 ).reshape (4 , 3 )
0 commit comments