Skip to content

Commit

Permalink
enable GPU tests
Browse files Browse the repository at this point in the history
  • Loading branch information
havogt committed Nov 14, 2023
1 parent f1e1e02 commit b467a02
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/next_tests/exclusion_matrices.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class ProgramBackendId(_PythonObjectIdMixin, str, enum.Enum):
GTFN_CPU_WITH_TEMPORARIES = (
"gt4py.next.program_processors.runners.gtfn.run_gtfn_with_temporaries"
)
GTFN_GPU = "gt4py.next.program_processors.runners.gtfn.run_gtfn_gpu"
ROUNDTRIP = "gt4py.next.program_processors.runners.roundtrip.backend"
DOUBLE_ROUNDTRIP = "gt4py.next.program_processors.runners.double_roundtrip.backend"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
else:
raise e

try:
import cupy as cp
except ImportError:
cp = None

import next_tests
import next_tests.exclusion_matrices as definitions

Expand All @@ -45,6 +50,9 @@ def no_backend(program: itir.FencilDefinition, *args: Any, **kwargs: Any) -> Non
OPTIONAL_PROCESSORS = []
if dace_iterator:
OPTIONAL_PROCESSORS.append(definitions.OptionalProgramBackendId.DACE_CPU)
GPU_PROCESSORS = []
if cp:
GPU_PROCESSORS.append(definitions.ProgramBackendId.GTFN_GPU)


@pytest.fixture(
Expand All @@ -54,7 +62,8 @@ def no_backend(program: itir.FencilDefinition, *args: Any, **kwargs: Any) -> Non
definitions.ProgramBackendId.GTFN_CPU_IMPERATIVE,
definitions.ProgramBackendId.GTFN_CPU_WITH_TEMPORARIES,
]
+ OPTIONAL_PROCESSORS,
+ OPTIONAL_PROCESSORS
+ GPU_PROCESSORS,
ids=lambda p: p.short_id() if p is not None else "None",
)
def fieldview_backend(request):
Expand Down

0 comments on commit b467a02

Please sign in to comment.