24 if (!hasSparseInOut) {
26 "operation has no sparse input or output");
28 results.
set(cast<OpResult>(getResult()), state.getPayloadOps(getTarget()));
37 class SparseTensorTransformDialectExtension
39 SparseTensorTransformDialectExtension> {
42 SparseTensorTransformDialectExtension)
44 SparseTensorTransformDialectExtension() {
45 declareGeneratedDialect<sparse_tensor::SparseTensorDialect>();
48 #include "mlir/Dialect/SparseTensor/TransformOps/SparseTensorTransformOps.cpp.inc"
54 #define GET_OP_CLASSES
55 #include "mlir/Dialect/SparseTensor/TransformOps/SparseTensorTransformOps.cpp.inc"
59 registry.
addExtensions<SparseTensorTransformDialectExtension>();
#define MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(CLASS_NAME)
The result of a transform IR operation application.
static DiagnosedSilenceableFailure success()
Constructs a DiagnosedSilenceableFailure in the success state.
The DialectRegistry maps a dialect namespace to a constructor for the matching dialect.
void addExtensions()
Add the given extensions to the registry.
Operation is the basic unit of execution within MLIR.
Location getLoc()
The source location the operation was defined or derived from.
Base class for extensions of the Transform dialect that supports injecting operations into the Transf...
bool hasAnySparseOperandOrResult(Operation *op)
Returns true iff MLIR operand has any sparse operand or result.
void registerTransformDialectExtension(DialectRegistry ®istry)
Include the generated interface declarations.
DiagnosedSilenceableFailure emitSilenceableFailure(Location loc, const Twine &message={})
Emits a silenceable failure with the given message.