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

Add gtir_python backend #585

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
4 changes: 2 additions & 2 deletions ci/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ include:
- tox -r -e run_stencil_tests -c model/ -- --backend=$BACKEND --grid=$GRID
parallel:
matrix:
- BACKEND: [gtfn_cpu, gtfn_gpu, roundtrip]
- BACKEND: [gtfn_cpu, gtfn_gpu, roundtrip, gtir_python]
GRID: [simple_grid, icon_grid]
rules:
# exclude slow test configurations
- if: $BACKEND == "roundtrip" && $GRID == "icon_grid"
- if: $BACKEND in ["roundtrip", "gtir_python"] && $GRID == "icon_grid"
when: never
- when: on_success
test_model_stencils_x86_64:
Expand Down
3 changes: 3 additions & 0 deletions model/common/src/icon4py/model/common/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
run_gtfn_cached,
run_gtfn_gpu_cached,
)
from gt4py.next.program_processors.runners.roundtrip import gtir as gtir_python


try:
Expand All @@ -44,6 +45,7 @@ class GT4PyBackend(Enum):
CPU = "run_gtfn_cached"
GPU = "run_gtfn_gpu_cached"
ROUNDTRIP = "run_roundtrip"
GTIR_PYTHON = "gtir_python"
DACE_CPU = "run_dace_cpu"
DACE_GPU = "run_dace_gpu"
DACE_CPU_NOOPT = "run_dace_cpu_noopt"
Expand Down Expand Up @@ -83,6 +85,7 @@ def gt4py_runner(self):
GT4PyBackend.CPU.name: run_gtfn_cached,
GT4PyBackend.GPU.name: run_gtfn_gpu_cached,
GT4PyBackend.ROUNDTRIP.name: run_roundtrip,
GT4PyBackend.GTIR_PYTHON.name: gtir_python,
}
if dace:
backend_map |= {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def is_embedded(backend) -> bool:


def is_roundtrip(backend) -> bool:
return backend.name == "roundtrip" if backend else False
return backend.name in ["roundtrip", "gtir_python"] if backend else False


def _shape(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import pytest
from gt4py.next import gtfn_cpu, gtfn_gpu, itir_python
from gt4py.next.program_processors.runners.roundtrip import gtir as gtir_python

import icon4py.model.common.settings as settings
from icon4py.model.common.test_utils.datatest_utils import (
Expand All @@ -21,6 +22,7 @@
backends = {
"embedded": None,
"roundtrip": itir_python,
"gtir_python": gtir_python,
"gtfn_cpu": gtfn_cpu,
"gtfn_gpu": gtfn_gpu,
}
Expand Down
Loading