22 #include "mlir/Dialect/Tensor/IR/TensorOpsDialect.cpp.inc"
46 void TensorDialect::initialize() {
49 #include "mlir/Dialect/Tensor/IR/TensorOps.cpp.inc"
51 addInterfaces<TensorInlinerInterface>();
52 declarePromisedInterfaces<
53 bufferization::BufferizableOpInterface, CastOp, CollapseShapeOp, ConcatOp,
54 DimOp, EmptyOp, ExpandShapeOp, ExtractSliceOp, ExtractOp, FromElementsOp,
55 GenerateOp, InsertOp, InsertSliceOp, PadOp, ParallelInsertSliceOp, RankOp,
56 ReshapeOp, SplatOp>();
57 declarePromisedInterfaces<transform::FindPayloadReplacementOpInterface,
58 CollapseShapeOp, ExpandShapeOp, ExtractSliceOp,
59 InsertSliceOp, ReshapeOp>();
60 declarePromisedInterfaces<ReifyRankedShapedTypeOpInterface, ExpandShapeOp,
61 CollapseShapeOp, PadOp>();
62 declarePromisedInterfaces<RuntimeVerifiableOpInterface, CastOp, DimOp,
63 ExtractOp, InsertOp, ExtractSliceOp>();
64 declarePromisedInterfaces<SubsetOpInterface, ExtractSliceOp, InsertSliceOp,
65 ParallelInsertSliceOp>();
66 declarePromisedInterfaces<SubsetInsertionOpInterface, InsertSliceOp,
67 ParallelInsertSliceOp>();
68 declarePromisedInterface<SubsetExtractionOpInterface, ExtractSliceOp>();
69 declarePromisedInterfaces<TilingInterface, PadOp>();
70 declarePromisedInterfaces<ValueBoundsOpInterface, CastOp, DimOp, EmptyOp,
71 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.