[Mlir-commits] [mlir] [mlir][tensor] Fold pack and unpack of empty input tensor (PR #92247)
Adam Siemieniuk
llvmlistbot at llvm.org
Thu May 16 11:20:49 PDT 2024
================
@@ -93,12 +93,76 @@ struct FoldEmptyTensorWithExtractSliceOp
bool foldSingleUseOnly = false;
};
+/// tensor.empty does not define any tensor contents, so an unpadded pack
----------------
adam-smnk wrote:
Padding has a side effect - if it kicks in, you get at least partially initialized buffer.
So, I opted for a more conservative approach. You could probably replace pack with pad or sth but leaving it for the future.
https://github.com/llvm/llvm-project/pull/92247
More information about the Mlir-commits
mailing list