Skip to content

Commit

Permalink
[dace] Fix previous commit (4)
Browse files Browse the repository at this point in the history
  • Loading branch information
edopao committed Sep 8, 2023
1 parent 837d81e commit cd6ab6e
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tests/next_tests/unit_tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,11 @@
from gt4py.next.program_processors.runners import double_roundtrip, gtfn_cpu, roundtrip


dace_available = True
try:
import gt4py.next.program_processors.runners.dace_iterator
from gt4py.next.program_processors.runners import dace_iterator
except ModuleNotFoundError as e:
if "dace" in str(e):
dace_available = False
dace_iterator = None
else:
raise e

Expand Down Expand Up @@ -66,7 +65,7 @@ def pretty_format_and_check(root: itir.FencilDefinition, *args, **kwargs) -> str


optional_processors = []
if dace_available:
if dace_iterator:
optional_processors.append((dace_iterator.run_dace_iterator, True))


Expand All @@ -92,7 +91,7 @@ def program_processor(request):

@pytest.fixture
def program_processor_no_dace_exec(program_processor):
if dace_available and program_processor[0] == dace_iterator.run_dace_iterator:
if dace_iterator and program_processor[0] == dace_iterator.run_dace_iterator:
pytest.xfail("DaCe backend not yet supported.")
return program_processor

Expand All @@ -114,7 +113,7 @@ def program_processor_no_gtfn_nor_dace_exec(program_processor):
or program_processor[0] == gtfn_cpu.run_gtfn_imperative
):
pytest.xfail("gtfn backend not yet supported.")
elif dace_available and program_processor[0] == dace_iterator.run_dace_iterator:
elif dace_iterator and program_processor[0] == dace_iterator.run_dace_iterator:
pytest.xfail("DaCe backend not yet supported.")
return program_processor

Expand Down

0 comments on commit cd6ab6e

Please sign in to comment.