Skip to content
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

test[next]: Use pytest marker to skip GTIR test (fix spack build) #1575

Merged
merged 4 commits into from
Jul 11, 2024
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: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,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)',
'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',
'uses_dynamic_offsets: tests that require backend support for dynamic offsets',
Expand Down
3 changes: 3 additions & 0 deletions tests/next_tests/definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ class ProgramFormatterId(_PythonObjectIdMixin, str, enum.Enum):

# Test markers
REQUIRES_ATLAS = "requires_atlas"
# TODO(havogt): Remove, skipped during refactoring to GTIR
STARTS_FROM_GTIR_PROGRAM = "starts_from_gtir_program"
USES_APPLIED_SHIFTS = "uses_applied_shifts"
USES_CONSTANT_FIELDS = "uses_constant_fields"
USES_DYNAMIC_OFFSETS = "uses_dynamic_offsets"
Expand Down Expand Up @@ -135,6 +137,7 @@ class ProgramFormatterId(_PythonObjectIdMixin, str, enum.Enum):
# Common list of feature markers to skip
COMMON_SKIP_TEST_LIST = [
(REQUIRES_ATLAS, XFAIL, BINDINGS_UNSUPPORTED_MESSAGE),
(STARTS_FROM_GTIR_PROGRAM, SKIP, UNSUPPORTED_MESSAGE),
(USES_APPLIED_SHIFTS, XFAIL, UNSUPPORTED_MESSAGE),
(USES_IF_STMTS, XFAIL, UNSUPPORTED_MESSAGE),
(USES_NEGATIVE_MODULO, XFAIL, UNSUPPORTED_MESSAGE),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import gt4py.next as gtx
from gt4py.next.iterator.builtins import as_fieldop, cartesian_domain, deref, named_range
from gt4py.next.iterator.runtime import fendef, fundef, set_at
from gt4py.next.program_processors.runners import dace, gtfn

from next_tests.unit_tests.conftest import program_processor, run_processor

Expand All @@ -40,18 +39,10 @@ def copy_program(inp, out, size):
)


@pytest.mark.starts_from_gtir_program
def test_prog(program_processor):
program_processor, validate = program_processor

if program_processor in [
gtfn.run_gtfn.executor,
gtfn.run_gtfn_imperative.executor,
gtfn.run_gtfn_with_temporaries.executor,
dace.run_dace_cpu.executor,
]:
# TODO(havogt): Remove, skipped during refactoring to GTIR
edopao marked this conversation as resolved.
Show resolved Hide resolved
pytest.skip("Executor requires to start from fencil.")

isize = 10
inp = gtx.as_field([I], np.arange(0, isize, dtype=np.float64))
out = gtx.as_field([I], np.zeros(shape=(isize,)))
Expand Down
Loading