llvm-project
24b8bb18 - [mlir][vector] Migrate drop-lead-unit-dim to shape_cast (#196206)

Commit
12 days ago
[mlir][vector] Migrate drop-lead-unit-dim to shape_cast (#196206) Post-merge discussion on #195686 led to the conclusion that we should change the behavior of drealeadunitdim to use shape_cast instead of extracts and broadcasts since those are now the canonical form of such unit-dimension striping. This commit implements that change. The one exception is that vector contractions where the accumulator is reduced to a scalar still use extract/broadcast. Said contract handling also now omits any vector.transpose emissions since those are all order-preserving and will fold into shape_casts. The PR adds tests to ensure that scalable dimensions function correctly, per previous PR comments. They should already have worked, but they weren't tested. AI: Codex 5.5 did most of the work on this one.
Author
Parents
Loading