MLIR 24.0.0git
Transform.cpp File Reference

Go to the source code of this file.

Classes

class  TransformOpInterfaceFallbackModel
 Fallback model for the TransformOpInterface that uses C API callbacks. More...
class  PatternDescriptorOpInterfaceFallbackModel
 Fallback model for the PatternDescriptorOpInterface that uses C API callbacks. More...

Functions

 MLIR_DEFINE_CAPI_DIALECT_REGISTRATION (Transform, transform, transform::TransformDialect) bool mlirTypeIsATransformAnyOpType(MlirType type)
MlirTypeID mlirTransformAnyOpTypeGetTypeID (void)
MlirType mlirTransformAnyOpTypeGet (MlirContext ctx)
MlirStringRef mlirTransformAnyOpTypeGetName (void)
bool mlirTypeIsATransformAnyParamType (MlirType type)
MlirTypeID mlirTransformAnyParamTypeGetTypeID (void)
MlirType mlirTransformAnyParamTypeGet (MlirContext ctx)
MlirStringRef mlirTransformAnyParamTypeGetName (void)
bool mlirTypeIsATransformAnyValueType (MlirType type)
MlirTypeID mlirTransformAnyValueTypeGetTypeID (void)
MlirType mlirTransformAnyValueTypeGet (MlirContext ctx)
MlirStringRef mlirTransformAnyValueTypeGetName (void)
bool mlirTypeIsATransformOperationType (MlirType type)
MlirTypeID mlirTransformOperationTypeGetTypeID (void)
MlirType mlirTransformOperationTypeGet (MlirContext ctx, MlirStringRef operationName)
MlirStringRef mlirTransformOperationTypeGetName (void)
MlirStringRef mlirTransformOperationTypeGetOperationName (MlirType type)
bool mlirTypeIsATransformParamType (MlirType type)
MlirTypeID mlirTransformParamTypeGetTypeID (void)
MlirType mlirTransformParamTypeGet (MlirContext ctx, MlirType type)
MlirStringRef mlirTransformParamTypeGetName (void)
MlirType mlirTransformParamTypeGetType (MlirType type)
MlirRewriterBase mlirTransformRewriterAsBase (MlirTransformRewriter rewriter)
 Casts a MlirTransformRewriter to a MlirRewriterBase.
void mlirTransformResultsSetOps (MlirTransformResults results, MlirValue result, intptr_t numOps, MlirOperation *ops)
 Set the payload operations for a transform result by iterating over a list.
void mlirTransformResultsSetValues (MlirTransformResults results, MlirValue result, intptr_t numValues, MlirValue *values)
 Set the payload values for a transform result by iterating over a list.
void mlirTransformResultsSetParams (MlirTransformResults results, MlirValue result, intptr_t numParams, MlirAttribute *params)
 Set the parameters for a transform result by iterating over a list.
void mlirTransformStateForEachPayloadOp (MlirTransformState state, MlirValue value, MlirOperationCallback callback, void *userData)
 Iterate over payload operations associated with the transform IR value.
void mlirTransformStateForEachPayloadValue (MlirTransformState state, MlirValue value, MlirValueCallback callback, void *userData)
 Iterate over payload values associated with the transform IR value.
void mlirTransformStateForEachParam (MlirTransformState state, MlirValue value, MlirAttributeCallback callback, void *userData)
 Iterate over parameters associated with the transform IR value.
MlirTypeID mlirTransformOpInterfaceTypeID (void)
 Returns the interface TypeID of the TransformOpInterface.
void mlirTransformOpInterfaceAttachFallbackModel (MlirContext ctx, MlirStringRef opName, MlirTransformOpInterfaceCallbacks callbacks)
 Attach a TransformOpInterface FallbackModel to the given named operation.
MlirTypeID mlirPatternDescriptorOpInterfaceTypeID (void)
 Returns the interface TypeID of the PatternDescriptorOpInterface.
