Repository navigation
AMR: derive amr_device_pack for every AMR case - #2412
Draft
sbryngelson wants to merge 1 commit into
Draft
sbryngelson wants to merge 1 commit into
sbryngelson wants to merge 1 commit into
Conversation
The toolchain enabled the fused coarse-patch pack/unpack only for amr_max_grid_size in 1..64, so the default (0, block cap derived from the decomposition) always used one kernel launch per transfer. The fused path is faster at every size measured on Frontier MI250X: 8 GPUs 3.48 -> 3.38 s, 64 GPUs 3.91 -> 3.56 s, 512 GPUs 5.47 -> 4.59 s (AMR blast, 40 steps). An explicit amr_device_pack = F still wins.
|
Claude Code Review Head SHA: dd120cf Files changed:
Findings: |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AI-assisted (Claude Code). Part of #2247.
What
The toolchain derives
amr_device_pack = T(one fused pack/unpack kernel per stage for the coarse-patch exchange, instead of one kernel launch per transfer) for every AMR case that leaves it unset. Before, it did so only whenamr_max_grid_sizewas set to 1..64, so the defaultamr_max_grid_size = 0(block cap derived from the decomposition) always took the per-transfer path. An explicitamr_device_pack = Fis still respected, and the derivation still goes through the validator.amr.md,case.mdand the unit test are updated.Why
Found while tracing why the tiling follow-up to #2381 was slower at 512 GPUs: the coarse-patch gather grew with the number of level-1 blocks (5.4 ms per fill at 343 blocks, 11 ms at 512, 16-29 ms at ~1000), because the few ranks under the refined region launch one pack kernel per slab per receiving block. The fused path removes that. The 64-cell limit came in with #2117 without a recorded reason, and the large blocks of the 8-GPU run below are faster fused too.
How it was checked
Frontier MI250X, OpenMP offload (amdflang),
--case-optimization, AMR blast case (--gbpp 16, 40 steps), step-loop wall, one run each,amr_max_grid_size = 0:At 512 GPUs the gather phase drops from 0.90 to 0.35 s (mean per rank).
This branch (master 7982f2d + this change): the
AMRtest group passes on Frontier, GPU (--gpu mp, 118 passed, 0 failed) and CPU (118 passed, 0 failed), against the existing goldens, now that every AMR test takes the fused path.toolchain/mfc/test_case_validator.pypasses (199), and the updated test failed before the change../mfc.sh precheckpasses.Not checked
Made with Claude Code.