feature: DataDimensionsField as argument to functions#507
Conversation
This PR adds support for data dimension fields as type annotations in functions (as we can do in stencils). This PR depends on the following gt4py feature GridTools/gt4py#2708. I have updated that submodule in this PR to show how it will look like, but this PR will be in a draft state until the corresponding gt4py PR is merged.
|
@CharlesKrop can you look at example usage in |
twicki
left a comment
There was a problem hiding this comment.
just as a written trace of our discussion this morning:
- The typehints are as far as we know dropped anyways, so we can make the function drop it so it does not bother the user? Or should we start caring about them?
- Typehints of tempoaries are VERY limited in functions, so changing this would never affect that
|
More info on what actually complains: the gtscript parser restricts arguments of functions and stencils to Since markup types aren't resolved at python parsing time (when the decorator kicks of function annotation), we end up with More info to follow after lunch. Happy to discuss again. |
|
Seconds attempt on |
982003a to
00821b5
Compare
|
Investigated the sudden increase in time it takes to parse / simplify (i.e. orchestrated acoustics took almost 5h (instead of the usual 30min) in this run after updating dace/gt4py). slowdown seems to be due to a new simplify pass |
|
Just getting back to this now, sorry for the delay. Looks like your tests cover #504 pretty well |
Thanks for checking. And no worries, the PR is anyway blocked by downstream changes that need to be merged in GT4Py first. |
Description
🧱 blocked by
LiftTrivalIfinsdfg.simplify()pipeline GridTools/gt4py#2710with the following todos left
LiftTrivialIfspass in NDSL calls tosdfg.simplify()This PR adds support for data dimension fields as type annotations in functions (as we can do in stencils).
This PR depends on the following gt4py feature GridTools/gt4py#2708. I have updated that submodule in this PR to show how it will look like, but this PR will be in a draft state until the corresponding gt4py PR is merged.
Related issue: #504
How has this been tested?
New test cases added.
Checklist
Depends on feat[cartesian]: lazy annotated gtscript functions GridTools/gt4py#2708.