feat[next]: Precompilation with static domains#2483
Draft
SF-N wants to merge 7 commits intoGridTools:mainfrom
Draft
feat[next]: Precompilation with static domains#2483SF-N wants to merge 7 commits intoGridTools:mainfrom
SF-N wants to merge 7 commits intoGridTools:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for providing static domain ranges during ahead-of-time compilation so programs decorated with static_domains=True can be precompiled without needing runtime field instances.
Changes:
- Extend
CompiledProgramsPool.compile(...)to optionally constructFieldDomainDescriptorcontexts from user-provided domain ranges. - Plumb a new
static_domainsargument throughProgram.compile(...)to the compiled-program pool. - Add an integration test covering precompilation with static domains for tuple arguments.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| tests/next_tests/integration_tests/feature_tests/ffront_tests/test_compiled_program.py | Adjusts compilation parametrization and adds a new test for precompiling with provided static domains. |
| src/gt4py/next/otf/compiled_program.py | Builds FieldDomainDescriptor argument descriptors from provided static domain ranges during precompilation. |
| src/gt4py/next/ffront/decorator.py | Forwards a new static_domains argument through the public compile() API. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tests/next_tests/integration_tests/feature_tests/ffront_tests/test_compiled_program.py
Outdated
Show resolved
Hide resolved
tests/next_tests/integration_tests/feature_tests/ffront_tests/test_compiled_program.py
Outdated
Show resolved
Hide resolved
tests/next_tests/integration_tests/feature_tests/ffront_tests/test_compiled_program.py
Outdated
Show resolved
Hide resolved
tehrengruber
added a commit
to tehrengruber/gt4py
that referenced
this pull request
Feb 17, 2026
tehrengruber
added a commit
to tehrengruber/gt4py
that referenced
this pull request
Feb 17, 2026
tehrengruber
added a commit
to tehrengruber/gt4py
that referenced
this pull request
Feb 17, 2026
tehrengruber
added a commit
to tehrengruber/gt4py
that referenced
this pull request
Feb 17, 2026
…into static_domain_precompilation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add the option to precompile a program with static domains. Previously this was only supported in JIT mode. Instead of providing the domain of each field argument (which is the format used internally) the user just supplies the range of each dimension which is the most common case. Later we can extend this so that different ranges can be supplied, e.g. for fields that are only defined on a subdomain.
Note that a consequence of this syntax is that it is not possible to have a parameter called
static_domainsand pass a static value to it.