Skip to content

Conversation

@vectorflux
Copy link
Contributor

@vectorflux vectorflux commented Sep 18, 2025

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:

  • back to a gt4py release
  • precipitation fields should be horizontal only -> multiple output domains

Comment on lines 322 to 325
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
Copy link
Contributor

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

Suggested change
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?

Copy link
Contributor

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

Copy link
Contributor

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.

Copy link
Contributor

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.

havogt and others added 5 commits January 21, 2026 11:06
`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.
havogt added a commit that referenced this pull request Jan 26, 2026
This extracts icon4py infrastructure changes from #877.

Changes:
- extract `download_test_data` function
- allow stencil tests to allocate fields for named collections
@havogt
Copy link
Contributor

havogt commented Jan 30, 2026

cscs-ci run dace

@havogt
Copy link
Contributor

havogt commented Jan 30, 2026

cscs-ci run default

@github-actions
Copy link

Mandatory Tests

Please make sure you run these tests via comment before you merge!

  • cscs-ci run default
  • cscs-ci run distributed

Optional Tests

To run benchmarks you can use:

  • cscs-ci run benchmark-bencher

To run tests and benchmarks with the DaCe backend you can use:

  • cscs-ci run dace

To run test levels ignored by the default test suite (mostly simple datatest for static fields computations) you can use:

  • cscs-ci run extra

For more detailed information please look at CI in the EXCLAIM universe.

@havogt
Copy link
Contributor

havogt commented Jan 30, 2026

cscs-ci run default

@havogt
Copy link
Contributor

havogt commented Jan 30, 2026

cscs-ci run dace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants