fix(vmi): materialize packed group-slot widening - #1230
Open
Zhendong404 wants to merge 1 commit into
Open
Conversation
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.
Summary
group_slotswidening withvcvtpartition streams and register interleavesScope
This PR fixes the lowering required to express the ASC-style group-result conversion/store sequence. It does not rewrite the #1209 reproducer end to end or establish an A5 performance result by itself.
Root cause
A grouped BF16 reduction produces compact
group_slotsvalues. Widening those values partitions compact source lanes (EVEN/ODDfor 2x,P0..P3for 4x); the old lowering had no legal materialization that restored their original lane order before a group store.The current #1209 VMI fixture works around this limitation by widening the full
abs_bitsvector to f32 and running a second f32 group reduction forscale_out. ASC instead reuses the BF16 grouped maximum directly (vcgmax -> bitcast -> vcvt PART_EVEN -> store). Thus this PR removes the lowering blocker, but the fixture must still be rewritten to consume the original group maximum before the VMI source algorithm aligns with ASC.Lowering
vcvt EVEN,vcvt ODD, thenvintlv.lowvcvt P0..P3, then threevintlv.lowoperationsslots=1remains on the existing sparse path and is deliberately excluded.Validation
ninjabuildllvm-lit7 focused VMI tests, all passedgit diff --checkRelates to #1209.