Improve performance of kernel on L1013 of ClimaAtmos `set_microphysics_tendency_cache!`
- Dominant language
- Julia
- Stars
- 117
- Forks
- 19
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 41
Description
```julia
@. ᶜmp_tendency⁰ = microphysics_tendencies_1m(
BMT.Microphysics1Moment(), sgs_quad, cmp, thp, ᶜρ⁰, ᶜT⁰,
ᶜq_tot_nonneg⁰, ᶜq_lcl⁰, ᶜq_icl⁰, ᶜq_rai⁰, ᶜq_sno⁰,
ᶜT′T′, ᶜq′q′, corr_Tq, ᶜsgs_moments.λ_lagrange, α,
dt, nsubs_quad, ᶜλ⁰, ᶜmu_S⁰,
)
```
As of now, this kernel is 18% of the flagship AMIP GPU time.
Putting this issue in ClimaCore so we can attempt to solve it as low as possible in the stack.
## Potential solutions
1. CUDA launch bounds instead of max regs (#2601)
2. Kernel fusion, noinlining in CloudMicrophysics (https://github.com/CliMA/CloudMicrophysics.jl/pull/769)
3. `foreach_point` macro (https://github.com/CliMA/ClimaAtmos.jl/issues/4745)
4. Reduce SGS quadrature order from 3 to 2
## Experiments
My experiment index is [here](https://calkit.io/petebachant/clima-gpu-profiling/tables?path=experiments.csv).
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.