Files
clang-p2996/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
Okwan Kwon 65bdeddb1e [mlir] Bubble up tensor.extract_slice above linalg operation
Bubble up extract_slice above Linalg operation.

A sequence of operations

    %0 = linalg.<op> ... arg0, arg1, ...
    %1 = tensor.extract_slice %0 ...

can be replaced with

    %0 = tensor.extract_slice %arg0
    %1 = tensor.extract_slice %arg1
    %2 = linalg.<op> ... %0, %1, ...

This results in the reduce computation of the linalg operation.

The implementation uses the tiling utility functions. One difference
from the tiling process is that we don't need to insert the checking
code for the out-of-bound accesses. The use of the slice itself
represents that the code writer is sure about the boundary condition.
To avoid adding the boundary condtion check code, `omitPartialTileCheck`
is introduced for the tiling utility functions.

Differential Revision: https://reviews.llvm.org/D122437
2022-03-31 16:48:38 +00:00

69 lines
1.3 KiB
CMake

add_mlir_dialect_library(MLIRLinalgTransforms
BubbleUpExtractSlice.cpp
BufferizableOpInterfaceImpl.cpp
Bufferize.cpp
CodegenStrategy.cpp
ComprehensiveBufferizePass.cpp
Detensorize.cpp
DropUnitDims.cpp
ElementwiseOpFusion.cpp
ElementwiseToLinalg.cpp
Fusion.cpp
FusionOnTensors.cpp
Generalization.cpp
Hoisting.cpp
HoistPadding.cpp
InlineScalarOperands.cpp
Interchange.cpp
Loops.cpp
LinalgStrategyPasses.cpp
NamedOpConversions.cpp
PadOpInterchange.cpp
Promotion.cpp
SparseTensorRewriting.cpp
SplitReduction.cpp
Tiling.cpp
Transforms.cpp
Vectorization.cpp
ADDITIONAL_HEADER_DIRS
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/Linalg
DEPENDS
MLIRLinalgPassIncGen
LINK_LIBS PUBLIC
MLIRAffine
MLIRAffineUtils
MLIRAnalysis
MLIRArithmetic
MLIRArithmeticTransforms
MLIRBufferization
MLIRComplex
MLIRFunc
MLIRFuncToLLVM
MLIRFuncTransforms
MLIRInferTypeOpInterface
MLIRIR
MLIRMemRef
MLIRLinalg
MLIRLinalgAnalysis
MLIRLinalgUtils
MLIRModuleBufferization
MLIRSCF
MLIRSCFTransforms
MLIRSCFUtils
MLIRPass
MLIRSparseTensor
MLIRTensor
MLIRTensorTilingInterfaceImpl
MLIRTensorTransforms
MLIRTransforms
MLIRTransformUtils
MLIRVector
MLIRVectorTransforms
MLIRVectorUtils
MLIRX86VectorTransforms
MLIRVectorToSCF
)