Raising: canonicalize maps before permutation matching; while fallback for constant-bound loops - #2998
Open
wsmoses wants to merge 1 commit into
Open
Raising: canonicalize maps before permutation matching; while fallback for constant-bound loops#2998wsmoses wants to merge 1 commit into
wsmoses wants to merge 1 commit into
Conversation
…k for constant-bound loops An eliminated unit axis leaves an unused dim behind in the yielded value's map, which failed the memory-equivalence permutation against the carried arg; canonicalize both maps first. And when lockstep and unrolling both fail on a constant-bound loop (accumulators chained through nested reductions, mfem's EA mass assembly), fall back to the sequential while raise regardless of the preference. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016zErYp7upmqr4NHfhod9UD
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.
Two fixes that let mfem's EA mass-assembly kernels (7³ per-thread loop nests around chained 8×8 reductions) raise (#2968):
memoryEquivalentPermutationfailed when an eliminated unit axis left an unused dim behind in the yielded value's map — the while raise then rejected a carried accumulator whose map was memory-equivalent up to dead dims. Canonicalize both maps (drop unused dims/operands) before matching.affine.for(the chained-accumulator nests defeat both), fall back to the sequential while raise even underprefer_while_raising=false.With these,
bilininteg_mass_ea,hdiv_kernels,hcurl_kernels,elasticity_kernels,mixedvecgrad_pa, andconvection_eaall raise strict; the raising lit suite is unchanged.🤖 Generated with Claude Code
https://claude.ai/code/session_016zErYp7upmqr4NHfhod9UD