Skip to content

Commit 8ace62f

Browse files
authored
Skipped tests which are currently not working on GPU without fp64 (#1521)
1 parent 42e02d9 commit 8ace62f

File tree

5 files changed

+2487
-13
lines changed

5 files changed

+2487
-13
lines changed

dpnp/dpnp_algo/dpnp_algo.pxd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,6 @@ cdef extern from "constants.hpp":
335335

336336
cdef extern from "dpnp_iface.hpp":
337337
void dpnp_queue_initialize_c(QueueOptions selector)
338-
size_t dpnp_queue_is_cpu_c() except +
339338

340339
char * dpnp_memory_alloc_c(size_t size_in_bytes) except +
341340
void dpnp_memory_free_c(void * ptr)

dpnp/dpnp_algo/dpnp_algo.pyx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ __all__ = [
5858
"dpnp_flatten",
5959
"dpnp_init_val",
6060
"dpnp_queue_initialize",
61-
"dpnp_queue_is_cpu"
6261
]
6362

6463

@@ -223,13 +222,6 @@ cpdef dpnp_queue_initialize():
223222
dpnp_rng_srand_c(seed_from_time)
224223

225224

226-
cpdef dpnp_queue_is_cpu():
227-
"""Return 1 if current queue is CPU. Return 0 otherwise.
228-
229-
"""
230-
return dpnp_queue_is_cpu_c()
231-
232-
233225
"""
234226
Internal functions
235227
"""

dpnp/dpnp_iface.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@
6060
"convert_single_elem_array_to_scalar",
6161
"default_float_type",
6262
"dpnp_queue_initialize",
63-
"dpnp_queue_is_cpu",
6463
"from_dlpack",
6564
"get_dpnp_descriptor",
6665
"get_include",

tests/conftest.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import os
2828
import sys
2929

30+
import dpctl
3031
import numpy
3132
import pytest
3233

@@ -52,15 +53,28 @@ def pytest_collection_modifyitems(config, items):
5253
# global skip file, where gpu device is not supported
5354
test_exclude_file_gpu = os.path.join(test_path, "skipped_tests_gpu.tbl")
5455

55-
current_queue_is_cpu = dpnp.dpnp_queue_is_cpu()
56+
# global skip file, where gpu device with no fp64 support
57+
test_exclude_file_gpu_no_fp64 = os.path.join(
58+
test_path, "skipped_tests_gpu_no_fp64.tbl"
59+
)
60+
61+
dev = dpctl.select_default_device()
62+
is_cpu = dev.is_cpu
63+
is_gpu_no_fp64 = not dev.has_aspect_fp64
64+
5665
print("")
57-
print(f"DPNP current queue is CPU: {current_queue_is_cpu}")
66+
print(f"DPNP current device is CPU: {is_cpu}")
67+
print(f"DPNP current device is GPU without fp64 support: {is_gpu_no_fp64}")
5868
print(f"DPNP version: {dpnp.__version__}, location: {dpnp}")
5969
print(f"NumPy version: {numpy.__version__}, location: {numpy}")
6070
print(f"Python version: {sys.version}")
6171
print("")
62-
if not current_queue_is_cpu or os.getenv("DPNP_QUEUE_GPU") == "1":
72+
if not is_cpu or os.getenv("DPNP_QUEUE_GPU") == "1":
6373
excluded_tests.extend(get_excluded_tests(test_exclude_file_gpu))
74+
if is_gpu_no_fp64:
75+
excluded_tests.extend(
76+
get_excluded_tests(test_exclude_file_gpu_no_fp64)
77+
)
6478
else:
6579
excluded_tests.extend(get_excluded_tests(test_exclude_file))
6680

0 commit comments

Comments
 (0)