-
Notifications
You must be signed in to change notification settings - Fork 0
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
Optimizations on the loop blocking #1
Conversation
…ed address space" because of __ldg on array
99ad0e6
to
2d2a97f
Compare
…st and avoid reading fields that are independent of the vertical level in each iteration
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.
Once everything works and is ready, I would actually suggest to open two separate PRs on the main GT repo: one with the SID neighbor table updates and the other one with as_const_sid
as both are quite independent.
For as_const_sid
a test would also be appreciated.
Just checked the nanobind documentation and saw that there is a |
Improvements in `sid` handling as `const` in `as_neighbor_table` Co-authored-by: Felix Thaler <[email protected]>
Good point 👍 I guess something like the last commit together with https://github.com/GridTools/icon_structured_benchmark/compare/main...gtfn_improvements would also make sense? In the bindings I've only added |
Superseded by GridTools#1808 and GridTools#1809 |
as_const_sid
fornanobind_adapter
to be able to pass the input fields asconst
and allow the compiler to apply optimizations like avoiding reading vertically independent fields in every k loop iteration (based on Felix's suggestion)as_sid
fromas_const_sid
by adding abool
template parameter toas_sid
and depending on that calladd_const
due to the variadic parameters. Maybe try and find a way to make it better?The idea behind
as_const_sid
is to be called by thenanobind
bindings generated bygt4py
only for the input fields. Some extra work is necessary for that.