File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed
numba_dpex/tests/dpjit_tests/dpnp Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 5
5
"""Tests for dpnp ndarray constructors."""
6
6
7
7
import math
8
+ import platform
8
9
9
10
import dpctl
10
11
import dpnp
@@ -52,7 +53,16 @@ def func(shape, fill_value):
52
53
53
54
dummy = dpnp .full (shape , fill_value )
54
55
55
- assert c .dtype == dummy .dtype
56
+ if c .dtype != dummy .dtype :
57
+ if platform .system ().lower () != "linux" :
58
+ pytest .xfail (
59
+ "Ddefault bit length is not as same as that of linux for {0:s}" .format (
60
+ str (dummy .dtype )
61
+ )
62
+ )
63
+ else :
64
+ pytest .fail ("The dtype of the returned array doesn't conform." )
65
+
56
66
assert c .usm_type == dummy .usm_type
57
67
assert c .sycl_device == dummy .sycl_device
58
68
if c .sycl_queue != dummy .sycl_queue :
Original file line number Diff line number Diff line change 5
5
"""Tests for dpnp ndarray constructors."""
6
6
7
7
import math
8
+ import platform
8
9
9
10
import dpctl
10
11
import dpctl .tensor as dpt
@@ -54,7 +55,16 @@ def func(x, fill_value):
54
55
55
56
dummy = dpnp .full_like (a , fill_value )
56
57
57
- assert c .dtype == dummy .dtype
58
+ if c .dtype != dummy .dtype :
59
+ if platform .system ().lower () != "linux" :
60
+ pytest .xfail (
61
+ "Ddefault bit length is not as same as that of linux for {0:s}" .format (
62
+ str (dummy .dtype )
63
+ )
64
+ )
65
+ else :
66
+ pytest .fail ("The dtype of the returned array doesn't conform." )
67
+
58
68
assert c .usm_type == dummy .usm_type
59
69
assert c .sycl_device == dummy .sycl_device
60
70
if c .sycl_queue != dummy .sycl_queue :
You can’t perform that action at this time.
0 commit comments