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

feat[next]: allow import of Dimensions from modules within gt4py code #1615

Merged
merged 43 commits into from
Aug 29, 2024

Conversation

nfarabullini
Copy link
Contributor

Allow to import module attributes directly in gt4py code, e.g. in domainhere:

    @gtx.program
    def prog(f: gtx.Field[Dims[IDim], float], out: gtx.Field[Dims[IDim], float]):
        field_op(f, out=out, domain={dims.IDim: (0, 8)})

src/gt4py/next/ffront/func_to_past.py Show resolved Hide resolved
src/gt4py/next/ffront/program_ast.py Outdated Show resolved Hide resolved
src/gt4py/next/ffront/program_ast.py Outdated Show resolved Hide resolved
src/gt4py/next/ffront/func_to_past.py Outdated Show resolved Hide resolved
@nfarabullini nfarabullini changed the title Allow import from modules within gt4py code feat [next]: allow import from modules within gt4py code Aug 26, 2024
@nfarabullini nfarabullini requested a review from havogt August 26, 2024 07:16
Copy link
Contributor

@havogt havogt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is also a leftover from the other strategy

src/gt4py/next/type_system/type_translation.py Outdated Show resolved Hide resolved
@nfarabullini nfarabullini requested a review from havogt August 27, 2024 13:51
@nfarabullini nfarabullini requested a review from havogt August 28, 2024 14:51
Copy link
Contributor

@havogt havogt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thanks!

@havogt havogt changed the title feat [next]: allow import from modules within gt4py code feat[next]: allow import of Dimensions from modules within gt4py code Aug 29, 2024
@nfarabullini nfarabullini merged commit 28c1ca8 into GridTools:main Aug 29, 2024
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants