Files
clang-p2996/mlir/lib/Dialect/Bufferization/Transforms/CMakeLists.txt
Matthias Springer 1abd8d1a8d [mlir][Interfaces] Add SubsetOpInterface and SubsetExtractionOpInterface (#70617)
There is currently an op interface for subset insertion ops
(`SubsetInsertionOpInterface`), but not for subset extraction ops. This
commit adds `SubsetExtractionOpInterface` to `mlir/Interfaces`, as well
as a common dependent op interface: `SubsetOpInterface`.

- `SubsetOpInterface` is for ops that operate on tensor subsets. It
provides interface methods to check if two subset ops operate on
equivalent or disjoint subsets. Ops that implement this interface must
implement either `SubsetExtractionOpInterface` or
`SubsetInsertionOpInterface`.
- `SubsetExtractionOpInterface` is for ops that extract from a tensor at
a subset. E.g., `tensor.extract_slice`, `tensor.gather`,
`vector.transfer_read`. Current implemented only on
`tensor.extract_slice`.
- `SubsetInsertionOpInterface` is for ops that insert into a destination
tensor at a subset. E.g., `tensor.insert_slice`,
`tensor.parallel_insert_slice`, `tensor.scatter`,
`vector.transfer_write`. Currently only implemented on
`tensor.insert_slice`, `tensor.parallel_insert_slice`.

Other changes:
- Rename `SubsetInsertionOpInterface.td` to `SubsetOpInterface.td`.
- Add helper functions to `ValueBoundsOpInterface.cpp` for checking
whether two slices are disjoint.

The new interfaces will be utilized by a new "loop-invariant subset
hoisting"
transformation. (This new transform is roughly
what `Linalg/Transforms/SubsetHoisting.cpp` is doing, but in a generic
and interface-driven way.)
2023-11-01 10:26:31 +09:00

45 lines
1012 B
CMake

add_mlir_dialect_library(MLIRBufferizationTransforms
Bufferize.cpp
BufferDeallocation.cpp
BufferDeallocationSimplification.cpp
BufferOptimizations.cpp
BufferResultsToOutParams.cpp
BufferUtils.cpp
BufferViewFlowAnalysis.cpp
DropEquivalentBufferResults.cpp
EmptyTensorElimination.cpp
EmptyTensorToAllocTensor.cpp
FuncBufferizableOpInterfaceImpl.cpp
LowerDeallocations.cpp
OneShotAnalysis.cpp
OneShotModuleBufferize.cpp
OwnershipBasedBufferDeallocation.cpp
TensorCopyInsertion.cpp
ADDITIONAL_HEADER_DIRS
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/Bufferization
DEPENDS
MLIRBufferizationPassIncGen
MLIRBufferizationEnumsIncGen
LINK_LIBS PUBLIC
MLIRArithDialect
MLIRBufferizationDialect
MLIRControlFlowInterfaces
MLIRFuncDialect
MLIRFunctionInterfaces
MLIRInferTypeOpInterface
MLIRIR
MLIRMemRefDialect
MLIRPass
MLIRTensorDialect
MLIRSCFDialect
MLIRSideEffectInterfaces
MLIRSubsetOpInterface
MLIRTransforms
MLIRViewLikeInterface
MLIRSupport
)