-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into extend_remap_embedded
- Loading branch information
Showing
6 changed files
with
40 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
tests/next_tests/integration_tests/feature_tests/ffront_tests/test_decorator.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |