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

Import gtfn backends exposed by next module (cached version) #361

Merged
merged 14 commits into from
Feb 16, 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
7 changes: 5 additions & 2 deletions model/common/src/icon4py/model/common/test_utils/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
from gt4py.next import common as gt_common
from gt4py.next import constructors
from gt4py.next.ffront.decorator import Program
from gt4py.next.program_processors.otf_compile_executor import OTFCompileExecutor
from gt4py.next.program_processors.otf_compile_executor import (
CachedOTFCompileExecutor,
OTFCompileExecutor,
)

from ..grid.base import BaseGrid
from ..grid.icon import IconGrid
Expand Down Expand Up @@ -242,7 +245,7 @@ def uses_icon_grid_with_otf(backend, grid):
Is needed to skip certain stencils where the execution domain needs to be restricted or boundary taken into account.
"""
if hasattr(backend, "executor") and isinstance(grid, IconGrid):
if isinstance(backend.executor, OTFCompileExecutor):
if isinstance(backend.executor, (OTFCompileExecutor, CachedOTFCompileExecutor)):
edopao marked this conversation as resolved.
Show resolved Hide resolved
return True
return False

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
import os

import pytest
from gt4py.next.program_processors.runners.gtfn import run_gtfn, run_gtfn_gpu
from gt4py.next.program_processors.runners.roundtrip import backend as run_roundtrip
from gt4py.next import gtfn_cpu, gtfn_gpu, itir_python


def pytest_configure(config):
Expand Down Expand Up @@ -89,9 +88,9 @@ def pytest_generate_tests(metafunc):

backends = {
"embedded": None,
"roundtrip": run_roundtrip,
"gtfn_cpu": run_gtfn,
"gtfn_gpu": run_gtfn_gpu,
"roundtrip": itir_python,
"gtfn_cpu": gtfn_cpu,
"gtfn_gpu": gtfn_gpu,
}
gpu_backends = ["gtfn_gpu"]

Expand Down
Loading