[Mlir-commits] [mlir] [mlir][tensor] Add new helper hooks for RelayoutOp (PR #109642)
Adam Siemieniuk
llvmlistbot at llvm.org
Tue Sep 24 03:12:24 PDT 2024
================
@@ -4411,6 +4428,23 @@ SmallVector<int64_t> UnPackOp::getStaticTiles() {
return getStaticTilesImpl(*this);
}
+ArrayRef<int64_t> UnPackOp::getAllOuterDims() {
+ ShapedType destType = getDestType();
+ int64_t destRank = destType.getRank();
+ return getSourceType().getShape().take_front(destRank);
+}
+
+SmallVector<int64_t> UnPackOp::getTiledOuterDims() {
+ auto innerDimsPos = getInnerDimsPos();
+ auto destShape = getSourceType().getShape();
----------------
adam-smnk wrote:
nit: maybe `packedShape` instead of `destShape` (which is source here)
https://github.com/llvm/llvm-project/pull/109642
More information about the Mlir-commits
mailing list