This pass runs the One-Shot Analysis to find out which tensor OpOperands must bufferize out-of-place. It then rewrites those tensor OpOperands to explicit allocations with a copy in the form of `bufferization.alloc_tensor`. The resulting IR can then be bufferized without having to care about read-after-write conflicts. This change makes it possible to connect One-Shot Analysis to other bufferizations such as the sparse compiler. Differential Revision: https://reviews.llvm.org/D126573
32 lines
640 B
CMake
32 lines
640 B
CMake
add_mlir_dialect_library(MLIRBufferizationTransforms
|
|
AllocTensorElimination.cpp
|
|
Bufferize.cpp
|
|
BufferDeallocation.cpp
|
|
BufferOptimizations.cpp
|
|
BufferResultsToOutParams.cpp
|
|
BufferUtils.cpp
|
|
DropEquivalentBufferResults.cpp
|
|
FuncBufferizableOpInterfaceImpl.cpp
|
|
OneShotAnalysis.cpp
|
|
OneShotModuleBufferize.cpp
|
|
TensorCopyInsertion.cpp
|
|
|
|
ADDITIONAL_HEADER_DIRS
|
|
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/Bufferization
|
|
|
|
DEPENDS
|
|
MLIRBufferizationPassIncGen
|
|
|
|
LINK_LIBS PUBLIC
|
|
MLIRBufferization
|
|
MLIRControlFlowInterfaces
|
|
MLIRFunc
|
|
MLIRInferTypeOpInterface
|
|
MLIRIR
|
|
MLIRMemRef
|
|
MLIRPass
|
|
MLIRTensor
|
|
MLIRTransforms
|
|
)
|
|
|