[Mlir-commits] [mlir] [mlir][Vector] Fix out-of-bounds crash unrolling create_mask/constant_mask with rank-mismatched native shape (PR #217514)
Aman Singh
llvmlistbot at llvm.org
Fri Sep 4 23:09:13 PDT 2026
amanyagami wrote:
@banach-space ping — the rework you and @hamzaqureshi5 landed on is in as of `d2ce61c0` (28 Aug), so this is waiting on a re-review.
Both parts you asked for are implemented: `padTargetShapeToRank` left-pads the target shape with unit dimensions to match the op rank (the approach you preferred over the rank guard, matching `UnrollElementwisePattern`), and `UnrollConstantMaskPattern` normalizes a tile that falls entirely outside the mask to all-zeros, which fixes the `expected all mask dim sizes to be zeros` rejection @hamzaqureshi5 reproduced with `vector.constant_mask [8, 8] : vector<16x16xi1>`.
Tests cover that exact repro plus the rank-mismatched interaction of the two. clang-format is green and the PR is `clean`.
Thanks @hamzaqureshi5 for working the approach out — happy to add you as co-author on the commit if you would like.
https://github.com/llvm/llvm-project/pull/217514
More information about the Mlir-commits
mailing list