21 #include "mlir/Dialect/Tensor/IR/TensorOpsDialect.cpp.inc"
45 void TensorDialect::initialize() {
48 #include "mlir/Dialect/Tensor/IR/TensorOps.cpp.inc"
50 addInterfaces<TensorInlinerInterface>();
51 declarePromisedInterfaces<
52 bufferization::BufferizableOpInterface, CastOp, CollapseShapeOp, DimOp,
53 EmptyOp, ExpandShapeOp, ExtractSliceOp, ExtractOp, FromElementsOp,
54 GenerateOp, InsertOp, InsertSliceOp, PadOp, ParallelInsertSliceOp, RankOp,
55 ReshapeOp, SplatOp>();
56 declarePromisedInterfaces<transform::FindPayloadReplacementOpInterface,
57 CollapseShapeOp, ExpandShapeOp, ExtractSliceOp,
58 InsertSliceOp, ReshapeOp>();
59 declarePromisedInterfaces<ReifyRankedShapedTypeOpInterface, ExpandShapeOp,
60 CollapseShapeOp, PadOp>();
61 declarePromisedInterfaces<SubsetOpInterface, ExtractSliceOp, InsertSliceOp,
62 ParallelInsertSliceOp>();
63 declarePromisedInterfaces<SubsetInsertionOpInterface, InsertSliceOp,
64 ParallelInsertSliceOp>();
65 declarePromisedInterface<SubsetExtractionOpInterface, ExtractSliceOp>();
66 declarePromisedInterfaces<TilingInterface, PadOp, PackOp, UnPackOp>();
67 declarePromisedInterfaces<ValueBoundsOpInterface, CastOp, DimOp, EmptyOp,
68 ExtractSliceOp, PadOp, RankOp>();
static bool isLegalToInline(InlinerInterface &interface, Region *src, Region *insertRegion, bool shouldCloneInlinedRegion, IRMapping &valueMapping)
Utility to check that all of the operations within 'src' can be inlined.
This is the interface that must be implemented by the dialects of operations to be inlined.
DialectInlinerInterface(Dialect *dialect)
This is a utility class for mapping one set of IR entities to another.
Operation is the basic unit of execution within MLIR.
This class contains a list of basic blocks and a link to the parent operation it is attached to.
Include the generated interface declarations.