Skip to content

Skip tests which are currently not working on GPU without fp64 aspect #1521

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion dpnp/dpnp_algo/dpnp_algo.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,6 @@ cdef extern from "constants.hpp":

cdef extern from "dpnp_iface.hpp":
void dpnp_queue_initialize_c(QueueOptions selector)
size_t dpnp_queue_is_cpu_c() except +

char * dpnp_memory_alloc_c(size_t size_in_bytes) except +
void dpnp_memory_free_c(void * ptr)
Expand Down
8 changes: 0 additions & 8 deletions dpnp/dpnp_algo/dpnp_algo.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ __all__ = [
"dpnp_flatten",
"dpnp_init_val",
"dpnp_queue_initialize",
"dpnp_queue_is_cpu"
]


Expand Down Expand Up @@ -223,13 +222,6 @@ cpdef dpnp_queue_initialize():
dpnp_rng_srand_c(seed_from_time)


cpdef dpnp_queue_is_cpu():
"""Return 1 if current queue is CPU. Return 0 otherwise.

"""
return dpnp_queue_is_cpu_c()


"""
Internal functions
"""
Expand Down
1 change: 0 additions & 1 deletion dpnp/dpnp_iface.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
"convert_single_elem_array_to_scalar",
"default_float_type",
"dpnp_queue_initialize",
"dpnp_queue_is_cpu",
"from_dlpack",
"get_dpnp_descriptor",
"get_include",
Expand Down
20 changes: 17 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import os
import sys

import dpctl
import numpy
import pytest

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

current_queue_is_cpu = dpnp.dpnp_queue_is_cpu()
# global skip file, where gpu device with no fp64 support
test_exclude_file_gpu_no_fp64 = os.path.join(
test_path, "skipped_tests_gpu_no_fp64.tbl"
)

dev = dpctl.select_default_device()
is_cpu = dev.is_cpu
is_gpu_no_fp64 = not dev.has_aspect_fp64

print("")
print(f"DPNP current queue is CPU: {current_queue_is_cpu}")
print(f"DPNP current device is CPU: {is_cpu}")
print(f"DPNP current device is GPU without fp64 support: {is_gpu_no_fp64}")
print(f"DPNP version: {dpnp.__version__}, location: {dpnp}")
print(f"NumPy version: {numpy.__version__}, location: {numpy}")
print(f"Python version: {sys.version}")
print("")
if not current_queue_is_cpu or os.getenv("DPNP_QUEUE_GPU") == "1":
if not is_cpu or os.getenv("DPNP_QUEUE_GPU") == "1":
excluded_tests.extend(get_excluded_tests(test_exclude_file_gpu))
if is_gpu_no_fp64:
excluded_tests.extend(
get_excluded_tests(test_exclude_file_gpu_no_fp64)
)
else:
excluded_tests.extend(get_excluded_tests(test_exclude_file))

Expand Down
Loading