MLIR 24.0.0git
ExtensibleDialect.cpp File Reference

Go to the source code of this file.

Classes

class  mlir::DynamicOpTraits::RecursiveMemoryEffects
class  mlir::ExternalDynamicOpTrait

Namespaces

namespace  mlir
 Include the generated interface declarations.
namespace  mlir::DynamicOpTraits

Functions

bool mlirDynamicOpTraitAttach (MlirDynamicOpTrait dynamicOpTrait, MlirStringRef opName, MlirContext context)
 Attach a dynamic op trait to the given operation name.
MlirDynamicOpTrait mlirDynamicOpTraitIsTerminatorCreate ()
 Get the dynamic op trait that indicates the operation is a terminator.
MlirTypeID mlirDynamicOpTraitIsTerminatorGetTypeID ()
 Get the type ID of the dynamic op trait that indicates the operation is a terminator.
MlirDynamicOpTrait mlirDynamicOpTraitNoTerminatorCreate ()
 Get the dynamic op trait that indicates regions have no terminator.
MlirTypeID mlirDynamicOpTraitNoTerminatorGetTypeID ()
 Get the type ID of the dynamic op trait that indicates regions have no terminator.
MlirDynamicOpTrait mlirDynamicOpTraitRecursiveMemoryEffectsCreate (void)
 Get the dynamic op trait that indicates memory effects of an operation includes the effects of operations nested within its regions.
MlirTypeID mlirDynamicOpTraitRecursiveMemoryEffectsGetTypeID (void)
 Get the type ID of the dynamic op trait that indicates memory effects of an operation includes the effects of operations nested within its regions.
MlirDynamicOpTrait mlirDynamicOpTraitIsIsolatedFromAboveCreate ()
 Get the dynamic op trait that indicates regions are isolated from above.
MlirTypeID mlirDynamicOpTraitIsIsolatedFromAboveGetTypeID ()
 Get the type ID of the dynamic op trait that indicates regions are isolated from above.
void mlirDynamicOpTraitDestroy (MlirDynamicOpTrait dynamicOpTrait)
 Destroy the dynamic op trait.
MlirDynamicOpTrait mlirDynamicOpTraitCreate (MlirTypeID typeID, MlirDynamicOpTraitCallbacks callbacks, void *userData)
 Create a custom dynamic op trait with the given type ID and callbacks.
bool mlirDialectIsAExtensibleDialect (MlirDialect dialect)
 Check if the given dialect is an extensible dialect.
MlirDynamicTypeDefinition mlirExtensibleDialectLookupTypeDefinition (MlirDialect dialect, MlirStringRef typeName)
 Look up a registered type definition by type name in the given dialect.
bool mlirTypeIsADynamicType (MlirType type)
 Check if the given type is a dynamic type.
MlirTypeID mlirDynamicTypeGetTypeID ()
MlirType mlirDynamicTypeGet (MlirDynamicTypeDefinition typeDef, MlirAttribute *attrs, intptr_t numAttrs)
 Get a dynamic type by instantiating the given type definition with the provided attributes.
intptr_t mlirDynamicTypeGetNumParams (MlirType type)
 Get the number of parameters in the given dynamic type.
MlirAttribute mlirDynamicTypeGetParam (MlirType type, intptr_t index)
 Get the parameter at the given index in the provided dynamic type.
MlirDynamicTypeDefinition mlirDynamicTypeGetTypeDef (MlirType type)
 Get the type definition of the given dynamic type.
MlirTypeID mlirDynamicTypeDefinitionGetTypeID (MlirDynamicTypeDefinition typeDef)
 Get the type ID of a dynamic type definition.
MlirStringRef mlirDynamicTypeDefinitionGetName (MlirDynamicTypeDefinition typeDef)
 Get the name of the given dynamic type definition.
MlirDialect mlirDynamicTypeDefinitionGetDialect (MlirDynamicTypeDefinition typeDef)
 Get the dialect that the given dynamic type definition belongs to.
MlirDynamicAttrDefinition mlirExtensibleDialectLookupAttrDefinition (MlirDialect dialect, MlirStringRef attrName)
 Look up a registered attribute definition by attribute name in the given dialect.