void mlirPatternDescriptorOpInterfaceAttachFallbackModel (MlirContext ctx, MlirStringRef opName, MlirPatternDescriptorOpInterfaceCallbacks callbacks)
 Attach a PatternDescriptorOpInterface FallbackModel to the given named operation.
static void invokeMemoryEffectInstancesCallback (SmallVectorImpl< MemoryEffects::EffectInstance > &effects, MlirMemoryEffectInstancesCallback callback, void *userData)
void mlirTransformOnlyReadsHandle (MlirOpOperand *operands, intptr_t numOperands, MlirMemoryEffectInstancesCallback callback, void *userData)
 Set the effect for the operands to only read the transform handles.
void mlirTransformConsumesHandle (MlirOpOperand *operands, intptr_t numOperands, MlirMemoryEffectInstancesCallback callback, void *userData)
 Set the effect for the operands to consuming the transform handles.
void mlirTransformProducesHandle (MlirValue *results, intptr_t numResults, MlirMemoryEffectInstancesCallback callback, void *userData)
 Set the effect for the results to that they produce transform handles.
void mlirTransformModifiesPayload (MlirMemoryEffectInstancesCallback callback, void *userData)
 Set the effect of potentially modifying payload IR.
void mlirTransformOnlyReadsPayload (MlirMemoryEffectInstancesCallback callback, void *userData)
 Set the effect of potentially reading payload IR.

Function Documentation

◆ invokeMemoryEffectInstancesCallback()

◆ MLIR_DEFINE_CAPI_DIALECT_REGISTRATION()

MLIR_DEFINE_CAPI_DIALECT_REGISTRATION ( Transform ,
transform ,
transform::TransformDialect  )

Definition at line 22 of file Transform.cpp.

References unwrap().

◆ mlirPatternDescriptorOpInterfaceAttachFallbackModel()

void mlirPatternDescriptorOpInterfaceAttachFallbackModel ( MlirContext ctx,
MlirStringRef opName,
MlirPatternDescriptorOpInterfaceCallbacks callbacks )

Attach a PatternDescriptorOpInterface FallbackModel to the given named operation.

Attach PatternDescriptorOpInterface to the operation with the given name using the provided callbacks.

The FallbackModel uses the provided callbacks to implement the interface.

Definition at line 364 of file Transform.cpp.

References mlir::RegisteredOperationName::lookup(), PatternDescriptorOpInterfaceFallbackModel::setCallbacks(), and unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::transform::PyPatternDescriptorOpInterface::attach().

◆ mlirPatternDescriptorOpInterfaceTypeID()

MlirTypeID mlirPatternDescriptorOpInterfaceTypeID ( void )

Returns the interface TypeID of the PatternDescriptorOpInterface.

Definition at line 305 of file Transform.cpp.

References wrap().

◆ mlirTransformAnyOpTypeGet()

MlirType mlirTransformAnyOpTypeGet ( MlirContext ctx)

◆ mlirTransformAnyOpTypeGetName()

MlirStringRef mlirTransformAnyOpTypeGetName ( void )

Definition at line 41 of file Transform.cpp.

References wrap().

◆ mlirTransformAnyOpTypeGetTypeID()

MlirTypeID mlirTransformAnyOpTypeGetTypeID ( void )

Definition at line 33 of file Transform.cpp.

References wrap().

◆ mlirTransformAnyParamTypeGet()

MlirType mlirTransformAnyParamTypeGet ( MlirContext ctx)

◆ mlirTransformAnyParamTypeGetName()

MlirStringRef mlirTransformAnyParamTypeGetName ( void )

Definition at line 61 of file Transform.cpp.

References wrap().

◆ mlirTransformAnyParamTypeGetTypeID()

MlirTypeID mlirTransformAnyParamTypeGetTypeID ( void )

Definition at line 53 of file Transform.cpp.

References wrap().

◆ mlirTransformAnyValueTypeGet()

MlirType mlirTransformAnyValueTypeGet ( MlirContext ctx)

◆ mlirTransformAnyValueTypeGetName()

MlirStringRef mlirTransformAnyValueTypeGetName ( void )

