Skip to content

Commit

Permalink
refactor gpu selection
Browse files Browse the repository at this point in the history
  • Loading branch information
havogt committed Nov 14, 2023
1 parent 6ecbffe commit 53f752e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ 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 @@ -61,9 +58,9 @@ def no_backend(program: itir.FencilDefinition, *args: Any, **kwargs: Any) -> Non
definitions.ProgramBackendId.GTFN_CPU,
definitions.ProgramBackendId.GTFN_CPU_IMPERATIVE,
definitions.ProgramBackendId.GTFN_CPU_WITH_TEMPORARIES,
pytest.param(definitions.ProgramBackendId.GTFN_GPU, marks=pytest.mark.requires_gpu),
]
+ OPTIONAL_PROCESSORS
+ GPU_PROCESSORS,
+ OPTIONAL_PROCESSORS,
ids=lambda p: p.short_id() if p is not None else "None",
)
def fieldview_backend(request):
Expand Down
1 change: 1 addition & 0 deletions tests/next_tests/unit_tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def lift_mode(request):
(definitions.ProgramBackendId.GTFN_CPU, True),
(definitions.ProgramBackendId.GTFN_CPU_IMPERATIVE, True),
(definitions.ProgramBackendId.GTFN_CPU_WITH_TEMPORARIES, True),
pytest.param((definitions.ProgramBackendId.GTFN_GPU, True), marks=pytest.mark.requires_gpu),
(definitions.ProgramFormatterId.LISP_FORMATTER, False),
(definitions.ProgramFormatterId.ITIR_PRETTY_PRINTER, False),
(definitions.ProgramFormatterId.ITIR_TYPE_CHECKER, False),
Expand Down

0 comments on commit 53f752e

Please sign in to comment.