[Mlir-commits] [mlir] [mlir][tensor] Extend the logic to generalise tensor.pack (PR #109815)
Han-Chung Wang
llvmlistbot at llvm.org
Wed Sep 25 10:48:07 PDT 2024
================
@@ -1021,8 +1021,16 @@ LogicalResult ExtractSliceOfPadTensorSwapPattern::matchAndRewrite(
return success();
}
-/// Returns a tensor.pad op if padding value is set. Otherwise, returns the
-/// source directly. The method assumes that the `packOp` has static shapes.
+/// If padding value is set, returns a tensor.pad Op for the source tensor,
+/// with the output shape matching the output of `packOp`. Otherwise, returns
+/// the source directly.
+///
+/// This method assumes that all outer dims for this pack Op are 1.
+///
+/// At most _one_ inner tile size can be _dynamic_, all other inner tiles are
+/// required to have static sizes. The inner tile that's dynamic must be a
+/// multiple of vector.vscale (to support scalable tile sizes). This condition
+/// can be relaxed in the future.
----------------
hanhanW wrote:
We don't want to put the scalable concept to this method because it is general. To me, it is simple as it is just a dynamic shape. I'd highly suggest that we remove the scalable terms from the method.
https://github.com/llvm/llvm-project/pull/109815
More information about the Mlir-commits
mailing list