Definition at line 81 of file Transform.cpp.

References wrap().

◆ mlirTransformAnyValueTypeGetTypeID()

MlirTypeID mlirTransformAnyValueTypeGetTypeID ( void )

Definition at line 73 of file Transform.cpp.

References wrap().

◆ mlirTransformConsumesHandle()

void mlirTransformConsumesHandle ( MlirOpOperand * operands,
intptr_t numOperands,
MlirMemoryEffectInstancesCallback callback,
void * userData )

Set the effect for the operands to consuming the transform handles.

Invokes callback with ConsumesHandle effects corresponding to operands which have been marked as having those effects.

Definition at line 411 of file Transform.cpp.

References mlir::transform::consumesHandle(), invokeMemoryEffectInstancesCallback(), and unwrap().

◆ mlirTransformModifiesPayload()

void mlirTransformModifiesPayload ( MlirMemoryEffectInstancesCallback callback,
void * userData )

Set the effect of potentially modifying payload IR.

Invokes callback with ModifiesPayload effects.

Definition at line 438 of file Transform.cpp.

References invokeMemoryEffectInstancesCallback(), and mlir::transform::modifiesPayload().

◆ mlirTransformOnlyReadsHandle()

void mlirTransformOnlyReadsHandle ( MlirOpOperand * operands,
intptr_t numOperands,
MlirMemoryEffectInstancesCallback callback,
void * userData )

Set the effect for the operands to only read the transform handles.

Invokes callback with OnlyReadsHandle effects corresponding to operands which have been marked as having those effects.

Definition at line 399 of file Transform.cpp.

References invokeMemoryEffectInstancesCallback(), mlir::transform::onlyReadsHandle(), and unwrap().

◆ mlirTransformOnlyReadsPayload()

void mlirTransformOnlyReadsPayload ( MlirMemoryEffectInstancesCallback callback,
void * userData )

Set the effect of potentially reading payload IR.

Invokes callback with OnlyReadsPayload effects.

Definition at line 446 of file Transform.cpp.

References invokeMemoryEffectInstancesCallback(), and mlir::transform::onlyReadsPayload().

◆ mlirTransformOperationTypeGet()

MlirType mlirTransformOperationTypeGet ( MlirContext ctx,
MlirStringRef operationName )

◆ mlirTransformOperationTypeGetName()

MlirStringRef mlirTransformOperationTypeGetName ( void )

Definition at line 103 of file Transform.cpp.

References wrap().

◆ mlirTransformOperationTypeGetOperationName()

MlirStringRef mlirTransformOperationTypeGetOperationName ( MlirType type)

◆ mlirTransformOperationTypeGetTypeID()

MlirTypeID mlirTransformOperationTypeGetTypeID ( void )

Definition at line 93 of file Transform.cpp.

References wrap().

◆ mlirTransformOpInterfaceAttachFallbackModel()

void mlirTransformOpInterfaceAttachFallbackModel ( MlirContext ctx,
MlirStringRef opName,
MlirTransformOpInterfaceCallbacks callbacks )

Attach a TransformOpInterface FallbackModel to the given named operation.

Attach TransformOpInterface to the operation with the given name using the provided callbacks.

The FallbackModel uses the provided callbacks to implement the interface.

Definition at line 281 of file Transform.cpp.

References mlir::RegisteredOperationName::lookup(), TransformOpInterfaceFallbackModel::setCallbacks(), and unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::transform::PyTransformOpInterface::attach().

◆ mlirTransformOpInterfaceTypeID()

MlirTypeID mlirTransformOpInterfaceTypeID ( void )

Returns the interface TypeID of the TransformOpInterface.

Definition at line 210 of file Transform.cpp.

References wrap().

◆ mlirTransformParamTypeGet()

MlirType mlirTransformParamTypeGet ( MlirContext ctx,
MlirType type )

◆ mlirTransformParamTypeGetName()

MlirStringRef mlirTransformParamTypeGetName ( void )

Definition at line 127 of file Transform.cpp.