bool mlirAttributeIsADynamicAttr (MlirAttribute attr)
 Check if the given attribute is a dynamic attribute.
MlirTypeID mlirDynamicAttrGetTypeID (void)
MlirAttribute mlirDynamicAttrGet (MlirDynamicAttrDefinition attrDef, MlirAttribute *attrs, intptr_t numAttrs)
 Get a dynamic attribute by instantiating the given attribute definition with the provided attributes.
intptr_t mlirDynamicAttrGetNumParams (MlirAttribute attr)
 Get the number of parameters in the given dynamic attribute.
MlirAttribute mlirDynamicAttrGetParam (MlirAttribute attr, intptr_t index)
 Get the parameter at the given index in the provided dynamic attribute.
MlirDynamicAttrDefinition mlirDynamicAttrGetAttrDef (MlirAttribute attr)
 Get the attribute definition of the given dynamic attribute.
MlirTypeID mlirDynamicAttrDefinitionGetTypeID (MlirDynamicAttrDefinition attrDef)
 Get the type ID of a dynamic attribute definition.
MlirStringRef mlirDynamicAttrDefinitionGetName (MlirDynamicAttrDefinition attrDef)
 Get the name of the given dynamic attribute definition.
MlirDialect mlirDynamicAttrDefinitionGetDialect (MlirDynamicAttrDefinition attrDef)
 Get the dialect that the given dynamic attribute definition belongs to.

Function Documentation

◆ mlirAttributeIsADynamicAttr()

bool mlirAttributeIsADynamicAttr ( MlirAttribute attr)

Check if the given attribute is a dynamic attribute.

Definition at line 185 of file ExtensibleDialect.cpp.

References unwrap().

◆ mlirDialectIsAExtensibleDialect()

bool mlirDialectIsAExtensibleDialect ( MlirDialect dialect)

Check if the given dialect is an extensible dialect.

Definition at line 122 of file ExtensibleDialect.cpp.

References unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::getDynamicAttrDef(), and mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::getDynamicTypeDef().

◆ mlirDynamicAttrDefinitionGetDialect()

MlirDialect mlirDynamicAttrDefinitionGetDialect ( MlirDynamicAttrDefinition attrDef)

Get the dialect that the given dynamic attribute definition belongs to.

Definition at line 226 of file ExtensibleDialect.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDynamicAttribute::bindDerived().

◆ mlirDynamicAttrDefinitionGetName()

MlirStringRef mlirDynamicAttrDefinitionGetName ( MlirDynamicAttrDefinition attrDef)

Get the name of the given dynamic attribute definition.

Definition at line 221 of file ExtensibleDialect.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDynamicAttribute::bindDerived().

◆ mlirDynamicAttrDefinitionGetTypeID()

MlirTypeID mlirDynamicAttrDefinitionGetTypeID ( MlirDynamicAttrDefinition attrDef)

Get the type ID of a dynamic attribute definition.

Definition at line 216 of file ExtensibleDialect.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDynamicAttribute::bindDerived().

◆ mlirDynamicAttrGet()

MlirAttribute mlirDynamicAttrGet ( MlirDynamicAttrDefinition attrDef,
MlirAttribute * attrs,
intptr_t numAttrs )

Get a dynamic attribute by instantiating the given attribute definition with the provided attributes.

Definition at line 193 of file ExtensibleDialect.cpp.

References mlir::DynamicAttr::get(), unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDynamicAttribute::bindDerived().

◆ mlirDynamicAttrGetAttrDef()

MlirDynamicAttrDefinition mlirDynamicAttrGetAttrDef ( MlirAttribute attr)

Get the attribute definition of the given dynamic attribute.

Definition at line 211 of file ExtensibleDialect.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDynamicAttribute::bindDerived().

◆ mlirDynamicAttrGetNumParams()

intptr_t mlirDynamicAttrGetNumParams ( MlirAttribute attr)

Get the number of parameters in the given dynamic attribute.

Definition at line 203 of file ExtensibleDialect.cpp.

References unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDynamicAttribute::bindDerived().

◆ mlirDynamicAttrGetParam()

