[all-commits] [llvm/llvm-project] aa9eb4: [mlir][bufferization] Don't clone on unknown owner...
Martin Erhart via All-commits
all-commits at lists.llvm.org
Thu Sep 28 01:45:49 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: aa9eb47da2e501d3505de733240eb89c9a0ea2cf
https://github.com/llvm/llvm-project/commit/aa9eb47da2e501d3505de733240eb89c9a0ea2cf
Author: Martin Erhart <merhart at google.com>
Date: 2023-09-28 (Thu, 28 Sep 2023)
Changed paths:
M mlir/include/mlir/Dialect/Bufferization/IR/BufferDeallocationOpInterface.h
M mlir/include/mlir/Dialect/Bufferization/IR/BufferDeallocationOpInterface.td
M mlir/include/mlir/Dialect/Bufferization/Pipelines/Passes.h
M mlir/include/mlir/Dialect/Bufferization/Transforms/Passes.h
M mlir/include/mlir/Dialect/Bufferization/Transforms/Passes.td
M mlir/lib/Dialect/Arith/Transforms/BufferDeallocationOpInterfaceImpl.cpp
M mlir/lib/Dialect/Bufferization/IR/BufferDeallocationOpInterface.cpp
M mlir/lib/Dialect/Bufferization/Pipelines/BufferizationPipelines.cpp
M mlir/lib/Dialect/Bufferization/Pipelines/CMakeLists.txt
M mlir/lib/Dialect/Bufferization/Transforms/CMakeLists.txt
M mlir/lib/Dialect/Bufferization/Transforms/OwnershipBasedBufferDeallocation.cpp
M mlir/test/Dialect/Bufferization/Transforms/OwnershipBasedBufferDeallocation/dealloc-branchop-interface.mlir
M mlir/test/Dialect/Bufferization/Transforms/OwnershipBasedBufferDeallocation/dealloc-callop-interface.mlir
M mlir/test/Dialect/Bufferization/Transforms/OwnershipBasedBufferDeallocation/dealloc-function-boundaries.mlir
M mlir/test/Dialect/Bufferization/Transforms/OwnershipBasedBufferDeallocation/dealloc-memoryeffect-interface.mlir
M mlir/test/Dialect/Bufferization/Transforms/OwnershipBasedBufferDeallocation/dealloc-region-branchop-interface.mlir
A mlir/test/Dialect/Bufferization/Transforms/OwnershipBasedBufferDeallocation/dealloc-runtime-verification.mlir
M mlir/test/Dialect/Bufferization/Transforms/OwnershipBasedBufferDeallocation/dealloc-subviews.mlir
A mlir/test/Dialect/Bufferization/Transforms/OwnershipBasedBufferDeallocation/dealloc-unknown-ops.mlir
M mlir/test/Integration/Dialect/Linalg/CPU/test-collapse-tensor.mlir
M mlir/test/Integration/Dialect/Linalg/CPU/test-expand-tensor.mlir
M mlir/test/Integration/Dialect/Linalg/CPU/test-one-shot-bufferize.mlir
M mlir/test/Integration/Dialect/Linalg/CPU/test-tensor-e2e.mlir
M utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
Log Message:
-----------
[mlir][bufferization] Don't clone on unknown ownership and verify function boundary ABI (#66626)
Inserting clones requires a lot of assumptions to hold on the input IR, e.g., all writes to a buffer need to dominate all reads. This is not guaranteed by one-shot bufferization and isn't easy to verify, thus it could quickly lead to incorrect results that are hard to debug. This commit changes the mechanism of how an ownership indicator is materialized when there is not already a unique ownership present. Additionally, we don't create copies of returned memrefs anymore when we don't have ownership. Instead, we insert assert operations to make sure we have ownership at runtime, or otherwise report to the user that correctness could not be guaranteed.
More information about the All-commits
mailing list