File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 29
29
import dpnp
30
30
import numpy
31
31
import pytest
32
+ from .helper import check_support_float64
32
33
33
34
34
35
skip_mark = pytest .mark .skip (reason = 'Skipping test.' )
@@ -77,3 +78,6 @@ def pytest_collection_modifyitems(config, items):
77
78
@pytest .fixture
78
79
def allow_fall_back_on_numpy (monkeypatch ):
79
80
monkeypatch .setattr (dpnp .config , '__DPNP_RAISE_EXCEPION_ON_NUMPY_FALLBACK__' , 0 )
81
+
82
+ def pytest_configure ():
83
+ pytest .floatMAX = "float64" if check_support_float64 () else "float32"
Original file line number Diff line number Diff line change @@ -32,8 +32,16 @@ def get_all_dtypes(no_bool=False,
32
32
dtypes .append (dpnp .complex64 )
33
33
if dev .has_aspect_fp64 :
34
34
dtypes .append (dpnp .complex128 )
35
-
35
+
36
36
# add None value to validate a default dtype
37
37
if not no_none :
38
38
dtypes .append (None )
39
39
return dtypes
40
+
41
+ def check_support_float64 ():
42
+ """
43
+ Returns True if the default device supports 64-bit precision floating
44
+ point operations, False otherwise.
45
+ """
46
+
47
+ return dpctl .select_default_device ().has_aspect_fp64
You can’t perform that action at this time.
0 commit comments