-
Notifications
You must be signed in to change notification settings - Fork 59
feat[next]: Add support for tuple comprehensions (not stacked) #2487
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
Closed
Closed
Changes from 28 commits
Commits
Show all changes
91 commits
Select commit
Hold shift + click to select a range
1b4707c
Tracer prototype
SF-N 902f8a3
Merge branch 'main' into tracer_support
SF-N 02f881f
Introduce GTIR tree_map builtin and transform to make_tuple, also sup…
SF-N 0ec4692
Run pre-commit and fix some tests
SF-N ab84ecc
Run CollapseTuple after UnrollTreeMap
SF-N 36d6956
Merge branch 'main' into tracer_support_tree_map
SF-N 152300e
Address review comments
SF-N d459b0e
Address further review comments
SF-N 5c4b018
Merge remote-tracking branch 'origin/main' into tracer_support
tehrengruber 97af81e
Apply review comments
SF-N 8d75708
Merge branch 'main' into tracer_support_tree_map
SF-N 0dfc80c
Add support for nested tuples
tehrengruber 067bc29
Merge branch 'main' into tracer_support_tree_map
SF-N b771d66
Improve testing, typing, formatting
tehrengruber 08ed490
Fix name shadowing
tehrengruber 9e23d2d
Cleanup
tehrengruber 97235d9
More fixes and commentary
tehrengruber dd30833
Fix failing tests
tehrengruber 15b233e
Add test for calling a fo from a tuple comprehension
tehrengruber 4f0b5d4
Fix format
tehrengruber b27f80b
Fix format
tehrengruber b69d700
Merge remote-tracking branch 'origin/main' into tracer_support
tehrengruber 24f4c90
Small fix
tehrengruber 32e5b2d
Rename map_ -> map_list
SF-N a7175d7
Run pre-commit
SF-N 4f89818
Merge branch 'main' into tracer_support_tree_map
SF-N 2779fd0
Refactor tree_map_tuple and add map_tuple with unrolling support
SF-N 80f3273
Rename
SF-N 454e15f
Minor fix
SF-N 55f1799
Minor fixes
SF-N 12dfecb
Some more fixes wrt. Copilot review
SF-N fc6b1cb
Merge branch 'main' into tracer_support
SF-N 8a1febd
Merge branch 'main' into tracer_support_tree_map
SF-N 31b969a
Remove unnecessary CollapseTuple loop
SF-N c7fc102
Reposition UnrollTupleMaps and simplify CollapseTuple usage
SF-N 7993b9c
Merge branch 'main' into tracer_support_tree_map
SF-N b7f8ba9
Refactor tree_map unrolling
SF-N 3d38868
Cleanup
SF-N 7d5c86c
Revert "Cleanup"
SF-N 747f36e
Revert "Refactor tree_map unrolling"
SF-N b767700
Cleanup
SF-N e91f1f1
Merge branch 'origin-main' into tracer_support_tree_map
SF-N 9f3474d
Enhance tuple comprehension handling with fixed-length mappers
SF-N 7b270a3
Address review comment
SF-N d3d4e46
Remove CollapseTuple pass after UnrollTupleMaps
SF-N d0272df
Remove program wrapper in tests
SF-N 56f234e
Merge branch 'tracer_support_tree_map' of github.com:SF-N/gt4py into …
SF-N b7bb0b2
Fix test
SF-N 00e077c
Refactor TupleComprehension lowering
SF-N 6a5a980
Fix mypy issues
SF-N e55253b
Cleanup
SF-N 4fbac27
Further refactor to get rid of FixedTupleComprehension
SF-N 7a41dda
Fix test_with_tuples_of_local_fields
SF-N e73cb27
Exclude fixed-length tuples with heterogeneous elements to avoid dupl…
SF-N dc354d9
Further refactoring
SF-N d864531
Remove not implemented case
SF-N 08d06a1
Merge branch 'main' into tracer_support
SF-N 158d540
Merge branch 'main' into tracer_support_tree_map
SF-N 7d8f56c
Also allow itir.Expr in UnrollTupleMaps and run tye_inference when ne…
SF-N 7808b0f
Merge branch 'tracer_support_tree_map' of github.com:SF-N/gt4py into …
SF-N 556178f
Merge branch 'main' into tracer_support_tree_map
SF-N 01e2754
Merge branch 'main' into tracer_support
SF-N aed9577
Merge branch 'main' into tracer_support_tree_map
SF-N bbf0679
Merge branch 'main' into tracer_support_tree_map
SF-N 5102336
Merge branch 'main' into tracer_support_tree_map
SF-N c6d5a2d
Address review comments
SF-N 242343f
Merge branch 'main' into tracer_support_tree_map
SF-N 06d56ee
Merge branch 'tracer_support_tree_map' of github.com:SF-N/gt4py into …
SF-N 3f24c06
Update test
SF-N 904623b
Run pre-commit
SF-N a2da186
Merge branch 'main' into tracer_support_tree_map
SF-N 9205669
Remove special casing from UnrollTupleMaps and update tests
SF-N 349d239
Merge branch 'main' into tracer_support_tree_map
SF-N 9b610b4
Merge branch 'main' into tracer_support_tree_map
SF-N 7e7bde5
Apply review comments
SF-N 2c15948
Apply further review comments
SF-N fb724d3
Remove support for tre_map_tuple with multi-args
SF-N a7ff65a
Apply review comments
SF-N dc59b75
Rename filename unroll -> expand
SF-N 3b0b4c3
Minor fixes
SF-N 9ab7df4
Merge branch 'main' into tracer_support_tree_map
SF-N b96652e
Merge branch 'tracer_support_tree_map' into tracer_support
SF-N a670352
Fix merge issues
SF-N fced926
Merge branch 'main' into tracer_support
SF-N 502ae5c
Merge branch 'main' into tracer_support
SF-N ef504e6
Merge branch 'main' into tracer_support
SF-N e9b8ec2
Merge commit 'bfe883c161cf229751cdc4e32713a00bdbbd7ac8' into tracer_s…
tehrengruber 6d5aab9
Adapt branch code to conventions introduced on main
tehrengruber 4957eb2
Merge branch 'main' of https://github.com/GridTools/gt4py into tracer…
tehrengruber d700c31
Remove 'target: Any' workaround in TupleComprehensionMapper
tehrengruber ccc0722
Merge branch 'main' into tracer_support
SF-N File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for direct access to
tracers[0] * factor, tracers[1] * factor, which I personally think is an anti pattern. I left it here until we take a decision on this. We could also make it an optional feature. One of the disadvantages is that it is not possible to fully type check the field operator at definition time, since the tuple length is only known at call / compile time. The user will then get an error inunroll_map_tuple.