MlirAttribute mlirDynamicAttrGetParam ( MlirAttribute attr,
intptr_t index )

Get the parameter at the given index in the provided dynamic attribute.

Definition at line 207 of file ExtensibleDialect.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDynamicAttribute::bindDerived().

◆ mlirDynamicAttrGetTypeID()

◆ mlirDynamicOpTraitAttach()

bool mlirDynamicOpTraitAttach ( MlirDynamicOpTrait dynamicOpTrait,
MlirStringRef opName,
MlirContext context )

Attach a dynamic op trait to the given operation name.

Note that the operation name must be modeled by dynamic dialect and must be registered. The ownership of the trait will be transferred to the operation name after this call.

Definition at line 21 of file ExtensibleDialect.cpp.

References mlir::OperationName::getImpl(), mlir::RegisteredOperationName::lookup(), mlirDynamicOpTraitAttach(), and unwrap().

Referenced by mlirDynamicOpTraitAttach().

◆ mlirDynamicOpTraitCreate()

MlirDynamicOpTrait mlirDynamicOpTraitCreate ( MlirTypeID typeID,
MlirDynamicOpTraitCallbacks callbacks,
void * userData )

Create a custom dynamic op trait with the given type ID and callbacks.

Definition at line 116 of file ExtensibleDialect.cpp.

References unwrap(), and wrap().

◆ mlirDynamicOpTraitDestroy()

void mlirDynamicOpTraitDestroy ( MlirDynamicOpTrait dynamicOpTrait)

Destroy the dynamic op trait.

Definition at line 80 of file ExtensibleDialect.cpp.

References unwrap().

◆ mlirDynamicOpTraitIsIsolatedFromAboveCreate()

MlirDynamicOpTrait mlirDynamicOpTraitIsIsolatedFromAboveCreate ( void )

Get the dynamic op trait that indicates regions are isolated from above.

Definition at line 72 of file ExtensibleDialect.cpp.

References wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDynamicOpTraits::IsIsolatedFromAbove::bind().

◆ mlirDynamicOpTraitIsIsolatedFromAboveGetTypeID()

MlirTypeID mlirDynamicOpTraitIsIsolatedFromAboveGetTypeID ( void )

Get the type ID of the dynamic op trait that indicates regions are isolated from above.

Definition at line 76 of file ExtensibleDialect.cpp.

References mlir::DynamicOpTraitImpl< OpTrait::IsIsolatedFromAbove >::getStaticTypeID(), and wrap().

◆ mlirDynamicOpTraitIsTerminatorCreate()

MlirDynamicOpTrait mlirDynamicOpTraitIsTerminatorCreate ( void )

Get the dynamic op trait that indicates the operation is a terminator.

Definition at line 41 of file ExtensibleDialect.cpp.

References wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDynamicOpTraits::IsTerminator::bind().

◆ mlirDynamicOpTraitIsTerminatorGetTypeID()

MlirTypeID mlirDynamicOpTraitIsTerminatorGetTypeID ( void )

Get the type ID of the dynamic op trait that indicates the operation is a terminator.

Definition at line 45 of file ExtensibleDialect.cpp.

References mlir::DynamicOpTraitImpl< OpTrait::IsTerminator >::getStaticTypeID(), and wrap().

◆ mlirDynamicOpTraitNoTerminatorCreate()

MlirDynamicOpTrait mlirDynamicOpTraitNoTerminatorCreate ( void )

Get the dynamic op trait that indicates regions have no terminator.

Definition at line 49 of file ExtensibleDialect.cpp.

References wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDynamicOpTraits::NoTerminator::bind().

◆ mlirDynamicOpTraitNoTerminatorGetTypeID()

MlirTypeID mlirDynamicOpTraitNoTerminatorGetTypeID ( void )

Get the type ID of the dynamic op trait that indicates regions have no terminator.

Definition at line 53 of file ExtensibleDialect.cpp.

References mlir::DynamicOpTraitImpl< OpTrait::NoTerminator >::getStaticTypeID(), and wrap().

◆ mlirDynamicOpTraitRecursiveMemoryEffectsCreate()

