Skip to content

Commit

Permalink
ADd pytest marker for failing gpu tests
Browse files Browse the repository at this point in the history
  • Loading branch information
edopao committed Nov 4, 2024
1 parent ef1df14 commit 02a9391
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ markers = [
'requires_atlas: tests that require `atlas4py` bindings package',
'requires_dace: tests that require `dace` package',
'requires_gpu: tests that require a NVidia GPU (`cupy` and `cudatoolkit` are required)',
'requires_gtir_dace_gpu_fix: tests that still do not work on GTIR DaCe backend',
'starts_from_gtir_program: tests that require backend to start lowering from GTIR program',
'uses_applied_shifts: tests that require backend support for applied-shifts',
'uses_constant_fields: tests that require backend support for constant fields',
Expand Down
5 changes: 4 additions & 1 deletion tests/next_tests/definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ class ProgramFormatterId(_PythonObjectIdMixin, str, enum.Enum):
# to avoid needing to mark all tests.
ALL = "all"
REQUIRES_ATLAS = "requires_atlas"
# TODO(edopao): Remove, once issues are fixed
REQUIRES_GTIR_DACE_GPU_FIX = "requires_gtir_dace_gpu_fix"
# TODO(havogt): Remove, skipped during refactoring to GTIR
STARTS_FROM_GTIR_PROGRAM = "starts_from_gtir_program"
USES_APPLIED_SHIFTS = "uses_applied_shifts"
Expand Down Expand Up @@ -181,7 +183,8 @@ class ProgramFormatterId(_PythonObjectIdMixin, str, enum.Enum):
OptionalProgramBackendId.DACE_CPU: DACE_SKIP_TEST_LIST,
OptionalProgramBackendId.DACE_GPU: DACE_SKIP_TEST_LIST,
OptionalProgramBackendId.GTIR_DACE_CPU: GTIR_DACE_SKIP_TEST_LIST,
OptionalProgramBackendId.GTIR_DACE_GPU: GTIR_DACE_SKIP_TEST_LIST,
OptionalProgramBackendId.GTIR_DACE_GPU: GTIR_DACE_SKIP_TEST_LIST
+ [(REQUIRES_GTIR_DACE_GPU_FIX, XFAIL, UNSUPPORTED_MESSAGE)],
ProgramBackendId.GTFN_CPU: GTFN_SKIP_TEST_LIST
+ [(USES_SCAN_NESTED, XFAIL, UNSUPPORTED_MESSAGE)],
ProgramBackendId.GTFN_CPU_IMPERATIVE: GTFN_SKIP_TEST_LIST
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,7 @@ def program_domain(
cases.verify(cartesian_case, program_domain, inp, out, lower_i, upper_i, inout=out, ref=ref)


@pytest.mark.requires_gtir_dace_gpu_fix
def test_domain_input_bounds_1(cartesian_case):
lower_i = 1
upper_i = 9
Expand Down Expand Up @@ -1042,6 +1043,7 @@ def program_domain(
)


@pytest.mark.requires_gtir_dace_gpu_fix
def test_domain_tuple(cartesian_case):
@gtx.field_operator
def fieldop_domain_tuple(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
)


@pytest.mark.requires_gtir_dace_gpu_fix
@pytest.mark.uses_cartesian_shift
def test_where_k_offset(cartesian_case):
@gtx.field_operator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def skewedlap_ref(inp):
return -4.0 * inp[1:-1, 1:-1] + inp[2:, 2:] + inp[2:, :-2] + inp[:-2, 2:] + inp[:-2, :-2]


@pytest.mark.requires_gtir_dace_gpu_fix
def test_ffront_lap(cartesian_case):
in_field = cases.allocate(cartesian_case, lap_program, "in_field")()
in_field = square(in_field)
Expand All @@ -99,6 +100,7 @@ def test_ffront_lap(cartesian_case):
)


@pytest.mark.requires_gtir_dace_gpu_fix
def test_ffront_skewedlap(cartesian_case):
in_field = cases.allocate(cartesian_case, skewedlap_program, "in_field")()
in_field = square(in_field)
Expand All @@ -114,6 +116,7 @@ def test_ffront_skewedlap(cartesian_case):
)


@pytest.mark.requires_gtir_dace_gpu_fix
def test_ffront_laplap(cartesian_case):
in_field = cases.allocate(cartesian_case, laplap_program, "in_field")()
in_field = square(in_field)
Expand Down

0 comments on commit 02a9391

Please sign in to comment.