8 #ifndef MLIR_DIALECT_TENSOR_TRANSFORMS_TRANSFORMUTILS_H
9 #define MLIR_DIALECT_TENSOR_TRANSFORMS_TRANSFORMUTILS_H
155 static FailureOr<ExtractSliceFromCollapseHelper>
162 static FailureOr<ExtractSliceFromCollapseHelper>
164 tensor::ExtractSliceOp extractOp);
167 tensor::CollapseShapeOp collapseShapeOp,
171 const llvm::SmallBitVector &linearizedDimensions,
172 const llvm::SmallBitVector &slicedDimensions,
ArrayRef<Value> tiledSizes)
173 : collapseShapeOp(collapseShapeOp),
174 collapseShapeInputShape(collapseShapeInputShape),
175 collapseShapeOutputShape(collapseShapeOutputShape),
176 sliceParams(extractSliceParams),
177 linearizedDimensions(linearizedDimensions),
178 slicedDimensions(slicedDimensions), tiledSizes(tiledSizes) {}
193 std::pair<Value, SmallVector<Range>>
198 tensor::CollapseShapeOp collapseShapeOp;
202 llvm::SmallBitVector linearizedDimensions;
203 llvm::SmallBitVector slicedDimensions;
264 FailureOr<Operation *>
This class defines the main interface for locations in MLIR and acts as a non-nullable wrapper around...
This class helps build Operations.
This class coordinates the application of a rewrite on a set of IR, providing a way for clients to tr...
This class provides an abstraction over the different types of ranges over Values.
FailureOr< Operation * > simplifyCollapseShapeWithRankReducingExtractSlice(tensor::CollapseShapeOp op, RewriterBase &rewriter)
Tries to simplify a tensor.collapse_shape operation by inserting a single rank-reducing tensor....
Include the generated interface declarations.