MlirDynamicOpTrait mlirDynamicOpTraitRecursiveMemoryEffectsCreate ( void )

Get the dynamic op trait that indicates memory effects of an operation includes the effects of operations nested within its regions.

Definition at line 64 of file ExtensibleDialect.cpp.

References wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDynamicOpTraits::RecursiveMemoryEffects::bind().

◆ mlirDynamicOpTraitRecursiveMemoryEffectsGetTypeID()

MlirTypeID mlirDynamicOpTraitRecursiveMemoryEffectsGetTypeID ( void )

Get the type ID of the dynamic op trait that indicates memory effects of an operation includes the effects of operations nested within its regions.

Definition at line 68 of file ExtensibleDialect.cpp.

References mlir::DynamicOpTraitImpl< OpTrait::HasRecursiveMemoryEffects >::getStaticTypeID(), and wrap().

◆ mlirDynamicTypeDefinitionGetDialect()

MlirDialect mlirDynamicTypeDefinitionGetDialect ( MlirDynamicTypeDefinition typeDef)

Get the dialect that the given dynamic type definition belongs to.

Definition at line 174 of file ExtensibleDialect.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDynamicType::bindDerived().

◆ mlirDynamicTypeDefinitionGetName()

MlirStringRef mlirDynamicTypeDefinitionGetName ( MlirDynamicTypeDefinition typeDef)

Get the name of the given dynamic type definition.

Definition at line 169 of file ExtensibleDialect.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDynamicType::bindDerived().

◆ mlirDynamicTypeDefinitionGetTypeID()

MlirTypeID mlirDynamicTypeDefinitionGetTypeID ( MlirDynamicTypeDefinition typeDef)

Get the type ID of a dynamic type definition.

Definition at line 164 of file ExtensibleDialect.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDynamicType::bindDerived().

◆ mlirDynamicTypeGet()

MlirType mlirDynamicTypeGet ( MlirDynamicTypeDefinition typeDef,
MlirAttribute * attrs,
intptr_t numAttrs )

Get a dynamic type by instantiating the given type definition with the provided attributes.

Definition at line 141 of file ExtensibleDialect.cpp.

References mlir::DynamicType::get(), unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDynamicType::bindDerived().

◆ mlirDynamicTypeGetNumParams()

intptr_t mlirDynamicTypeGetNumParams ( MlirType type)

Get the number of parameters in the given dynamic type.

Definition at line 151 of file ExtensibleDialect.cpp.

References unwrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDynamicType::bindDerived().

◆ mlirDynamicTypeGetParam()

MlirAttribute mlirDynamicTypeGetParam ( MlirType type,
intptr_t index )

Get the parameter at the given index in the provided dynamic type.

Definition at line 155 of file ExtensibleDialect.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDynamicType::bindDerived().

◆ mlirDynamicTypeGetTypeDef()

MlirDynamicTypeDefinition mlirDynamicTypeGetTypeDef ( MlirType type)

Get the type definition of the given dynamic type.

Definition at line 159 of file ExtensibleDialect.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDynamicType::bindDerived().

◆ mlirDynamicTypeGetTypeID()

◆ mlirExtensibleDialectLookupAttrDefinition()

MlirDynamicAttrDefinition mlirExtensibleDialectLookupAttrDefinition ( MlirDialect dialect,
MlirStringRef attrName )

Look up a registered attribute definition by attribute name in the given dialect.

Note that the dialect must be an extensible dialect.

Definition at line 179 of file ExtensibleDialect.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::getDynamicAttrDef().

◆ mlirExtensibleDialectLookupTypeDefinition()

MlirDynamicTypeDefinition mlirExtensibleDialectLookupTypeDefinition ( MlirDialect dialect,
MlirStringRef typeName )

Look up a registered type definition by type name in the given dialect.

Note that the dialect must be an extensible dialect.

Definition at line 127 of file ExtensibleDialect.cpp.

References unwrap(), and wrap().

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::getDynamicTypeDef().

◆ mlirTypeIsADynamicType()

bool mlirTypeIsADynamicType ( MlirType type)

Check if the given type is a dynamic type.

Definition at line 133 of file ExtensibleDialect.cpp.

References unwrap().