[Mlir-commits] [mlir] [mlir][vector] Canonicalize/fold 'order preserving' transposes (PR #135841)
Andrzej Warzyński
llvmlistbot at llvm.org
Tue Apr 29 10:18:40 PDT 2025
banach-space wrote:
> > Quite possibly there’s no need to be so strict with "scalable" vectors (thanks for checking!) — let me experiment and confirm, probably tomorrow.
>
> Thanks!
I was able to run all end-to-end tests targeting scalable vectors using your patch (after commenting out both instances of if (`transpose.getType().isScalable())`). Since they all passed, I think it’s safe to remove that guard.
Could you add some dedicated tests for scalable vectors? Also, you’ll want to disable these transformations when encountering scalable unit dims, i.e., `[1]`, since `1` != `[1]`. The presence of scalable unit dims usually points to bigger modeling issues, so I wouldn’t worry about fully solving them here - just make sure they’re tested accordingly.
Lastly, would you mind adding some labels (or block comments) to "vector-transpose.mlir" to separate the tests for `FoldTransposeShapeCastOp` from those for `ShapeCast::fold`?
Thanks again!
https://github.com/llvm/llvm-project/pull/135841
More information about the Mlir-commits
mailing list