[Mlir-commits] [mlir] [mlir][vector] Test that transpose folds keep per-dim info (PR #219611)

Jianhui Li llvmlistbot at llvm.org
Fri Aug 28 22:28:11 PDT 2026


================

----------------
Jianhui-Li wrote:

Not sure I understand the intent of test case: if it is to test whether the fold impacts the tag propagation, my understand is that the test should attach the dim_tags at the first op, and then check the dim_tags of the final output.  
// CHECK-SAME: propagated_tags = array<i64: 111, 111, 111>
%0 = vector.shape_cast %arg0 : vector<4xf32> to vector<4x1x1xf32> {dim_tags = array<i64: 111>}
%1 = vector.transpose %0, [2, 0, 1] {dim_tags = array<i64: 111, 111, 111>}
      : vector<4x1x1xf32> to vector<1x4x1xf32>

It is too strict to check whether the fold op has the same effects as one transpose op. If we really need to follow the restriction, then we can't even cancel out transpose + transpose.   


https://github.com/llvm/llvm-project/pull/219611


More information about the Mlir-commits mailing list