-
Notifications
You must be signed in to change notification settings - Fork 8
Muphys bug fix: drivers run_graupel_only and run_full_muphys #877
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
base: main
Are you sure you want to change the base?
Conversation
…merge' into muphys_bug_fix
35d058f to
3752592
Compare
...s/muphys/src/icon4py/model/atmosphere/subgrid_scale_physics/muphys/driver/run_full_muphys.py
Outdated
Show resolved
Hide resolved
Clean up the graupel_only driver, and create an integration test to run through pytest. Co-authored-by: Will Sawyer <wsawyer@cscs.ch>
Co-authored-by: Edoardo Paone <edoardo.paone@cscs.ch>
| mask = (maximum(q.c, maximum(q.g, maximum(q.i, maximum(q.r, q.s)))) > g_ct.qmin) | ( | ||
| (t < g_ct.tfrz_het2) & (q.v > _qsat_ice_rho(t, rho)) | ||
| ) | ||
| is_sig_present = maximum(q.g, maximum(q.i, q.s)) > g_ct.qmin |
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.
I would be interested in the performance of
| mask = (maximum(q.c, maximum(q.g, maximum(q.i, maximum(q.r, q.s)))) > g_ct.qmin) | ( | |
| (t < g_ct.tfrz_het2) & (q.v > _qsat_ice_rho(t, rho)) | |
| ) | |
| is_sig_present = maximum(q.g, maximum(q.i, q.s)) > g_ct.qmin | |
| mask = True | |
| is_sig_present = True |
Is there a constant folding pass in our dace pipeline that would completely eliminate the conditionals on these variables?
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.
Wouldn't such a pass already be on IR level, by passing the constant values as static args? Anyway, there is also a way to do it on the SDFG level in the dace backend, but we need to pass the constant values into the backend, see https://github.com/GridTools/gt4py/blob/22d9ab9988eab06c2fa7918fc817577f72c8be5a/src/gt4py/next/program_processors/runners/dace/workflow/translation.py#L392
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.
I don't understand the question.
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.
We can ignore my question, now I understand better your original question. The dace backend runs apply_fieldview_transforms, which calls dead_code_elimination. The latter uses the constant folding pass. So, to answer your question: yes, there is a constant folding pass in our dace pipeline.
`dz` was computed in the precision of the input file, therefore graupel did not verify to f64 precision for f32 input files.
... and enable it for the graupel_only test and driver.
This extracts icon4py infrastructure changes from #877. Changes: - extract `download_test_data` function - allow stencil tests to allocate fields for named collections
Co-authored-by: Edoardo Paone <edoardo.paone@cscs.ch>
|
cscs-ci run dace |
|
cscs-ci run default |
|
Mandatory Tests Please make sure you run these tests via comment before you merge!
Optional Tests To run benchmarks you can use:
To run tests and benchmarks with the DaCe backend you can use:
To run test levels ignored by the default test suite (mostly simple datatest for static fields computations) you can use:
For more detailed information please look at CI in the EXCLAIM universe. |
|
cscs-ci run default |
|
cscs-ci run dace |
This PR addresses minor deficiencies in the graupel and saturation_adjustment GT4Py programs, which might influence performance, but more importantly in the run_graupel_only.py and run_full_muphys.py drivers which call them. These were restructured to improve performance, in particular by performing a set-up of both programs in the initialization step.
TODOs: