MLIR 23.0.0git
ExtensibleDialect.cpp File Reference

Go to the source code of this file.

Classes

class  mlir::ExternalDynamicOpTrait

Namespaces

namespace  mlir
 Include the generated interface declarations.

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.
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 162 of file ExtensibleDialect.cpp.

References unwrap().

◆ mlirDialectIsAExtensibleDialect()

bool mlirDialectIsAExtensibleDialect ( MlirDialect dialect)

Check if the given dialect is an extensible dialect.

Definition at line 99 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 203 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 198 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 193 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 170 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 188 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 180 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 184 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 93 of file ExtensibleDialect.cpp.

References unwrap(), and wrap().

◆ mlirDynamicOpTraitDestroy()

void mlirDynamicOpTraitDestroy ( MlirDynamicOpTrait dynamicOpTrait)

Destroy the dynamic op trait.

Definition at line 57 of file ExtensibleDialect.cpp.

References unwrap().

◆ 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().

◆ mlirDynamicTypeDefinitionGetDialect()

MlirDialect mlirDynamicTypeDefinitionGetDialect ( MlirDynamicTypeDefinition typeDef)

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

Definition at line 151 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 146 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 141 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 118 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 128 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 132 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 136 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 156 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 104 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 110 of file ExtensibleDialect.cpp.

References unwrap().