Skip to content

Commit 0bacffb

Browse files
authored
[mlir][vector] Update tests/patterns for vector.transpose (#91359)
Pretty much all logic that we have today for lowering vector.transpose assumes fixed length vectors (it's done via vector.shuffle that don't support scalable vectors). This patch updates related tests and patterns to capture and document this limitation more explicitly. Note that `vector.transpose` is a valid operation in the context of scalable vectors, but we are yet to implement the missing lowerings. Summary of changes: * `@transpose_nx8x2xf32` is renamed as `@transpose_scalabl`e and moved near other tests using `lowering_strategy = "shuffle_1d" (to avoid duplicating TD sequences) * tests specific to X86 (`avx2_lowering_strategy = true`) are moved to a dedicated file (to separate generic tests from target-specific tests) * `@transpose10_nx4xnx1xf32` duplicated `@transpose10_4xnx1xf32` and was deleted (the latter is renamed as `@transpose10_4x1xf32_scalable` to match its fixed-width counterpart: `@transpose10_4x1xf32`)
1 parent baa5bee commit 0bacffb

File tree

3 files changed

+533
-522
lines changed

3 files changed

+533
-522
lines changed

mlir/lib/Dialect/Vector/Transforms/LowerVectorTranspose.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,7 @@ class TransposeOpLowering : public OpRewritePattern<vector::TransposeOp> {
352352
return success();
353353
}
354354

355+
// TODO: Add support for scalable vectors
355356
if (inputType.isScalable())
356357
return failure();
357358

0 commit comments

Comments
 (0)