Skip to content

Specialize Rosenbrock stage loops at compile time for GPU optimization - #2121

Open
zingale wants to merge 6 commits into
AMReX-Astro:developmentfrom
zingale:optimize-rosenbrock-stages
Open

zingale wants to merge 6 commits into
AMReX-Astro:developmentfrom
zingale:optimize-rosenbrock-stages

Conversation

@zingale

@zingale zingale commented Oct 30, 2026

Copy link
Copy Markdown
Member

This specializes the Rosenbrock stage loops using amrex::constexpr_for, making stage indices and tableau coefficients available at compile time. It replaces runtime stage-vector selection and eliminates zero-coefficient terms while preserving early rejection and leaving species loops unchanged.

implemented by codex

This specializes the Rosenbrock stage loops using amrex::constexpr_for,
making stage indices and tableau coefficients available at compile time.
It replaces runtime stage-vector selection and eliminates zero-coefficient
terms while preserving early rejection and leaving species loops unchanged.
@zingale

zingale commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

this gives a small, but consistent speed-up. Plus the code is much cleaner.

@zingale

zingale commented Nov 1, 2026

Copy link
Copy Markdown
Member Author

@BenWibking I saw a 3% speed-up with CUDA with these changes.

This branch has not been deployed

No deployments
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