Skip to content
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

Hoist and precompute common variables #2673

Merged
merged 3 commits into from
Feb 14, 2024
Merged

Hoist and precompute common variables #2673

merged 3 commits into from
Feb 14, 2024

Conversation

charleskawczynski
Copy link
Member

@charleskawczynski charleskawczynski commented Feb 13, 2024

This PR hoists and precomputes ᶜgradᵥ_θ_virt,ᶜgradᵥ_q_tot,ᶜgradᵥ_θ_liq_ice, to simplify some very expensive kernels. A step towards #2530.

Let's see how the flame graph updates with this PR.

The flame graphs show an improvement with the kernel but, more interestingly, the gradient-interpolations are pretty expensive. Since this PR hoists those computations, this PR should be more performant since those computations are repeated in the main branch. We should probably look into the performance of the gradient-interpolations, but we can also merge this in case we can't improve it as much as we hoped.

Copy link
Member

@szy21 szy21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

src/cache/precomputed_quantities.jl Outdated Show resolved Hide resolved
src/cache/precomputed_quantities.jl Outdated Show resolved Hide resolved
Pass thermo state, apply formatter

Fixes

Use Covariant3Vector

Fixes

Remove reuse of variable name
@charleskawczynski charleskawczynski added this pull request to the merge queue Feb 14, 2024
Merged via the queue into main with commit a9a2f33 Feb 14, 2024
11 checks passed
@charleskawczynski charleskawczynski deleted the ck/hoist branch February 14, 2024 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants