[Mlir-commits] [mlir] [mlir][tensor] Add new helper hooks for RelayoutOp (PR #109642)

Andrzej Warzyński llvmlistbot at llvm.org
Mon Sep 23 07:03:32 PDT 2024


================
@@ -3987,6 +3987,17 @@ SmallVector<int64_t> PackOp::getStaticTiles() {
   return getStaticTilesImpl(*this);
 }
 
+SmallVector<int64_t> PackOp::getTiledOuterDims() {
+  auto innerDimsPos = getInnerDimsPos();
----------------
banach-space wrote:

No strong opinion, I wanted to keep this change rather minimal and the implementation matching what's currently used in e.g. `GeneralizeOuterUnitDimsPackOpPattern`. 

To me personally, returning something "matching" the result shape is more intuitive, but these things are very subjective 😅  Also, once we consider `inner_dims_pos`, we would probably need to look at `outer_dims_perm`.

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


More information about the Mlir-commits mailing list