From 20e30f70d9ce3b6837535e15034076b3b05bc162 Mon Sep 17 00:00:00 2001 From: Till Ehrengruber Date: Thu, 29 Feb 2024 17:26:27 +0100 Subject: [PATCH 1/5] Fix `uses_icon_grid_with_otf` fixture that broke with gt4py#1470 --- .../common/src/icon4py/model/common/test_utils/helpers.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/model/common/src/icon4py/model/common/test_utils/helpers.py b/model/common/src/icon4py/model/common/test_utils/helpers.py index e8f966d423..d550127491 100644 --- a/model/common/src/icon4py/model/common/test_utils/helpers.py +++ b/model/common/src/icon4py/model/common/test_utils/helpers.py @@ -20,10 +20,7 @@ from gt4py._core.definitions import is_scalar_type from gt4py.next import as_field, common as gt_common, constructors from gt4py.next.ffront.decorator import Program -from gt4py.next.program_processors.otf_compile_executor import ( - CachedOTFCompileExecutor, - OTFCompileExecutor, -) +import gt4py.next.program_processors.modular_executor from ..grid.base import BaseGrid from ..grid.icon import IconGrid @@ -244,7 +241,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, CachedOTFCompileExecutor)): + if isinstance(backend.executor, modular_executor.ModularExecutor): return True try: from gt4py.next.program_processors.runners import dace_iterator From ee3c41aa4d35d1306f4dd979fa04cf8a14ee4e6a Mon Sep 17 00:00:00 2001 From: Till Ehrengruber Date: Thu, 29 Feb 2024 17:55:42 +0100 Subject: [PATCH 2/5] Fix format and typo --- model/common/src/icon4py/model/common/test_utils/helpers.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/model/common/src/icon4py/model/common/test_utils/helpers.py b/model/common/src/icon4py/model/common/test_utils/helpers.py index d550127491..0a75a932db 100644 --- a/model/common/src/icon4py/model/common/test_utils/helpers.py +++ b/model/common/src/icon4py/model/common/test_utils/helpers.py @@ -14,13 +14,13 @@ from dataclasses import dataclass, field from typing import ClassVar, Optional +import gt4py.next.program_processors.modular_executor import numpy as np import numpy.typing as npt import pytest from gt4py._core.definitions import is_scalar_type from gt4py.next import as_field, common as gt_common, constructors from gt4py.next.ffront.decorator import Program -import gt4py.next.program_processors.modular_executor from ..grid.base import BaseGrid from ..grid.icon import IconGrid @@ -241,7 +241,9 @@ 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, modular_executor.ModularExecutor): + if isinstance( + backend.executor, gt4py.next.program_processors.modular_executor.ModularExecutor + ): return True try: from gt4py.next.program_processors.runners import dace_iterator From 6914e8f31d5b932624ca6a42dda25128de0aa183 Mon Sep 17 00:00:00 2001 From: Till Ehrengruber Date: Thu, 29 Feb 2024 23:32:03 +0100 Subject: [PATCH 3/5] Small fix --- model/common/tests/metric_tests/conftest.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/model/common/tests/metric_tests/conftest.py b/model/common/tests/metric_tests/conftest.py index 4701c6c7a5..835c59e530 100644 --- a/model/common/tests/metric_tests/conftest.py +++ b/model/common/tests/metric_tests/conftest.py @@ -10,8 +10,8 @@ # distribution for a copy of the license or check . # # SPDX-License-Identifier: GPL-3.0-or-later +import gt4py.next.program_processors.modular_executor.ModularExecutor import pytest -from gt4py.next.program_processors.otf_compile_executor import OTFCompileExecutor from icon4py.model.common.test_utils.datatest_fixtures import ( # noqa: F401 # import fixtures from test_utils package data_provider, @@ -37,6 +37,8 @@ def is_otf(backend) -> bool: # noqa : F811 # fixture is used in the test # - cannot run on embedded: because of slicing # - roundtrip is very slow on large grid if hasattr(backend, "executor"): - if isinstance(backend.executor, OTFCompileExecutor): + if isinstance( + backend.executor, gt4py.next.program_processors.modular_executor.ModularExecutor + ): return True return False From 8fdc94a9f6d3208991c7bb72af85b6a0e5dcc1da Mon Sep 17 00:00:00 2001 From: Edoardo Paone Date: Fri, 1 Mar 2024 09:01:56 +0100 Subject: [PATCH 4/5] Uplift gt4py-stable spack version --- spack/gt4py-stable/spack.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spack/gt4py-stable/spack.yaml b/spack/gt4py-stable/spack.yaml index 25e7c4801c..6fad1165ed 100644 --- a/spack/gt4py-stable/spack.yaml +++ b/spack/gt4py-stable/spack.yaml @@ -1,10 +1,10 @@ spack: specs: - - py-icon4py@main%gcc@9.3.0 ^py-gt4py@1.0.3.2%gcc@9.3.0 + - py-icon4py@main%gcc@9.3.0 ^py-gt4py@1.0.3.3%gcc@9.3.0 view: false concretizer: unify: true develop: py-icon4py: - spec: py-icon4py@main%gcc@9.3.0 ^py-gt4py@1.0.3.2%gcc@9.3.0 + spec: py-icon4py@main%gcc@9.3.0 ^py-gt4py@1.0.3.3%gcc@9.3.0 path: ../../ From bfd160ac5ac046ab9a527d2614e1ba92e71ed5bc Mon Sep 17 00:00:00 2001 From: Edoardo Paone Date: Fri, 1 Mar 2024 09:48:39 +0100 Subject: [PATCH 5/5] Fix import --- model/common/tests/metric_tests/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/common/tests/metric_tests/conftest.py b/model/common/tests/metric_tests/conftest.py index 835c59e530..262199cde7 100644 --- a/model/common/tests/metric_tests/conftest.py +++ b/model/common/tests/metric_tests/conftest.py @@ -10,7 +10,7 @@ # distribution for a copy of the license or check . # # SPDX-License-Identifier: GPL-3.0-or-later -import gt4py.next.program_processors.modular_executor.ModularExecutor +import gt4py.next.program_processors.modular_executor import pytest from icon4py.model.common.test_utils.datatest_fixtures import ( # noqa: F401 # import fixtures from test_utils package