Skip to content

Commit

Permalink
Merge branch 'main' into extend_remap_embedded
Browse files Browse the repository at this point in the history
  • Loading branch information
egparedes committed Apr 10, 2024
2 parents e8f41aa + 609a5c9 commit 5b62b38
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 5 deletions.
2 changes: 1 addition & 1 deletion constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ mypy==1.9.0 # via -r requirements-dev.in
mypy-extensions==1.0.0 # via black, mypy
nanobind==1.9.2 # via gt4py (pyproject.toml)
nbclient==0.6.8 # via nbmake
nbformat==5.10.3 # via jupytext, nbclient, nbmake
nbformat==5.10.4 # via jupytext, nbclient, nbmake
nbmake==1.5.3 # via -r requirements-dev.in
nest-asyncio==1.6.0 # via ipykernel, nbclient
networkx==3.1 # via dace
Expand Down
2 changes: 1 addition & 1 deletion min-extra-requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,6 @@ tabulate==0.8.10
tomli==2.0.1; python_version < "3.11"
tox==3.2.0
types-all==1.0.0
typing-extensions==4.6.0
typing-extensions==4.10.0
xxhash==1.4.4
##[[[end]]]
2 changes: 1 addition & 1 deletion min-requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,6 @@ tabulate==0.8.10
tomli==2.0.1; python_version < "3.11"
tox==3.2.0
types-all==1.0.0
typing-extensions==4.6.0
typing-extensions==4.10.0
xxhash==1.4.4
##[[[end]]]
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ mypy==1.9.0 # via -c constraints.txt, -r requirements-dev.in
mypy-extensions==1.0.0 # via -c constraints.txt, black, mypy
nanobind==1.9.2 # via -c constraints.txt, gt4py (pyproject.toml)
nbclient==0.6.8 # via -c constraints.txt, nbmake
nbformat==5.10.3 # via -c constraints.txt, jupytext, nbclient, nbmake
nbformat==5.10.4 # via -c constraints.txt, jupytext, nbclient, nbmake
nbmake==1.5.3 # via -c constraints.txt, -r requirements-dev.in
nest-asyncio==1.6.0 # via -c constraints.txt, ipykernel, nbclient
networkx==3.1 # via -c constraints.txt, dace
Expand Down
2 changes: 1 addition & 1 deletion src/gt4py/next/ffront/decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def itir(self) -> itir.FencilDefinition:
kwargs={},
)
if self.backend is not None and self.backend.transformer is not None:
return self.backend.transformer.past_to_itir(no_args_past)
return self.backend.transformer.past_to_itir(no_args_past).program
return past_to_itir.PastToItirFactory()(no_args_past).program

def __call__(self, *args, offset_provider: dict[str, Dimension], **kwargs: Any) -> None:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# GT4Py - GridTools Framework
#
# Copyright (c) 2014-2023, ETH Zurich
# All rights reserved.
#
# This file is part of the GT4Py project and the GridTools framework.
# GT4Py is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or any later
# version. See the LICENSE.txt file at the top-level directory of this
# distribution for a copy of the license or check <https://www.gnu.org/licenses/>.
#
# SPDX-License-Identifier: GPL-3.0-or-later
# TODO(dropd): Remove as soon as `gt4py.next.ffront.decorator` is type checked.
from gt4py import next as gtx
from gt4py.next.iterator import ir as itir

from next_tests.integration_tests import cases
from next_tests.integration_tests.cases import cartesian_case
from next_tests.integration_tests.feature_tests.ffront_tests.ffront_test_utils import (
exec_alloc_descriptor,
)


def test_program_itir_regression(cartesian_case):
@gtx.field_operator(backend=None)
def testee_op(a: cases.IField) -> cases.IField:
return a

@gtx.program(backend=None)
def testee(a: cases.IField, out: cases.IField):
testee_op(a, out=out)

assert isinstance(testee.itir, itir.FencilDefinition)
assert isinstance(testee.with_backend(cartesian_case.executor).itir, itir.FencilDefinition)

0 comments on commit 5b62b38

Please sign in to comment.