References wrap().

◆ mlirTransformParamTypeGetType()

MlirType mlirTransformParamTypeGetType ( MlirType type)

◆ mlirTransformParamTypeGetTypeID()

MlirTypeID mlirTransformParamTypeGetTypeID ( void )

Definition at line 119 of file Transform.cpp.

References wrap().

◆ mlirTransformProducesHandle()

void mlirTransformProducesHandle ( MlirValue * results,
intptr_t numResults,
MlirMemoryEffectInstancesCallback callback,
void * userData )

Set the effect for the results to that they produce transform handles.

Invokes callback with ProducesHandle effects corresponding to results which have been marked as having those effects.

Definition at line 423 of file Transform.cpp.

References invokeMemoryEffectInstancesCallback(), mlir::transform::producesHandle(), and unwrap().

◆ mlirTransformResultsSetOps()

void mlirTransformResultsSetOps ( MlirTransformResults results,
MlirValue result,
intptr_t numOps,
MlirOperation * ops )

Set the payload operations for a transform result by iterating over a list.

Definition at line 150 of file Transform.cpp.

References result, and unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::transform::PyTransformResults::setOps().

◆ mlirTransformResultsSetParams()

void mlirTransformResultsSetParams ( MlirTransformResults results,
MlirValue result,
intptr_t numParams,
MlirAttribute * params )

Set the parameters for a transform result by iterating over a list.

Definition at line 169 of file Transform.cpp.

References result, and unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::transform::PyTransformResults::setParams().

◆ mlirTransformResultsSetValues()

void mlirTransformResultsSetValues ( MlirTransformResults results,
MlirValue result,
intptr_t numValues,
MlirValue * values )

Set the payload values for a transform result by iterating over a list.

Definition at line 159 of file Transform.cpp.

References result, and unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::transform::PyTransformResults::setValues().

◆ mlirTransformRewriterAsBase()

MlirRewriterBase mlirTransformRewriterAsBase ( MlirTransformRewriter rewriter)

Casts a MlirTransformRewriter to a MlirRewriterBase.

Cast the TransformRewriter to a RewriterBase.

Definition at line 140 of file Transform.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::transform::PyTransformRewriter::PyTransformRewriter().

◆ mlirTransformStateForEachParam()

void mlirTransformStateForEachParam ( MlirTransformState state,
MlirValue value,
MlirAttributeCallback callback,
void * userData )

Iterate over parameters associated with the transform IR value.

Calls the callback for each parameter.

Definition at line 199 of file Transform.cpp.

References unwrap(), and wrap().

◆ mlirTransformStateForEachPayloadOp()

void mlirTransformStateForEachPayloadOp ( MlirTransformState state,
MlirValue value,
MlirOperationCallback callback,
void * userData )

Iterate over payload operations associated with the transform IR value.

Calls the callback for each payload operation.

Definition at line 183 of file Transform.cpp.

References unwrap(), and wrap().

◆ mlirTransformStateForEachPayloadValue()

void mlirTransformStateForEachPayloadValue ( MlirTransformState state,
MlirValue value,
MlirValueCallback callback,
void * userData )

Iterate over payload values associated with the transform IR value.

Calls the callback for each payload value.

Definition at line 191 of file Transform.cpp.

References unwrap(), and wrap().

◆ mlirTypeIsATransformAnyParamType()

bool mlirTypeIsATransformAnyParamType ( MlirType type)

Definition at line 49 of file Transform.cpp.

References unwrap().

◆ mlirTypeIsATransformAnyValueType()

bool mlirTypeIsATransformAnyValueType ( MlirType type)

Definition at line 69 of file Transform.cpp.

References unwrap().

◆ mlirTypeIsATransformOperationType()

bool mlirTypeIsATransformOperationType ( MlirType type)

Definition at line 89 of file Transform.cpp.

References unwrap().

◆ mlirTypeIsATransformParamType()

bool mlirTypeIsATransformParamType ( MlirType type)

Definition at line 115 of file Transform.cpp.

References unwrap().