API
Types and constants
MLIR.API.MlirDiagnostic
MLIR.API.MlirDiagnosticHandler
MLIR.API.MlirDiagnosticHandlerID
MLIR.API.MlirDiagnosticSeverity
MLIR.API.MlirExternalPassCallbacks
MLIR.API.MlirLogicalResult
MLIR.API.MlirNamedAttribute
MLIR.API.MlirOperationState
MLIR.API.MlirSparseTensorDimLevelType
MLIR.API.MlirStringCallback
MLIR.API.MlirStringRef
MLIR.API.MlirTypesCallback
Functions and macros
MLIR.API.mlirAffineAddExprGet
MLIR.API.mlirAffineBinaryOpExprGetLHS
MLIR.API.mlirAffineBinaryOpExprGetRHS
MLIR.API.mlirAffineCeilDivExprGet
MLIR.API.mlirAffineConstantExprGet
MLIR.API.mlirAffineConstantExprGetValue
MLIR.API.mlirAffineDimExprGet
MLIR.API.mlirAffineDimExprGetPosition
MLIR.API.mlirAffineExprCompose
MLIR.API.mlirAffineExprDump
MLIR.API.mlirAffineExprEqual
MLIR.API.mlirAffineExprGetContext
MLIR.API.mlirAffineExprGetLargestKnownDivisor
MLIR.API.mlirAffineExprIsAAdd
MLIR.API.mlirAffineExprIsABinary
MLIR.API.mlirAffineExprIsACeilDiv
MLIR.API.mlirAffineExprIsAConstant
MLIR.API.mlirAffineExprIsADim
MLIR.API.mlirAffineExprIsAFloorDiv
MLIR.API.mlirAffineExprIsAMod
MLIR.API.mlirAffineExprIsAMul
MLIR.API.mlirAffineExprIsASymbol
MLIR.API.mlirAffineExprIsFunctionOfDim
MLIR.API.mlirAffineExprIsMultipleOf
MLIR.API.mlirAffineExprIsNull
MLIR.API.mlirAffineExprIsPureAffine
MLIR.API.mlirAffineExprIsSymbolicOrConstant
MLIR.API.mlirAffineExprPrint
MLIR.API.mlirAffineFloorDivExprGet
MLIR.API.mlirAffineMapAttrGet
MLIR.API.mlirAffineMapAttrGetValue
MLIR.API.mlirAffineMapCompressUnusedSymbols
MLIR.API.mlirAffineMapConstantGet
MLIR.API.mlirAffineMapDump
MLIR.API.mlirAffineMapEmptyGet
MLIR.API.mlirAffineMapEqual
MLIR.API.mlirAffineMapGet
MLIR.API.mlirAffineMapGetContext
MLIR.API.mlirAffineMapGetMajorSubMap
MLIR.API.mlirAffineMapGetMinorSubMap
MLIR.API.mlirAffineMapGetNumDims
MLIR.API.mlirAffineMapGetNumInputs
MLIR.API.mlirAffineMapGetNumResults
MLIR.API.mlirAffineMapGetNumSymbols
MLIR.API.mlirAffineMapGetResult
MLIR.API.mlirAffineMapGetSingleConstantResult
MLIR.API.mlirAffineMapGetSubMap
MLIR.API.mlirAffineMapIsEmpty
MLIR.API.mlirAffineMapIsIdentity
MLIR.API.mlirAffineMapIsMinorIdentity
MLIR.API.mlirAffineMapIsNull
MLIR.API.mlirAffineMapIsPermutation
MLIR.API.mlirAffineMapIsProjectedPermutation
MLIR.API.mlirAffineMapIsSingleConstant
MLIR.API.mlirAffineMapMinorIdentityGet
MLIR.API.mlirAffineMapMultiDimIdentityGet
MLIR.API.mlirAffineMapPermutationGet
MLIR.API.mlirAffineMapPrint
MLIR.API.mlirAffineMapReplace
MLIR.API.mlirAffineMapZeroResultGet
MLIR.API.mlirAffineModExprGet
MLIR.API.mlirAffineMulExprGet
MLIR.API.mlirAffineSymbolExprGet
MLIR.API.mlirAffineSymbolExprGetPosition
MLIR.API.mlirAnyQuantizedTypeGet
MLIR.API.mlirArrayAttrGet
MLIR.API.mlirArrayAttrGetElement
MLIR.API.mlirArrayAttrGetNumElements
MLIR.API.mlirAttributeDump
MLIR.API.mlirAttributeEqual
MLIR.API.mlirAttributeGetContext
MLIR.API.mlirAttributeGetNull
MLIR.API.mlirAttributeGetType
MLIR.API.mlirAttributeGetTypeID
MLIR.API.mlirAttributeIsAAffineMap
MLIR.API.mlirAttributeIsAArray
MLIR.API.mlirAttributeIsABool
MLIR.API.mlirAttributeIsADenseElements
MLIR.API.mlirAttributeIsADictionary
MLIR.API.mlirAttributeIsAElements
MLIR.API.mlirAttributeIsAFlatSymbolRef
MLIR.API.mlirAttributeIsAFloat
MLIR.API.mlirAttributeIsAInteger
MLIR.API.mlirAttributeIsAIntegerSet
MLIR.API.mlirAttributeIsAOpaque
MLIR.API.mlirAttributeIsAOpaqueElements
MLIR.API.mlirAttributeIsASparseElements
MLIR.API.mlirAttributeIsASparseTensorEncodingAttr
MLIR.API.mlirAttributeIsAString
MLIR.API.mlirAttributeIsASymbolRef
MLIR.API.mlirAttributeIsAType
MLIR.API.mlirAttributeIsAUnit
MLIR.API.mlirAttributeIsNull
MLIR.API.mlirAttributeParseGet
MLIR.API.mlirAttributePrint
MLIR.API.mlirBF16TypeGet
MLIR.API.mlirBlockAddArgument
MLIR.API.mlirBlockAppendOwnedOperation
MLIR.API.mlirBlockArgumentGetArgNumber
MLIR.API.mlirBlockArgumentGetOwner
MLIR.API.mlirBlockArgumentSetType
MLIR.API.mlirBlockCreate
MLIR.API.mlirBlockDestroy
MLIR.API.mlirBlockDetach
MLIR.API.mlirBlockEqual
MLIR.API.mlirBlockGetArgument
MLIR.API.mlirBlockGetFirstOperation
MLIR.API.mlirBlockGetNextInRegion
MLIR.API.mlirBlockGetNumArguments
MLIR.API.mlirBlockGetParentOperation
MLIR.API.mlirBlockGetParentRegion
MLIR.API.mlirBlockGetTerminator
MLIR.API.mlirBlockInsertOwnedOperation
MLIR.API.mlirBlockInsertOwnedOperationAfter
MLIR.API.mlirBlockInsertOwnedOperationBefore
MLIR.API.mlirBlockIsNull
MLIR.API.mlirBlockPrint
MLIR.API.mlirBoolAttrGet
MLIR.API.mlirBoolAttrGetValue
MLIR.API.mlirCalibratedQuantizedTypeGet
MLIR.API.mlirCalibratedQuantizedTypeGetMax
MLIR.API.mlirCalibratedQuantizedTypeGetMin
MLIR.API.mlirComplexTypeGet
MLIR.API.mlirComplexTypeGetElementType
MLIR.API.mlirContextAppendDialectRegistry
MLIR.API.mlirContextAttachDiagnosticHandler
MLIR.API.mlirContextCreate
MLIR.API.mlirContextDestroy
MLIR.API.mlirContextDetachDiagnosticHandler
MLIR.API.mlirContextEnableMultithreading
MLIR.API.mlirContextEqual
MLIR.API.mlirContextGetAllowUnregisteredDialects
MLIR.API.mlirContextGetNumLoadedDialects
MLIR.API.mlirContextGetNumRegisteredDialects
MLIR.API.mlirContextGetOrLoadDialect
MLIR.API.mlirContextIsNull
MLIR.API.mlirContextIsRegisteredOperation
MLIR.API.mlirContextLoadAllAvailableDialects
MLIR.API.mlirContextSetAllowUnregisteredDialects
MLIR.API.mlirCreateExternalPass
MLIR.API.mlirDenseElementsAttrBoolGet
MLIR.API.mlirDenseElementsAttrGet
MLIR.API.mlirDenseElementsAttrGetBoolValue
MLIR.API.mlirDenseElementsAttrGetRawData
MLIR.API.mlirDenseElementsAttrGetSplatValue
MLIR.API.mlirDenseElementsAttrIsSplat
MLIR.API.mlirDenseElementsAttrRawBufferGet
MLIR.API.mlirDenseElementsAttrReshapeGet
MLIR.API.mlirDenseElementsAttrSplatGet
MLIR.API.mlirDenseElementsAttrStringGet
MLIR.API.mlirDiagnosticGetLocation
MLIR.API.mlirDiagnosticGetNote
MLIR.API.mlirDiagnosticGetNumNotes
MLIR.API.mlirDiagnosticGetSeverity
MLIR.API.mlirDiagnosticPrint
MLIR.API.mlirDialectEqual
MLIR.API.mlirDialectGetContext
MLIR.API.mlirDialectGetNamespace
MLIR.API.mlirDialectHandleGetNamespace
MLIR.API.mlirDialectHandleInsertDialect
MLIR.API.mlirDialectHandleLoadDialect
MLIR.API.mlirDialectHandleRegisterDialect
MLIR.API.mlirDialectIsNull
MLIR.API.mlirDialectRegistryCreate
MLIR.API.mlirDialectRegistryDestroy
MLIR.API.mlirDialectRegistryIsNull
MLIR.API.mlirDictionaryAttrGet
MLIR.API.mlirDictionaryAttrGetElement
MLIR.API.mlirDictionaryAttrGetElementByName
MLIR.API.mlirDictionaryAttrGetNumElements
MLIR.API.mlirElementsAttrGetNumElements
MLIR.API.mlirElementsAttrGetValue
MLIR.API.mlirElementsAttrIsValidIndex
MLIR.API.mlirEmitError
MLIR.API.mlirEnableGlobalDebug
MLIR.API.mlirExecutionEngineCreate
MLIR.API.mlirExecutionEngineDestroy
MLIR.API.mlirExecutionEngineDumpToObjectFile
MLIR.API.mlirExecutionEngineInvokePacked
MLIR.API.mlirExecutionEngineIsNull
MLIR.API.mlirExecutionEngineLookup
MLIR.API.mlirExecutionEngineLookupPacked
MLIR.API.mlirExecutionEngineRegisterSymbol
MLIR.API.mlirExternalPassSignalFailure
MLIR.API.mlirF16TypeGet
MLIR.API.mlirF32TypeGet
MLIR.API.mlirF64TypeGet
MLIR.API.mlirFlatSymbolRefAttrGet
MLIR.API.mlirFlatSymbolRefAttrGetValue
MLIR.API.mlirFloatAttrDoubleGet
MLIR.API.mlirFloatAttrDoubleGetChecked
MLIR.API.mlirFloatAttrGetValueDouble
MLIR.API.mlirFunctionTypeGet
MLIR.API.mlirFunctionTypeGetInput
MLIR.API.mlirFunctionTypeGetNumInputs
MLIR.API.mlirFunctionTypeGetNumResults
MLIR.API.mlirFunctionTypeGetResult
MLIR.API.mlirIdentifierEqual
MLIR.API.mlirIdentifierGet
MLIR.API.mlirIdentifierGetContext
MLIR.API.mlirIdentifierStr
MLIR.API.mlirIndexTypeGet
MLIR.API.mlirInferTypeOpInterfaceInferReturnTypes
MLIR.API.mlirInferTypeOpInterfaceTypeID
MLIR.API.mlirIntegerAttrGet
MLIR.API.mlirIntegerAttrGetValueInt
MLIR.API.mlirIntegerAttrGetValueSInt
MLIR.API.mlirIntegerAttrGetValueUInt
MLIR.API.mlirIntegerSetDump
MLIR.API.mlirIntegerSetEmptyGet
MLIR.API.mlirIntegerSetEqual
MLIR.API.mlirIntegerSetGet
MLIR.API.mlirIntegerSetGetConstraint
MLIR.API.mlirIntegerSetGetContext
MLIR.API.mlirIntegerSetGetNumConstraints
MLIR.API.mlirIntegerSetGetNumDims
MLIR.API.mlirIntegerSetGetNumEqualities
MLIR.API.mlirIntegerSetGetNumInequalities
MLIR.API.mlirIntegerSetGetNumInputs
MLIR.API.mlirIntegerSetGetNumSymbols
MLIR.API.mlirIntegerSetIsCanonicalEmpty
MLIR.API.mlirIntegerSetIsConstraintEq
MLIR.API.mlirIntegerSetIsNull
MLIR.API.mlirIntegerSetPrint
MLIR.API.mlirIntegerSetReplaceGet
MLIR.API.mlirIntegerTypeGet
MLIR.API.mlirIntegerTypeGetWidth
MLIR.API.mlirIntegerTypeIsSigned
MLIR.API.mlirIntegerTypeIsSignless
MLIR.API.mlirIntegerTypeIsUnsigned
MLIR.API.mlirIntegerTypeSignedGet
MLIR.API.mlirIntegerTypeUnsignedGet
MLIR.API.mlirIsGlobalDebugEnabled
MLIR.API.mlirLLVMArrayTypeGet
MLIR.API.mlirLLVMFunctionTypeGet
MLIR.API.mlirLLVMPointerTypeGet
MLIR.API.mlirLLVMStructTypeLiteralGet
MLIR.API.mlirLLVMVoidTypeGet
MLIR.API.mlirLinalgFillBuiltinNamedOpRegion
MLIR.API.mlirLocationCallSiteGet
MLIR.API.mlirLocationEqual
MLIR.API.mlirLocationFileLineColGet
MLIR.API.mlirLocationFusedGet
MLIR.API.mlirLocationGetContext
MLIR.API.mlirLocationIsNull
MLIR.API.mlirLocationNameGet
MLIR.API.mlirLocationPrint
MLIR.API.mlirLocationUnknownGet
MLIR.API.mlirLogicalResultFailure
MLIR.API.mlirLogicalResultIsFailure
MLIR.API.mlirLogicalResultIsSuccess
MLIR.API.mlirLogicalResultSuccess
MLIR.API.mlirMemRefTypeContiguousGet
MLIR.API.mlirMemRefTypeContiguousGetChecked
MLIR.API.mlirMemRefTypeGet
MLIR.API.mlirMemRefTypeGetAffineMap
MLIR.API.mlirMemRefTypeGetChecked
MLIR.API.mlirMemRefTypeGetLayout
MLIR.API.mlirMemRefTypeGetMemorySpace
MLIR.API.mlirModuleCreateEmpty
MLIR.API.mlirModuleCreateParse
MLIR.API.mlirModuleDestroy
MLIR.API.mlirModuleFromOperation
MLIR.API.mlirModuleGetBody
MLIR.API.mlirModuleGetContext
MLIR.API.mlirModuleGetOperation
MLIR.API.mlirModuleIsNull
MLIR.API.mlirNamedAttributeGet
MLIR.API.mlirNoneTypeGet
MLIR.API.mlirOpPassManagerAddOwnedPass
MLIR.API.mlirOpPassManagerGetNestedUnder
MLIR.API.mlirOpPrintingFlagsCreate
MLIR.API.mlirOpPrintingFlagsDestroy
MLIR.API.mlirOpPrintingFlagsElideLargeElementsAttrs
MLIR.API.mlirOpPrintingFlagsEnableDebugInfo
MLIR.API.mlirOpPrintingFlagsPrintGenericOpForm
MLIR.API.mlirOpPrintingFlagsUseLocalScope
MLIR.API.mlirOpResultGetOwner
MLIR.API.mlirOpResultGetResultNumber
MLIR.API.mlirOpaqueAttrGet
MLIR.API.mlirOpaqueAttrGetData
MLIR.API.mlirOpaqueAttrGetDialectNamespace
MLIR.API.mlirOpaqueTypeGet
MLIR.API.mlirOpaqueTypeGetData
MLIR.API.mlirOpaqueTypeGetDialectNamespace
MLIR.API.mlirOperationClone
MLIR.API.mlirOperationCreate
MLIR.API.mlirOperationDestroy
MLIR.API.mlirOperationDump
MLIR.API.mlirOperationEqual
MLIR.API.mlirOperationGetAttribute
MLIR.API.mlirOperationGetAttributeByName
MLIR.API.mlirOperationGetBlock
MLIR.API.mlirOperationGetContext
MLIR.API.mlirOperationGetFirstRegion
MLIR.API.mlirOperationGetLocation
MLIR.API.mlirOperationGetName
MLIR.API.mlirOperationGetNextInBlock
MLIR.API.mlirOperationGetNumAttributes
MLIR.API.mlirOperationGetNumOperands
MLIR.API.mlirOperationGetNumRegions
MLIR.API.mlirOperationGetNumResults
MLIR.API.mlirOperationGetNumSuccessors
MLIR.API.mlirOperationGetOperand
MLIR.API.mlirOperationGetParentOperation
MLIR.API.mlirOperationGetRegion
MLIR.API.mlirOperationGetResult
MLIR.API.mlirOperationGetSuccessor
MLIR.API.mlirOperationGetTypeID
MLIR.API.mlirOperationImplementsInterface
MLIR.API.mlirOperationImplementsInterfaceStatic
MLIR.API.mlirOperationIsNull
MLIR.API.mlirOperationMoveAfter
MLIR.API.mlirOperationMoveBefore
MLIR.API.mlirOperationPrint
MLIR.API.mlirOperationPrintWithFlags
MLIR.API.mlirOperationRemoveAttributeByName
MLIR.API.mlirOperationRemoveFromParent
MLIR.API.mlirOperationSetAttributeByName
MLIR.API.mlirOperationSetOperand
MLIR.API.mlirOperationStateAddResults
MLIR.API.mlirOperationStateEnableResultTypeInference
MLIR.API.mlirOperationStateGet
MLIR.API.mlirOperationVerify
MLIR.API.mlirParsePassPipeline
MLIR.API.mlirPassManagerAddOwnedPass
MLIR.API.mlirPassManagerCreate
MLIR.API.mlirPassManagerDestroy
MLIR.API.mlirPassManagerEnableIRPrinting
MLIR.API.mlirPassManagerEnableVerifier
MLIR.API.mlirPassManagerGetAsOpPassManager
MLIR.API.mlirPassManagerGetNestedUnder
MLIR.API.mlirPassManagerIsNull
MLIR.API.mlirPassManagerRun
MLIR.API.mlirPrintPassPipeline
MLIR.API.mlirQuantizedTypeCastExpressedToStorageType
MLIR.API.mlirQuantizedTypeCastFromExpressedType
MLIR.API.mlirQuantizedTypeCastFromStorageType
MLIR.API.mlirQuantizedTypeCastToExpressedType
MLIR.API.mlirQuantizedTypeCastToStorageType
MLIR.API.mlirQuantizedTypeGetDefaultMaximumForInteger
MLIR.API.mlirQuantizedTypeGetDefaultMinimumForInteger
MLIR.API.mlirQuantizedTypeGetExpressedType
MLIR.API.mlirQuantizedTypeGetFlags
MLIR.API.mlirQuantizedTypeGetQuantizedElementType
MLIR.API.mlirQuantizedTypeGetSignedFlag
MLIR.API.mlirQuantizedTypeGetStorageType
MLIR.API.mlirQuantizedTypeGetStorageTypeIntegralWidth
MLIR.API.mlirQuantizedTypeGetStorageTypeMax
MLIR.API.mlirQuantizedTypeGetStorageTypeMin
MLIR.API.mlirQuantizedTypeIsCompatibleExpressedType
MLIR.API.mlirQuantizedTypeIsSigned
MLIR.API.mlirRankedTensorTypeGet
MLIR.API.mlirRankedTensorTypeGetChecked
MLIR.API.mlirRankedTensorTypeGetEncoding
MLIR.API.mlirRegionAppendOwnedBlock
MLIR.API.mlirRegionCreate
MLIR.API.mlirRegionDestroy
MLIR.API.mlirRegionEqual
MLIR.API.mlirRegionGetFirstBlock
MLIR.API.mlirRegionGetNextInOperation
MLIR.API.mlirRegionInsertOwnedBlock
MLIR.API.mlirRegionInsertOwnedBlockAfter
MLIR.API.mlirRegionInsertOwnedBlockBefore
MLIR.API.mlirRegionIsNull
MLIR.API.mlirRegisterAllDialects
MLIR.API.mlirRegisterAllLLVMTranslations
MLIR.API.mlirRegisterAllPasses
MLIR.API.mlirShapedTypeGetDimSize
MLIR.API.mlirShapedTypeGetDynamicSize
MLIR.API.mlirShapedTypeGetDynamicStrideOrOffset
MLIR.API.mlirShapedTypeGetElementType
MLIR.API.mlirShapedTypeGetRank
MLIR.API.mlirShapedTypeHasRank
MLIR.API.mlirShapedTypeHasStaticShape
MLIR.API.mlirShapedTypeIsDynamicDim
MLIR.API.mlirShapedTypeIsDynamicSize
MLIR.API.mlirShapedTypeIsDynamicStrideOrOffset
MLIR.API.mlirSparseElementsAttrGetIndices
MLIR.API.mlirSparseElementsAttrGetValues
MLIR.API.mlirSparseElementsAttribute
MLIR.API.mlirSparseTensorEncodingAttrGet
MLIR.API.mlirSparseTensorEncodingAttrGetDimLevelType
MLIR.API.mlirSparseTensorEncodingAttrGetDimOrdering
MLIR.API.mlirSparseTensorEncodingAttrGetIndexBitWidth
MLIR.API.mlirSparseTensorEncodingAttrGetPointerBitWidth
MLIR.API.mlirSparseTensorEncodingGetNumDimLevelTypes
MLIR.API.mlirStringAttrGet
MLIR.API.mlirStringAttrGetValue
MLIR.API.mlirStringAttrTypedGet
MLIR.API.mlirStringRefCreate
MLIR.API.mlirStringRefCreateFromCString
MLIR.API.mlirStringRefEqual
MLIR.API.mlirSymbolRefAttrGet
MLIR.API.mlirSymbolRefAttrGetLeafReference
MLIR.API.mlirSymbolRefAttrGetNestedReference
MLIR.API.mlirSymbolRefAttrGetNumNestedReferences
MLIR.API.mlirSymbolRefAttrGetRootReference
MLIR.API.mlirSymbolTableCreate
MLIR.API.mlirSymbolTableDestroy
MLIR.API.mlirSymbolTableErase
MLIR.API.mlirSymbolTableGetSymbolAttributeName
MLIR.API.mlirSymbolTableGetVisibilityAttributeName
MLIR.API.mlirSymbolTableInsert
MLIR.API.mlirSymbolTableIsNull
MLIR.API.mlirSymbolTableLookup
MLIR.API.mlirSymbolTableReplaceAllSymbolUses
MLIR.API.mlirSymbolTableWalkSymbolTables
MLIR.API.mlirTupleTypeGet
MLIR.API.mlirTupleTypeGetNumTypes
MLIR.API.mlirTupleTypeGetType
MLIR.API.mlirTypeAttrGet
MLIR.API.mlirTypeAttrGetValue
MLIR.API.mlirTypeDump
MLIR.API.mlirTypeEqual
MLIR.API.mlirTypeGetContext
MLIR.API.mlirTypeGetTypeID
MLIR.API.mlirTypeIDAllocatorAllocateTypeID
MLIR.API.mlirTypeIDAllocatorCreate
MLIR.API.mlirTypeIDAllocatorDestroy
MLIR.API.mlirTypeIDCreate
MLIR.API.mlirTypeIDEqual
MLIR.API.mlirTypeIDHashValue
MLIR.API.mlirTypeIDIsNull
MLIR.API.mlirTypeIsAAnyQuantizedType
MLIR.API.mlirTypeIsABF16
MLIR.API.mlirTypeIsACalibratedQuantizedType
MLIR.API.mlirTypeIsAComplex
MLIR.API.mlirTypeIsAF16
MLIR.API.mlirTypeIsAF32
MLIR.API.mlirTypeIsAF64
MLIR.API.mlirTypeIsAFunction
MLIR.API.mlirTypeIsAIndex
MLIR.API.mlirTypeIsAInteger
MLIR.API.mlirTypeIsAMemRef
MLIR.API.mlirTypeIsANone
MLIR.API.mlirTypeIsAOpaque
MLIR.API.mlirTypeIsAQuantizedType
MLIR.API.mlirTypeIsARankedTensor
MLIR.API.mlirTypeIsAShaped
MLIR.API.mlirTypeIsATensor
MLIR.API.mlirTypeIsATuple
MLIR.API.mlirTypeIsAUniformQuantizedPerAxisType
MLIR.API.mlirTypeIsAUniformQuantizedType
MLIR.API.mlirTypeIsAUnrankedMemRef
MLIR.API.mlirTypeIsAUnrankedTensor
MLIR.API.mlirTypeIsAVector
MLIR.API.mlirTypeIsNull
MLIR.API.mlirTypeParseGet
MLIR.API.mlirTypePrint
MLIR.API.mlirUniformQuantizedPerAxisTypeGet
MLIR.API.mlirUniformQuantizedPerAxisTypeGetNumDims
MLIR.API.mlirUniformQuantizedPerAxisTypeGetQuantizedDimension
MLIR.API.mlirUniformQuantizedPerAxisTypeGetScale
MLIR.API.mlirUniformQuantizedPerAxisTypeGetZeroPoint
MLIR.API.mlirUniformQuantizedPerAxisTypeIsFixedPoint
MLIR.API.mlirUniformQuantizedTypeGet
MLIR.API.mlirUniformQuantizedTypeGetScale
MLIR.API.mlirUniformQuantizedTypeGetZeroPoint
MLIR.API.mlirUniformQuantizedTypeIsFixedPoint
MLIR.API.mlirUnitAttrGet
MLIR.API.mlirUnrankedMemRefTypeGet
MLIR.API.mlirUnrankedMemRefTypeGetChecked
MLIR.API.mlirUnrankedMemrefGetMemorySpace
MLIR.API.mlirUnrankedTensorTypeGet
MLIR.API.mlirUnrankedTensorTypeGetChecked
MLIR.API.mlirValueDump
MLIR.API.mlirValueEqual
MLIR.API.mlirValueGetType
MLIR.API.mlirValueIsABlockArgument
MLIR.API.mlirValueIsAOpResult
MLIR.API.mlirValueIsNull
MLIR.API.mlirValuePrint
MLIR.API.mlirVectorTypeGet
MLIR.API.mlirVectorTypeGetChecked
Documentation
MLIR.API.MlirDiagnostic
— TypeMlirDiagnostic
An opaque reference to a diagnostic, always owned by the diagnostics engine (context). Must not be stored outside of the diagnostic handler.
MLIR.API.MlirDiagnosticHandler
— TypeDiagnostic handler type. Accepts a reference to a diagnostic, which is only guaranteed to be live during the call. The handler is passed the userData
that was provided when the handler was attached to a context. If the handler processed the diagnostic completely, it is expected to return success. Otherwise, it is expected to return failure to indicate that other handlers should attempt to process the diagnostic.
MLIR.API.MlirDiagnosticHandlerID
— TypeOpaque identifier of a diagnostic handler, useful to detach a handler.
MLIR.API.MlirDiagnosticSeverity
— TypeMlirDiagnosticSeverity
Severity of a diagnostic.
MLIR.API.MlirExternalPassCallbacks
— TypeMlirExternalPassCallbacks
Structure of external MlirPass
callbacks. All callbacks are required to be set unless otherwise specified.
Field | Note |
---|---|
construct | This callback is called from the pass is created. This is analogous to a C++ pass constructor. |
destruct | This callback is called when the pass is destroyed This is analogous to a C++ pass destructor. |
initialize | This callback is optional. The callback is called before the pass is run, allowing a chance to initialize any complex state necessary for running the pass. See Pass::initialize(MLIRContext *). |
clone | This callback is called when the pass is cloned. See Pass::clonePass(). |
run | This callback is called when the pass is run. See Pass::runOnOperation(). |
MLIR.API.MlirLogicalResult
— TypeMlirLogicalResult
A logical result value, essentially a boolean with named states. LLVM convention for using boolean values to designate success or failure of an operation is a moving target, so MLIR opted for an explicit class. Instances of MlirLogicalResult
must only be inspected using the associated functions.
MLIR.API.MlirNamedAttribute
— TypeMlirNamedAttribute
Named MLIR attribute.
A named attribute is essentially a (name, attribute) pair where the name is a string.
MLIR.API.MlirOperationState
— TypeMlirOperationState
An auxiliary class for constructing operations.
This class contains all the information necessary to construct the operation. It owns the MlirRegions it has pointers to and does not own anything else. By default, the state can be constructed from a name and location, the latter being also used to access the context, and has no other components. These components can be added progressively until the operation is constructed. Users are not expected to rely on the internals of this class and should use mlirOperationState* functions instead.
MLIR.API.MlirSparseTensorDimLevelType
— TypeMlirSparseTensorDimLevelType
Dimension level types that define sparse tensors: - MLIR_SPARSE_TENSOR_DIM_LEVEL_DENSE - dimension is dense, every entry is stored - MLIR_SPARSE_TENSOR_DIM_LEVEL_COMPRESSED - dimension is sparse, only nonzeros are stored. - MLIR_SPARSE_TENSOR_DIM_LEVEL_SINGLETON - dimension contains single coordinate, no siblings.
These correspond to SparseTensorEncodingAttr::DimLevelType in the C++ API. If updating, keep them in sync and update the static_assert in the impl file.
MLIR.API.MlirStringCallback
— TypeA callback for returning string references.
This function is called back by the functions that need to return a reference to the portion of the string with the following arguments: - an MlirStringRef
representing the current portion of the string - a pointer to user data forwarded from the printing call.
MLIR.API.MlirStringRef
— TypeMlirStringRef
A pointer to a sized fragment of a string, not necessarily null-terminated. Does not own the underlying string. This is equivalent to llvm::StringRef.
Field | Note |
---|---|
data | Pointer to the first symbol. |
length | Length of the fragment. |
MLIR.API.MlirTypesCallback
— TypeThese callbacks are used to return multiple types from functions while transferring ownership to the caller. The first argument is the number of consecutive elements pointed to by the second argument. The third argument is an opaque pointer forwarded to the callback by the caller.
MLIR.API.mlirAffineAddExprGet
— MethodmlirAffineAddExprGet(lhs, rhs)
Creates an affine add expression with 'lhs' and 'rhs'.
MLIR.API.mlirAffineBinaryOpExprGetLHS
— MethodmlirAffineBinaryOpExprGetLHS(affineExpr)
Returns the left hand side affine expression of the given affine binary operation expression.
MLIR.API.mlirAffineBinaryOpExprGetRHS
— MethodmlirAffineBinaryOpExprGetRHS(affineExpr)
Returns the right hand side affine expression of the given affine binary operation expression.
MLIR.API.mlirAffineCeilDivExprGet
— MethodmlirAffineCeilDivExprGet(lhs, rhs)
Creates an affine ceildiv expression with 'lhs' and 'rhs'.
MLIR.API.mlirAffineConstantExprGet
— MethodmlirAffineConstantExprGet(ctx, constant)
Creates an affine constant expression with 'constant' in the context.
MLIR.API.mlirAffineConstantExprGetValue
— MethodmlirAffineConstantExprGetValue(affineExpr)
Returns the value of the given affine constant expression.
MLIR.API.mlirAffineDimExprGet
— MethodmlirAffineDimExprGet(ctx, position)
Creates an affine dimension expression with 'position' in the context.
MLIR.API.mlirAffineDimExprGetPosition
— MethodmlirAffineDimExprGetPosition(affineExpr)
Returns the position of the given affine dimension expression.
MLIR.API.mlirAffineExprCompose
— MethodmlirAffineExprCompose(affineExpr, affineMap)
Composes the given map with the given expression.
MLIR.API.mlirAffineExprDump
— MethodmlirAffineExprDump(affineExpr)
Prints the affine expression to the standard error stream.
MLIR.API.mlirAffineExprEqual
— MethodmlirAffineExprEqual(lhs, rhs)
Returns true
if the two affine expressions are equal.
MLIR.API.mlirAffineExprGetContext
— MethodmlirAffineExprGetContext(affineExpr)
Gets the context that owns the affine expression.
MLIR.API.mlirAffineExprGetLargestKnownDivisor
— MethodmlirAffineExprGetLargestKnownDivisor(affineExpr)
Returns the greatest known integral divisor of this affine expression. The result is always positive.
MLIR.API.mlirAffineExprIsAAdd
— MethodmlirAffineExprIsAAdd(affineExpr)
Checks whether the given affine expression is an add expression.
MLIR.API.mlirAffineExprIsABinary
— MethodmlirAffineExprIsABinary(affineExpr)
Checks whether the given affine expression is binary.
MLIR.API.mlirAffineExprIsACeilDiv
— MethodmlirAffineExprIsACeilDiv(affineExpr)
Checks whether the given affine expression is an ceildiv expression.
MLIR.API.mlirAffineExprIsAConstant
— MethodmlirAffineExprIsAConstant(affineExpr)
Checks whether the given affine expression is a constant expression.
MLIR.API.mlirAffineExprIsADim
— MethodmlirAffineExprIsADim(affineExpr)
Checks whether the given affine expression is a dimension expression.
MLIR.API.mlirAffineExprIsAFloorDiv
— MethodmlirAffineExprIsAFloorDiv(affineExpr)
Checks whether the given affine expression is an floordiv expression.
MLIR.API.mlirAffineExprIsAMod
— MethodmlirAffineExprIsAMod(affineExpr)
Checks whether the given affine expression is an mod expression.
MLIR.API.mlirAffineExprIsAMul
— MethodmlirAffineExprIsAMul(affineExpr)
Checks whether the given affine expression is an mul expression.
MLIR.API.mlirAffineExprIsASymbol
— MethodmlirAffineExprIsASymbol(affineExpr)
Checks whether the given affine expression is a symbol expression.
MLIR.API.mlirAffineExprIsFunctionOfDim
— MethodmlirAffineExprIsFunctionOfDim(affineExpr, position)
Checks whether the given affine expression involves AffineDimExpr 'position'.
MLIR.API.mlirAffineExprIsMultipleOf
— MethodmlirAffineExprIsMultipleOf(affineExpr, factor)
Checks whether the given affine expression is a multiple of 'factor'.
MLIR.API.mlirAffineExprIsNull
— MethodmlirAffineExprIsNull(affineExpr)
Returns true
if the given affine expression is a null expression. Note constant zero is not a null expression.
MLIR.API.mlirAffineExprIsPureAffine
— MethodmlirAffineExprIsPureAffine(affineExpr)
Checks whether the given affine expression is a pure affine expression, i.e. mul, floordiv, ceildic, and mod is only allowed w.r.t constants.
MLIR.API.mlirAffineExprIsSymbolicOrConstant
— MethodmlirAffineExprIsSymbolicOrConstant(affineExpr)
Checks whether the given affine expression is made out of only symbols and constants.
MLIR.API.mlirAffineExprPrint
— MethodmlirAffineExprPrint(affineExpr, callback, userData)
Prints an affine expression by sending chunks of the string representation and forwarding userData to
callback`. Note that the callback may be called several times with consecutive chunks of the string.
MLIR.API.mlirAffineFloorDivExprGet
— MethodmlirAffineFloorDivExprGet(lhs, rhs)
Creates an affine floordiv expression with 'lhs' and 'rhs'.
MLIR.API.mlirAffineMapAttrGet
— MethodmlirAffineMapAttrGet(map)
Creates an affine map attribute wrapping the given map. The attribute belongs to the same context as the affine map.
MLIR.API.mlirAffineMapAttrGetValue
— MethodmlirAffineMapAttrGetValue(attr)
Returns the affine map wrapped in the given affine map attribute.
MLIR.API.mlirAffineMapCompressUnusedSymbols
— MethodmlirAffineMapCompressUnusedSymbols(affineMaps, size, result, populateResult)
Returns the simplified affine map resulting from dropping the symbols that do not appear in any of the individual maps in affineMaps
. Asserts that all maps in affineMaps
are normalized to the same number of dims and symbols. Takes a callback populateResult
to fill the res
container with value m
at entry idx
. This allows returning without worrying about ownership considerations.
MLIR.API.mlirAffineMapConstantGet
— MethodmlirAffineMapConstantGet(ctx, val)
Creates a single constant result affine map in the context. The affine map is owned by the context.
MLIR.API.mlirAffineMapDump
— MethodmlirAffineMapDump(affineMap)
Prints the affine map to the standard error stream.
MLIR.API.mlirAffineMapEmptyGet
— MethodmlirAffineMapEmptyGet(ctx)
Creates a zero result affine map with no dimensions or symbols in the context. The affine map is owned by the context.
MLIR.API.mlirAffineMapEqual
— MethodmlirAffineMapEqual(a1, a2)
Checks if two affine maps are equal.
MLIR.API.mlirAffineMapGet
— MethodmlirAffineMapGet(ctx, dimCount, symbolCount, nAffineExprs, affineExprs)
Creates an affine map with results defined by the given list of affine expressions. The map resulting map also has the requested number of input dimensions and symbols, regardless of them being used in the results.
MLIR.API.mlirAffineMapGetContext
— MethodmlirAffineMapGetContext(affineMap)
Gets the context that the given affine map was created with
MLIR.API.mlirAffineMapGetMajorSubMap
— MethodmlirAffineMapGetMajorSubMap(affineMap, numResults)
Returns the affine map consisting of the most major numResults
results. Returns the null AffineMap if the numResults
is equal to zero. Returns the affineMap
if numResults
is greater or equals to number of results of the given affine map.
MLIR.API.mlirAffineMapGetMinorSubMap
— MethodmlirAffineMapGetMinorSubMap(affineMap, numResults)
Returns the affine map consisting of the most minor numResults
results. Returns the null AffineMap if the numResults
is equal to zero. Returns the affineMap
if numResults
is greater or equals to number of results of the given affine map.
MLIR.API.mlirAffineMapGetNumDims
— MethodmlirAffineMapGetNumDims(affineMap)
Returns the number of dimensions of the given affine map.
MLIR.API.mlirAffineMapGetNumInputs
— MethodmlirAffineMapGetNumInputs(affineMap)
Returns the number of inputs (dimensions + symbols) of the given affine map.
MLIR.API.mlirAffineMapGetNumResults
— MethodmlirAffineMapGetNumResults(affineMap)
Returns the number of results of the given affine map.
MLIR.API.mlirAffineMapGetNumSymbols
— MethodmlirAffineMapGetNumSymbols(affineMap)
Returns the number of symbols of the given affine map.
MLIR.API.mlirAffineMapGetResult
— MethodmlirAffineMapGetResult(affineMap, pos)
Returns the result at the given position.
MLIR.API.mlirAffineMapGetSingleConstantResult
— MethodmlirAffineMapGetSingleConstantResult(affineMap)
Returns the constant result of the given affine map. The function asserts that the map has a single constant result.
MLIR.API.mlirAffineMapGetSubMap
— MethodmlirAffineMapGetSubMap(affineMap, size, resultPos)
Returns the affine map consisting of the resultPos
subset.
MLIR.API.mlirAffineMapIsEmpty
— MethodmlirAffineMapIsEmpty(affineMap)
Checks whether the given affine map is an empty affine map.
MLIR.API.mlirAffineMapIsIdentity
— MethodmlirAffineMapIsIdentity(affineMap)
Checks whether the given affine map is an identity affine map. The function asserts that the number of dimensions is greater or equal to the number of results.
MLIR.API.mlirAffineMapIsMinorIdentity
— MethodmlirAffineMapIsMinorIdentity(affineMap)
Checks whether the given affine map is a minor identity affine map.
MLIR.API.mlirAffineMapIsNull
— MethodmlirAffineMapIsNull(affineMap)
Checks whether an affine map is null.
MLIR.API.mlirAffineMapIsPermutation
— MethodmlirAffineMapIsPermutation(affineMap)
Checks whether the given affine map represents a symbol-less permutation map.
MLIR.API.mlirAffineMapIsProjectedPermutation
— MethodmlirAffineMapIsProjectedPermutation(affineMap)
Checks whether the given affine map represents a subset of a symbol-less permutation map.
MLIR.API.mlirAffineMapIsSingleConstant
— MethodmlirAffineMapIsSingleConstant(affineMap)
Checks whether the given affine map is a single result constant affine map.
MLIR.API.mlirAffineMapMinorIdentityGet
— MethodmlirAffineMapMinorIdentityGet(ctx, dims, results)
Creates an identity affine map on the most minor dimensions in the context. The affine map is owned by the context. The function asserts that the number of dimensions is greater or equal to the number of results.
MLIR.API.mlirAffineMapMultiDimIdentityGet
— MethodmlirAffineMapMultiDimIdentityGet(ctx, numDims)
Creates an affine map with 'numDims' identity in the context. The affine map is owned by the context.
MLIR.API.mlirAffineMapPermutationGet
— MethodmlirAffineMapPermutationGet(ctx, size, permutation)
Creates an affine map with a permutation expression and its size in the context. The permutation expression is a non-empty vector of integers. The elements of the permutation vector must be continuous from 0 and cannot be repeated (i.e. [1,2,0]
is a valid permutation. [2,0]
or [1,1,2]
is an invalid invalid permutation.) The affine map is owned by the context.
MLIR.API.mlirAffineMapPrint
— MethodmlirAffineMapPrint(affineMap, callback, userData)
Prints an affine map by sending chunks of the string representation and forwarding userData to
callback`. Note that the callback may be called several times with consecutive chunks of the string.
MLIR.API.mlirAffineMapReplace
— MethodmlirAffineMapReplace(affineMap, expression, replacement, numResultDims, numResultSyms)
Apply AffineExpr::replace(map
) to each of the results and return a new new AffineMap with the new results and the specified number of dims and symbols.
MLIR.API.mlirAffineMapZeroResultGet
— MethodmlirAffineMapZeroResultGet(ctx, dimCount, symbolCount)
Creates a zero result affine map of the given dimensions and symbols in the context. The affine map is owned by the context.
MLIR.API.mlirAffineModExprGet
— MethodmlirAffineModExprGet(lhs, rhs)
Creates an affine mod expression with 'lhs' and 'rhs'.
MLIR.API.mlirAffineMulExprGet
— MethodmlirAffineMulExprGet(lhs, rhs)
Creates an affine mul expression with 'lhs' and 'rhs'.
MLIR.API.mlirAffineSymbolExprGet
— MethodmlirAffineSymbolExprGet(ctx, position)
Creates an affine symbol expression with 'position' in the context.
MLIR.API.mlirAffineSymbolExprGetPosition
— MethodmlirAffineSymbolExprGetPosition(affineExpr)
Returns the position of the given affine symbol expression.
MLIR.API.mlirAnyQuantizedTypeGet
— MethodmlirAnyQuantizedTypeGet(flags, storageType, expressedType, storageTypeMin, storageTypeMax)
Creates an instance of AnyQuantizedType with the given parameters in the same context as storageType
and returns it. The instance is owned by the context.
MLIR.API.mlirArrayAttrGet
— MethodmlirArrayAttrGet(ctx, numElements, elements)
Creates an array element containing the given list of elements in the given context.
MLIR.API.mlirArrayAttrGetElement
— MethodmlirArrayAttrGetElement(attr, pos)
Returns pos-th element stored in the given array attribute.
MLIR.API.mlirArrayAttrGetNumElements
— MethodmlirArrayAttrGetNumElements(attr)
Returns the number of elements stored in the given array attribute.
MLIR.API.mlirAttributeDump
— MethodmlirAttributeDump(attr)
Prints the attribute to the standard error stream.
MLIR.API.mlirAttributeEqual
— MethodmlirAttributeEqual(a1, a2)
Checks if two attributes are equal.
MLIR.API.mlirAttributeGetContext
— MethodmlirAttributeGetContext(attribute)
Gets the context that an attribute was created with.
MLIR.API.mlirAttributeGetNull
— MethodmlirAttributeGetNull()
Returns an empty attribute.
MLIR.API.mlirAttributeGetType
— MethodmlirAttributeGetType(attribute)
Gets the type of this attribute.
MLIR.API.mlirAttributeGetTypeID
— MethodmlirAttributeGetTypeID(attribute)
Gets the type id of the attribute.
MLIR.API.mlirAttributeIsAAffineMap
— MethodmlirAttributeIsAAffineMap(attr)
Checks whether the given attribute is an affine map attribute.
MLIR.API.mlirAttributeIsAArray
— MethodmlirAttributeIsAArray(attr)
Checks whether the given attribute is an array attribute.
MLIR.API.mlirAttributeIsABool
— MethodmlirAttributeIsABool(attr)
Checks whether the given attribute is a bool attribute.
MLIR.API.mlirAttributeIsADenseElements
— MethodmlirAttributeIsADenseElements(attr)
Checks whether the given attribute is a dense elements attribute.
MLIR.API.mlirAttributeIsADictionary
— MethodmlirAttributeIsADictionary(attr)
Checks whether the given attribute is a dictionary attribute.
MLIR.API.mlirAttributeIsAElements
— MethodmlirAttributeIsAElements(attr)
Checks whether the given attribute is an elements attribute.
MLIR.API.mlirAttributeIsAFlatSymbolRef
— MethodmlirAttributeIsAFlatSymbolRef(attr)
Checks whether the given attribute is a flat symbol reference attribute.
MLIR.API.mlirAttributeIsAFloat
— MethodmlirAttributeIsAFloat(attr)
Checks whether the given attribute is a floating point attribute.
MLIR.API.mlirAttributeIsAInteger
— MethodmlirAttributeIsAInteger(attr)
Checks whether the given attribute is an integer attribute.
MLIR.API.mlirAttributeIsAIntegerSet
— MethodmlirAttributeIsAIntegerSet(attr)
Checks whether the given attribute is an integer set attribute.
MLIR.API.mlirAttributeIsAOpaque
— MethodmlirAttributeIsAOpaque(attr)
Checks whether the given attribute is an opaque attribute.
MLIR.API.mlirAttributeIsAOpaqueElements
— MethodmlirAttributeIsAOpaqueElements(attr)
Checks whether the given attribute is an opaque elements attribute.
MLIR.API.mlirAttributeIsASparseElements
— MethodmlirAttributeIsASparseElements(attr)
Checks whether the given attribute is a sparse elements attribute.
MLIR.API.mlirAttributeIsASparseTensorEncodingAttr
— MethodmlirAttributeIsASparseTensorEncodingAttr(attr)
Checks whether the given attribute is a sparse_tensor.encoding attribute.
MLIR.API.mlirAttributeIsAString
— MethodmlirAttributeIsAString(attr)
Checks whether the given attribute is a string attribute.
MLIR.API.mlirAttributeIsASymbolRef
— MethodmlirAttributeIsASymbolRef(attr)
Checks whether the given attribute is a symbol reference attribute.
MLIR.API.mlirAttributeIsAType
— MethodmlirAttributeIsAType(attr)
Checks whether the given attribute is a type attribute.
MLIR.API.mlirAttributeIsAUnit
— MethodmlirAttributeIsAUnit(attr)
Checks whether the given attribute is a unit attribute.
MLIR.API.mlirAttributeIsNull
— MethodmlirAttributeIsNull(attr)
Checks whether an attribute is null.
MLIR.API.mlirAttributeParseGet
— MethodmlirAttributeParseGet(context, attr)
Parses an attribute. The attribute is owned by the context.
MLIR.API.mlirAttributePrint
— MethodmlirAttributePrint(attr, callback, userData)
Prints an attribute by sending chunks of the string representation and forwarding userData to
callback`. Note that the callback may be called several times with consecutive chunks of the string.
MLIR.API.mlirBF16TypeGet
— MethodmlirBF16TypeGet(ctx)
Creates a bf16 type in the given context. The type is owned by the context.
MLIR.API.mlirBlockAddArgument
— MethodmlirBlockAddArgument(block, type, loc)
Appends an argument of the specified type to the block. Returns the newly added argument.
MLIR.API.mlirBlockAppendOwnedOperation
— MethodmlirBlockAppendOwnedOperation(block, operation)
Takes an operation owned by the caller and appends it to the block.
MLIR.API.mlirBlockArgumentGetArgNumber
— MethodmlirBlockArgumentGetArgNumber(value)
Returns the position of the value in the argument list of its block.
MLIR.API.mlirBlockArgumentGetOwner
— MethodmlirBlockArgumentGetOwner(value)
Returns the block in which this value is defined as an argument. Asserts if the value is not a block argument.
MLIR.API.mlirBlockArgumentSetType
— MethodmlirBlockArgumentSetType(value, type)
Sets the type of the block argument to the given type.
MLIR.API.mlirBlockCreate
— MethodmlirBlockCreate(nArgs, args, locs)
Creates a new empty block with the given argument types and transfers ownership to the caller.
MLIR.API.mlirBlockDestroy
— MethodmlirBlockDestroy(block)
Takes a block owned by the caller and destroys it.
MLIR.API.mlirBlockDetach
— MethodmlirBlockDetach(block)
Detach a block from the owning region and assume ownership.
MLIR.API.mlirBlockEqual
— MethodmlirBlockEqual(block, other)
Checks whether two blocks handles point to the same block. This does not perform deep comparison.
MLIR.API.mlirBlockGetArgument
— MethodmlirBlockGetArgument(block, pos)
Returns pos
-th argument of the block.
MLIR.API.mlirBlockGetFirstOperation
— MethodmlirBlockGetFirstOperation(block)
Returns the first operation in the block.
MLIR.API.mlirBlockGetNextInRegion
— MethodmlirBlockGetNextInRegion(block)
Returns the block immediately following the given block in its parent region.
MLIR.API.mlirBlockGetNumArguments
— MethodmlirBlockGetNumArguments(block)
Returns the number of arguments of the block.
MLIR.API.mlirBlockGetParentOperation
— MethodmlirBlockGetParentOperation(arg1)
Returns the closest surrounding operation that contains this block.
MLIR.API.mlirBlockGetParentRegion
— MethodmlirBlockGetParentRegion(block)
Returns the region that contains this block.
MLIR.API.mlirBlockGetTerminator
— MethodmlirBlockGetTerminator(block)
Returns the terminator operation in the block or null if no terminator.
MLIR.API.mlirBlockInsertOwnedOperation
— MethodmlirBlockInsertOwnedOperation(block, pos, operation)
Takes an operation owned by the caller and inserts it as pos
to the block. This is an expensive operation that scans the block linearly, prefer insertBefore/After instead.
MLIR.API.mlirBlockInsertOwnedOperationAfter
— MethodmlirBlockInsertOwnedOperationAfter(block, reference, operation)
Takes an operation owned by the caller and inserts it after the (non-owned) reference operation in the given block. If the reference is null, prepends the operation. Otherwise, the reference must belong to the block.
MLIR.API.mlirBlockInsertOwnedOperationBefore
— MethodmlirBlockInsertOwnedOperationBefore(block, reference, operation)
Takes an operation owned by the caller and inserts it before the (non-owned) reference operation in the given block. If the reference is null, appends the operation. Otherwise, the reference must belong to the block.
MLIR.API.mlirBlockIsNull
— MethodmlirBlockIsNull(block)
Checks whether a block is null.
MLIR.API.mlirBlockPrint
— MethodmlirBlockPrint(block, callback, userData)
Prints a block by sending chunks of the string representation and forwarding userData to
callback`. Note that the callback may be called several times with consecutive chunks of the string.
MLIR.API.mlirBoolAttrGet
— MethodmlirBoolAttrGet(ctx, value)
Creates a bool attribute in the given context with the given value.
MLIR.API.mlirBoolAttrGetValue
— MethodmlirBoolAttrGetValue(attr)
Returns the value stored in the given bool attribute.
MLIR.API.mlirCalibratedQuantizedTypeGet
— MethodmlirCalibratedQuantizedTypeGet(expressedType, min, max)
Creates an instance of CalibratedQuantizedType with the given parameters in the same context as expressedType
and returns it. The instance is owned by the context.
MLIR.API.mlirCalibratedQuantizedTypeGetMax
— MethodmlirCalibratedQuantizedTypeGetMax(type)
Returns the max value of the given calibrated quantized type.
MLIR.API.mlirCalibratedQuantizedTypeGetMin
— MethodmlirCalibratedQuantizedTypeGetMin(type)
Returns the min value of the given calibrated quantized type.
MLIR.API.mlirComplexTypeGet
— MethodmlirComplexTypeGet(elementType)
Creates a complex type with the given element type in the same context as the element type. The type is owned by the context.
MLIR.API.mlirComplexTypeGetElementType
— MethodmlirComplexTypeGetElementType(type)
Returns the element type of the given complex type.
MLIR.API.mlirContextAppendDialectRegistry
— MethodmlirContextAppendDialectRegistry(ctx, registry)
Append the contents of the given dialect registry to the registry associated with the context.
MLIR.API.mlirContextAttachDiagnosticHandler
— MethodmlirContextAttachDiagnosticHandler(context, handler, userData, deleteUserData)
Attaches the diagnostic handler to the context. Handlers are invoked in the reverse order of attachment until one of them processes the diagnostic completely. When a handler is invoked it is passed the userData
that was provided when it was attached. If non-NULL, deleteUserData
is called once the system no longer needs to call the handler (for instance after the handler is detached or the context is destroyed). Returns an identifier that can be used to detach the handler.
MLIR.API.mlirContextCreate
— MethodmlirContextCreate()
Creates an MLIR context and transfers its ownership to the caller.
MLIR.API.mlirContextDestroy
— MethodmlirContextDestroy(context)
Takes an MLIR context owned by the caller and destroys it.
MLIR.API.mlirContextDetachDiagnosticHandler
— MethodmlirContextDetachDiagnosticHandler(context, id)
Detaches an attached diagnostic handler from the context given its identifier.
MLIR.API.mlirContextEnableMultithreading
— MethodmlirContextEnableMultithreading(context, enable)
Set threading mode (must be set to false to mlir-print-ir-after-all).
MLIR.API.mlirContextEqual
— MethodmlirContextEqual(ctx1, ctx2)
Checks if two contexts are equal.
MLIR.API.mlirContextGetAllowUnregisteredDialects
— MethodmlirContextGetAllowUnregisteredDialects(context)
Returns whether the context allows unregistered dialects.
MLIR.API.mlirContextGetNumLoadedDialects
— MethodmlirContextGetNumLoadedDialects(context)
Returns the number of dialects loaded by the context.
MLIR.API.mlirContextGetNumRegisteredDialects
— MethodmlirContextGetNumRegisteredDialects(context)
Returns the number of dialects registered with the given context. A registered dialect will be loaded if needed by the parser.
MLIR.API.mlirContextGetOrLoadDialect
— MethodmlirContextGetOrLoadDialect(context, name)
Gets the dialect instance owned by the given context using the dialect namespace to identify it, loads (i.e., constructs the instance of) the dialect if necessary. If the dialect is not registered with the context, returns null. Use mlirContextLoad<Name>Dialect to load an unregistered dialect.
MLIR.API.mlirContextIsNull
— MethodmlirContextIsNull(context)
Checks whether a context is null.
MLIR.API.mlirContextIsRegisteredOperation
— MethodmlirContextIsRegisteredOperation(context, name)
Returns whether the given fully-qualified operation (i.e. 'dialect.operation') is registered with the context. This will return true if the dialect is loaded and the operation is registered within the dialect.
MLIR.API.mlirContextLoadAllAvailableDialects
— MethodmlirContextLoadAllAvailableDialects(context)
Eagerly loads all available dialects registered with a context, making them available for use for IR construction.
MLIR.API.mlirContextSetAllowUnregisteredDialects
— MethodmlirContextSetAllowUnregisteredDialects(context, allow)
Sets whether unregistered dialects are allowed in this context.
MLIR.API.mlirCreateExternalPass
— MethodmlirCreateExternalPass(passID, name, argument, description, opName, nDependentDialects, dependentDialects, callbacks, userData)
Creates an external MlirPass
that calls the supplied callbacks
using the supplied userData
. If opName
is empty, the pass is a generic operation pass. Otherwise it is an operation pass specific to the specified pass name.
MLIR.API.mlirDenseElementsAttrBoolGet
— MethodmlirDenseElementsAttrBoolGet(shapedType, numElements, elements)
Creates a dense elements attribute with the given shaped type from elements of a specific type. Expects the element type of the shaped type to match the data element type.
MLIR.API.mlirDenseElementsAttrGet
— MethodmlirDenseElementsAttrGet(shapedType, numElements, elements)
Creates a dense elements attribute with the given Shaped type and elements in the same context as the type.
MLIR.API.mlirDenseElementsAttrGetBoolValue
— MethodmlirDenseElementsAttrGetBoolValue(attr, pos)
Returns the pos-th value (flat contiguous indexing) of a specific type contained by the given dense elements attribute.
MLIR.API.mlirDenseElementsAttrGetRawData
— MethodmlirDenseElementsAttrGetRawData(attr)
Returns the raw data of the given dense elements attribute.
MLIR.API.mlirDenseElementsAttrGetSplatValue
— MethodmlirDenseElementsAttrGetSplatValue(attr)
Returns the single replicated value (splat) of a specific type contained by the given dense elements attribute.
MLIR.API.mlirDenseElementsAttrIsSplat
— MethodmlirDenseElementsAttrIsSplat(attr)
Checks whether the given dense elements attribute contains a single replicated value (splat).
MLIR.API.mlirDenseElementsAttrRawBufferGet
— MethodmlirDenseElementsAttrRawBufferGet(shapedType, rawBufferSize, rawBuffer)
Creates a dense elements attribute with the given Shaped type and elements populated from a packed, row-major opaque buffer of contents.
The format of the raw buffer is a densely packed array of values that can be bitcast to the storage format of the element type specified. Types that are not byte aligned will be: - For bitwidth > 1: Rounded up to the next byte. - For bitwidth = 1: Packed into 8bit bytes with bits corresponding to the linear order of the shape type from MSB to LSB, padded to on the right.
A raw buffer of a single element (or for 1-bit, a byte of value 0 or 255) will be interpreted as a splat. User code should be prepared for additional, conformant patterns to be identified as splats in the future.
MLIR.API.mlirDenseElementsAttrReshapeGet
— MethodmlirDenseElementsAttrReshapeGet(attr, shapedType)
Creates a dense elements attribute that has the same data as the given dense elements attribute and a different shaped type. The new type must have the same total number of elements.
MLIR.API.mlirDenseElementsAttrSplatGet
— MethodmlirDenseElementsAttrSplatGet(shapedType, element)
Creates a dense elements attribute with the given Shaped type containing a single replicated element (splat).
MLIR.API.mlirDenseElementsAttrStringGet
— MethodmlirDenseElementsAttrStringGet(shapedType, numElements, strs)
Creates a dense elements attribute with the given shaped type from string elements.
MLIR.API.mlirDiagnosticGetLocation
— MethodmlirDiagnosticGetLocation(diagnostic)
Returns the location at which the diagnostic is reported.
MLIR.API.mlirDiagnosticGetNote
— MethodmlirDiagnosticGetNote(diagnostic, pos)
Returns pos
-th note attached to the diagnostic. Expects pos
to be a valid zero-based index into the list of notes.
MLIR.API.mlirDiagnosticGetNumNotes
— MethodmlirDiagnosticGetNumNotes(diagnostic)
Returns the number of notes attached to the diagnostic.
MLIR.API.mlirDiagnosticGetSeverity
— MethodmlirDiagnosticGetSeverity(diagnostic)
Returns the severity of the diagnostic.
MLIR.API.mlirDiagnosticPrint
— MethodmlirDiagnosticPrint(diagnostic, callback, userData)
Prints a diagnostic using the provided callback.
MLIR.API.mlirDialectEqual
— MethodmlirDialectEqual(dialect1, dialect2)
Checks if two dialects that belong to the same context are equal. Dialects from different contexts will not compare equal.
MLIR.API.mlirDialectGetContext
— MethodmlirDialectGetContext(dialect)
Returns the context that owns the dialect.
MLIR.API.mlirDialectGetNamespace
— MethodmlirDialectGetNamespace(dialect)
Returns the namespace of the given dialect.
MLIR.API.mlirDialectHandleGetNamespace
— MethodmlirDialectHandleGetNamespace(arg1)
Returns the namespace associated with the provided dialect handle.
MLIR.API.mlirDialectHandleInsertDialect
— MethodmlirDialectHandleInsertDialect(arg1, arg2)
Inserts the dialect associated with the provided dialect handle into the provided dialect registry
MLIR.API.mlirDialectHandleLoadDialect
— MethodmlirDialectHandleLoadDialect(arg1, arg2)
Loads the dialect associated with the provided dialect handle.
MLIR.API.mlirDialectHandleRegisterDialect
— MethodmlirDialectHandleRegisterDialect(arg1, arg2)
Registers the dialect associated with the provided dialect handle.
MLIR.API.mlirDialectIsNull
— MethodmlirDialectIsNull(dialect)
Checks if the dialect is null.
MLIR.API.mlirDialectRegistryCreate
— MethodmlirDialectRegistryCreate()
Creates a dialect registry and transfers its ownership to the caller.
MLIR.API.mlirDialectRegistryDestroy
— MethodmlirDialectRegistryDestroy(registry)
Takes a dialect registry owned by the caller and destroys it.
MLIR.API.mlirDialectRegistryIsNull
— MethodmlirDialectRegistryIsNull(registry)
Checks if the dialect registry is null.
MLIR.API.mlirDictionaryAttrGet
— MethodmlirDictionaryAttrGet(ctx, numElements, elements)
Creates a dictionary attribute containing the given list of elements in the provided context.
MLIR.API.mlirDictionaryAttrGetElement
— MethodmlirDictionaryAttrGetElement(attr, pos)
Returns pos-th element of the given dictionary attribute.
MLIR.API.mlirDictionaryAttrGetElementByName
— MethodmlirDictionaryAttrGetElementByName(attr, name)
Returns the dictionary attribute element with the given name or NULL if the given name does not exist in the dictionary.
MLIR.API.mlirDictionaryAttrGetNumElements
— MethodmlirDictionaryAttrGetNumElements(attr)
Returns the number of attributes contained in a dictionary attribute.
MLIR.API.mlirElementsAttrGetNumElements
— MethodmlirElementsAttrGetNumElements(attr)
Gets the total number of elements in the given elements attribute. In order to iterate over the attribute, obtain its type, which must be a statically shaped type and use its sizes to build a multi-dimensional index.
MLIR.API.mlirElementsAttrGetValue
— MethodmlirElementsAttrGetValue(attr, rank, idxs)
Returns the element at the given rank-dimensional index.
MLIR.API.mlirElementsAttrIsValidIndex
— MethodmlirElementsAttrIsValidIndex(attr, rank, idxs)
Checks whether the given rank-dimensional index is valid in the given elements attribute.
MLIR.API.mlirEmitError
— MethodmlirEmitError(location, message)
Emits an error at the given location through the diagnostics engine. Used for testing purposes.
MLIR.API.mlirEnableGlobalDebug
— MethodmlirEnableGlobalDebug(enable)
Sets the global debugging flag.
MLIR.API.mlirExecutionEngineCreate
— MethodmlirExecutionEngineCreate(op, optLevel, numPaths, sharedLibPaths)
Creates an ExecutionEngine for the provided ModuleOp. The ModuleOp is expected to be "translatable" to LLVM IR (only contains operations in dialects that implement the LLVMTranslationDialectInterface
). The module ownership stays with the client and can be destroyed as soon as the call returns. optLevel
is the optimization level to be used for transformation and code generation. LLVM passes at optLevel
are run before code generation. The number and array of paths corresponding to shared libraries that will be loaded are specified via numPaths
and sharedLibPaths
respectively. TODO: figure out other options.
MLIR.API.mlirExecutionEngineDestroy
— MethodmlirExecutionEngineDestroy(jit)
Destroy an ExecutionEngine instance.
MLIR.API.mlirExecutionEngineDumpToObjectFile
— MethodmlirExecutionEngineDumpToObjectFile(jit, fileName)
Dump as an object in fileName
.
MLIR.API.mlirExecutionEngineInvokePacked
— MethodmlirExecutionEngineInvokePacked(jit, name, arguments)
Invoke a native function in the execution engine by name with the arguments and result of the invoked function passed as an array of pointers. The function must have been tagged with the llvm.emit\_c\_interface
attribute. Returns a failure if the execution fails for any reason (the function name can't be resolved for instance).
MLIR.API.mlirExecutionEngineIsNull
— MethodmlirExecutionEngineIsNull(jit)
Checks whether an execution engine is null.
MLIR.API.mlirExecutionEngineLookup
— MethodmlirExecutionEngineLookup(jit, name)
Lookup a native function in the execution engine by name, returns nullptr if the name can't be looked-up.
MLIR.API.mlirExecutionEngineLookupPacked
— MethodmlirExecutionEngineLookupPacked(jit, name)
Lookup the wrapper of the native function in the execution engine with the given name, returns nullptr if the function can't be looked-up.
MLIR.API.mlirExecutionEngineRegisterSymbol
— MethodmlirExecutionEngineRegisterSymbol(jit, name, sym)
Register a symbol with the jit: this symbol will be accessible to the jitted code.
MLIR.API.mlirExternalPassSignalFailure
— MethodmlirExternalPassSignalFailure(pass)
This signals that the pass has failed. This is only valid to call during the run
callback of MlirExternalPassCallbacks
. See Pass::signalPassFailure().
MLIR.API.mlirF16TypeGet
— MethodmlirF16TypeGet(ctx)
Creates an f16 type in the given context. The type is owned by the context.
MLIR.API.mlirF32TypeGet
— MethodmlirF32TypeGet(ctx)
Creates an f32 type in the given context. The type is owned by the context.
MLIR.API.mlirF64TypeGet
— MethodmlirF64TypeGet(ctx)
Creates a f64 type in the given context. The type is owned by the context.
MLIR.API.mlirFlatSymbolRefAttrGet
— MethodmlirFlatSymbolRefAttrGet(ctx, symbol)
Creates a flat symbol reference attribute in the given context referencing a symbol identified by the given string.
MLIR.API.mlirFlatSymbolRefAttrGetValue
— MethodmlirFlatSymbolRefAttrGetValue(attr)
Returns the referenced symbol as a string reference. The data remains live as long as the context in which the attribute lives.
MLIR.API.mlirFloatAttrDoubleGet
— MethodmlirFloatAttrDoubleGet(ctx, type, value)
Creates a floating point attribute in the given context with the given double value and double-precision FP semantics.
MLIR.API.mlirFloatAttrDoubleGetChecked
— MethodmlirFloatAttrDoubleGetChecked(loc, type, value)
Same as "mlirFloatAttrDoubleGet
", but if the type is not valid for a construction of a FloatAttr, returns a null MlirAttribute
.
MLIR.API.mlirFloatAttrGetValueDouble
— MethodmlirFloatAttrGetValueDouble(attr)
Returns the value stored in the given floating point attribute, interpreting the value as double.
MLIR.API.mlirFunctionTypeGet
— MethodmlirFunctionTypeGet(ctx, numInputs, inputs, numResults, results)
Creates a function type, mapping a list of input types to result types.
MLIR.API.mlirFunctionTypeGetInput
— MethodmlirFunctionTypeGetInput(type, pos)
Returns the pos-th input type.
MLIR.API.mlirFunctionTypeGetNumInputs
— MethodmlirFunctionTypeGetNumInputs(type)
Returns the number of input types.
MLIR.API.mlirFunctionTypeGetNumResults
— MethodmlirFunctionTypeGetNumResults(type)
Returns the number of result types.
MLIR.API.mlirFunctionTypeGetResult
— MethodmlirFunctionTypeGetResult(type, pos)
Returns the pos-th result type.
MLIR.API.mlirIdentifierEqual
— MethodmlirIdentifierEqual(ident, other)
Checks whether two identifiers are the same.
MLIR.API.mlirIdentifierGet
— MethodmlirIdentifierGet(context, str)
Gets an identifier with the given string value.
MLIR.API.mlirIdentifierGetContext
— MethodmlirIdentifierGetContext(arg1)
Returns the context associated with this identifier
MLIR.API.mlirIdentifierStr
— MethodmlirIdentifierStr(ident)
Gets the string value of the identifier.
MLIR.API.mlirIndexTypeGet
— MethodmlirIndexTypeGet(ctx)
Creates an index type in the given context. The type is owned by the context.
MLIR.API.mlirInferTypeOpInterfaceInferReturnTypes
— MethodmlirInferTypeOpInterfaceInferReturnTypes(opName, context, location, nOperands, operands, attributes, nRegions, regions, callback, userData)
Infers the return types of the operation identified by its canonical given the arguments that will be supplied to its generic builder. Calls callback
with the types of inferred arguments, potentially several times, on success. Returns failure otherwise.
MLIR.API.mlirInferTypeOpInterfaceTypeID
— MethodmlirInferTypeOpInterfaceTypeID()
Returns the interface TypeID of the InferTypeOpInterface.
MLIR.API.mlirIntegerAttrGet
— MethodmlirIntegerAttrGet(type, value)
Creates an integer attribute of the given type with the given integer value.
MLIR.API.mlirIntegerAttrGetValueInt
— MethodmlirIntegerAttrGetValueInt(attr)
Returns the value stored in the given integer attribute, assuming the value is of signless type and fits into a signed 64-bit integer.
MLIR.API.mlirIntegerAttrGetValueSInt
— MethodmlirIntegerAttrGetValueSInt(attr)
Returns the value stored in the given integer attribute, assuming the value is of signed type and fits into a signed 64-bit integer.
MLIR.API.mlirIntegerAttrGetValueUInt
— MethodmlirIntegerAttrGetValueUInt(attr)
Returns the value stored in the given integer attribute, assuming the value is of unsigned type and fits into an unsigned 64-bit integer.
MLIR.API.mlirIntegerSetDump
— MethodmlirIntegerSetDump(set)
Prints an integer set to the standard error stream.
MLIR.API.mlirIntegerSetEmptyGet
— MethodmlirIntegerSetEmptyGet(context, numDims, numSymbols)
Gets or creates a new canonically empty integer set with the give number of dimensions and symbols in the given context.
MLIR.API.mlirIntegerSetEqual
— MethodmlirIntegerSetEqual(s1, s2)
Checks if two integer set objects are equal. This is a "shallow" comparison of two objects. Only the sets with some small number of constraints are uniqued and compare equal here. Set objects that represent the same integer set with different constraints may be considered non-equal by this check. Set difference followed by an (expensive) emptiness check should be used to check equivalence of the underlying integer sets.
MLIR.API.mlirIntegerSetGet
— MethodmlirIntegerSetGet(context, numDims, numSymbols, numConstraints, constraints, eqFlags)
Gets or creates a new integer set in the given context. The set is defined by a list of affine constraints, with the given number of input dimensions and symbols, which are treated as either equalities (eqFlags is 1) or inequalities (eqFlags is 0). Both constraints
and eqFlags
are expected to point to at least numConstraint
consecutive values.
MLIR.API.mlirIntegerSetGetConstraint
— MethodmlirIntegerSetGetConstraint(set, pos)
Returns pos
-th constraint of the set.
MLIR.API.mlirIntegerSetGetContext
— MethodmlirIntegerSetGetContext(set)
Gets the context in which the given integer set lives.
MLIR.API.mlirIntegerSetGetNumConstraints
— MethodmlirIntegerSetGetNumConstraints(set)
Returns the number of constraints (equalities + inequalities) in the given set.
MLIR.API.mlirIntegerSetGetNumDims
— MethodmlirIntegerSetGetNumDims(set)
Returns the number of dimensions in the given set.
MLIR.API.mlirIntegerSetGetNumEqualities
— MethodmlirIntegerSetGetNumEqualities(set)
Returns the number of equalities in the given set.
MLIR.API.mlirIntegerSetGetNumInequalities
— MethodmlirIntegerSetGetNumInequalities(set)
Returns the number of inequalities in the given set.
MLIR.API.mlirIntegerSetGetNumInputs
— MethodmlirIntegerSetGetNumInputs(set)
Returns the number of inputs (dimensions + symbols) in the given set.
MLIR.API.mlirIntegerSetGetNumSymbols
— MethodmlirIntegerSetGetNumSymbols(set)
Returns the number of symbols in the given set.
MLIR.API.mlirIntegerSetIsCanonicalEmpty
— MethodmlirIntegerSetIsCanonicalEmpty(set)
Checks whether the given set is a canonical empty set, e.g., the set returned by mlirIntegerSetEmptyGet
.
MLIR.API.mlirIntegerSetIsConstraintEq
— MethodmlirIntegerSetIsConstraintEq(set, pos)
Returns true
of the pos
-th constraint of the set is an equality constraint, false
otherwise.
MLIR.API.mlirIntegerSetIsNull
— MethodmlirIntegerSetIsNull(set)
Checks whether an integer set is a null object.
MLIR.API.mlirIntegerSetPrint
— MethodmlirIntegerSetPrint(set, callback, userData)
Prints an integer set by sending chunks of the string representation and forwarding userData to
callback`. Note that the callback may be called several times with consecutive chunks of the string.
MLIR.API.mlirIntegerSetReplaceGet
— MethodmlirIntegerSetReplaceGet(set, dimReplacements, symbolReplacements, numResultDims, numResultSymbols)
Gets or creates a new integer set in which the values and dimensions of the given set are replaced with the given affine expressions. dimReplacements
and symbolReplacements
are expected to point to at least as many consecutive expressions as the given set has dimensions and symbols, respectively. The new set will have numResultDims
and numResultSymbols
dimensions and symbols, respectively.
MLIR.API.mlirIntegerTypeGet
— MethodmlirIntegerTypeGet(ctx, bitwidth)
Creates a signless integer type of the given bitwidth in the context. The type is owned by the context.
MLIR.API.mlirIntegerTypeGetWidth
— MethodmlirIntegerTypeGetWidth(type)
Returns the bitwidth of an integer type.
MLIR.API.mlirIntegerTypeIsSigned
— MethodmlirIntegerTypeIsSigned(type)
Checks whether the given integer type is signed.
MLIR.API.mlirIntegerTypeIsSignless
— MethodmlirIntegerTypeIsSignless(type)
Checks whether the given integer type is signless.
MLIR.API.mlirIntegerTypeIsUnsigned
— MethodmlirIntegerTypeIsUnsigned(type)
Checks whether the given integer type is unsigned.
MLIR.API.mlirIntegerTypeSignedGet
— MethodmlirIntegerTypeSignedGet(ctx, bitwidth)
Creates a signed integer type of the given bitwidth in the context. The type is owned by the context.
MLIR.API.mlirIntegerTypeUnsignedGet
— MethodmlirIntegerTypeUnsignedGet(ctx, bitwidth)
Creates an unsigned integer type of the given bitwidth in the context. The type is owned by the context.
MLIR.API.mlirIsGlobalDebugEnabled
— MethodmlirIsGlobalDebugEnabled()
Retuns true
if the global debugging flag is set, false otherwise.
MLIR.API.mlirLLVMArrayTypeGet
— MethodmlirLLVMArrayTypeGet(elementType, numElements)
Creates an llvm.array type.
MLIR.API.mlirLLVMFunctionTypeGet
— MethodmlirLLVMFunctionTypeGet(resultType, nArgumentTypes, argumentTypes, isVarArg)
Creates an llvm.func type.
MLIR.API.mlirLLVMPointerTypeGet
— MethodmlirLLVMPointerTypeGet(pointee, addressSpace)
Creates an llvm.ptr type.
MLIR.API.mlirLLVMStructTypeLiteralGet
— MethodmlirLLVMStructTypeLiteralGet(ctx, nFieldTypes, fieldTypes, isPacked)
Creates an LLVM literal (unnamed) struct type.
MLIR.API.mlirLLVMVoidTypeGet
— MethodmlirLLVMVoidTypeGet(ctx)
Creates an llmv.void type.
MLIR.API.mlirLinalgFillBuiltinNamedOpRegion
— MethodmlirLinalgFillBuiltinNamedOpRegion(mlirOp)
Apply the special region builder for the builtin named Linalg op. Assert that mlirOp
is a builtin named Linalg op.
MLIR.API.mlirLocationCallSiteGet
— MethodmlirLocationCallSiteGet(callee, caller)
Creates a call site location with a callee and a caller.
MLIR.API.mlirLocationEqual
— MethodmlirLocationEqual(l1, l2)
Checks if two locations are equal.
MLIR.API.mlirLocationFileLineColGet
— MethodmlirLocationFileLineColGet(context, filename, line, col)
Creates an File/Line/Column location owned by the given context.
MLIR.API.mlirLocationFusedGet
— MethodmlirLocationFusedGet(ctx, nLocations, locations, metadata)
Creates a fused location with an array of locations and metadata.
MLIR.API.mlirLocationGetContext
— MethodmlirLocationGetContext(location)
Gets the context that a location was created with.
MLIR.API.mlirLocationIsNull
— MethodmlirLocationIsNull(location)
Checks if the location is null.
MLIR.API.mlirLocationNameGet
— MethodmlirLocationNameGet(context, name, childLoc)
Creates a name location owned by the given context. Providing null location for childLoc is allowed and if childLoc is null location, then the behavior is the same as having unknown child location.
MLIR.API.mlirLocationPrint
— MethodmlirLocationPrint(location, callback, userData)
Prints a location by sending chunks of the string representation and forwarding userData to
callback`. Note that the callback may be called several times with consecutive chunks of the string.
MLIR.API.mlirLocationUnknownGet
— MethodmlirLocationUnknownGet(context)
Creates a location with unknown position owned by the given context.
MLIR.API.mlirLogicalResultFailure
— MethodmlirLogicalResultFailure()
Creates a logical result representing a failure.
MLIR.API.mlirLogicalResultIsFailure
— MethodmlirLogicalResultIsFailure(res)
Checks if the given logical result represents a failure.
MLIR.API.mlirLogicalResultIsSuccess
— MethodmlirLogicalResultIsSuccess(res)
Checks if the given logical result represents a success.
MLIR.API.mlirLogicalResultSuccess
— MethodmlirLogicalResultSuccess()
Creates a logical result representing a success.
MLIR.API.mlirMemRefTypeContiguousGet
— MethodmlirMemRefTypeContiguousGet(elementType, rank, shape, memorySpace)
Creates a MemRef type with the given rank, shape, memory space and element type in the same context as the element type. The type has no affine maps, i.e. represents a default row-major contiguous memref. The type is owned by the context.
MLIR.API.mlirMemRefTypeContiguousGetChecked
— MethodmlirMemRefTypeContiguousGetChecked(loc, elementType, rank, shape, memorySpace)
Same as "mlirMemRefTypeContiguousGet
" but returns a nullptr wrapping MlirType
on illegal arguments, emitting appropriate diagnostics.
MLIR.API.mlirMemRefTypeGet
— MethodmlirMemRefTypeGet(elementType, rank, shape, layout, memorySpace)
Creates a MemRef type with the given rank and shape, a potentially empty list of affine layout maps, the given memory space and element type, in the same context as element type. The type is owned by the context.
MLIR.API.mlirMemRefTypeGetAffineMap
— MethodmlirMemRefTypeGetAffineMap(type)
Returns the affine map of the given MemRef type.
MLIR.API.mlirMemRefTypeGetChecked
— MethodmlirMemRefTypeGetChecked(loc, elementType, rank, shape, layout, memorySpace)
Same as "mlirMemRefTypeGet
" but returns a nullptr-wrapping MlirType
o illegal arguments, emitting appropriate diagnostics.
MLIR.API.mlirMemRefTypeGetLayout
— MethodmlirMemRefTypeGetLayout(type)
Returns the layout of the given MemRef type.
MLIR.API.mlirMemRefTypeGetMemorySpace
— MethodmlirMemRefTypeGetMemorySpace(type)
Returns the memory space of the given MemRef type.
MLIR.API.mlirModuleCreateEmpty
— MethodmlirModuleCreateEmpty(location)
Creates a new, empty module and transfers ownership to the caller.
MLIR.API.mlirModuleCreateParse
— MethodmlirModuleCreateParse(context, _module)
Parses a module from the string and transfers ownership to the caller.
MLIR.API.mlirModuleDestroy
— MethodmlirModuleDestroy(_module)
Takes a module owned by the caller and deletes it.
MLIR.API.mlirModuleFromOperation
— MethodmlirModuleFromOperation(op)
Views the generic operation as a module. The returned module is null when the input operation was not a ModuleOp.
MLIR.API.mlirModuleGetBody
— MethodmlirModuleGetBody(_module)
Gets the body of the module, i.e. the only block it contains.
MLIR.API.mlirModuleGetContext
— MethodmlirModuleGetContext(_module)
Gets the context that a module was created with.
MLIR.API.mlirModuleGetOperation
— MethodmlirModuleGetOperation(_module)
Views the module as a generic operation.
MLIR.API.mlirModuleIsNull
— MethodmlirModuleIsNull(_module)
Checks whether a module is null.
MLIR.API.mlirNamedAttributeGet
— MethodmlirNamedAttributeGet(name, attr)
Associates an attribute with the name. Takes ownership of neither.
MLIR.API.mlirNoneTypeGet
— MethodmlirNoneTypeGet(ctx)
Creates a None type in the given context. The type is owned by the context.
MLIR.API.mlirOpPassManagerAddOwnedPass
— MethodmlirOpPassManagerAddOwnedPass(passManager, pass)
Add a pass and transfer ownership to the provided mlirOpPassManager. If the pass is not a generic operation pass or matching the type of the provided PassManager, a new OpPassManager is implicitly nested under the provided PassManager.
MLIR.API.mlirOpPassManagerGetNestedUnder
— MethodmlirOpPassManagerGetNestedUnder(passManager, operationName)
Nest an OpPassManager under the provided OpPassManager, the nested passmanager will only run on operations matching the provided name. The returned OpPassManager will be destroyed when the parent is destroyed.
MLIR.API.mlirOpPrintingFlagsCreate
— MethodmlirOpPrintingFlagsCreate()
Creates new printing flags with defaults, intended for customization. Must be freed with a call to mlirOpPrintingFlagsDestroy
().
MLIR.API.mlirOpPrintingFlagsDestroy
— MethodmlirOpPrintingFlagsDestroy(flags)
Destroys printing flags created with mlirOpPrintingFlagsCreate
.
MLIR.API.mlirOpPrintingFlagsElideLargeElementsAttrs
— MethodmlirOpPrintingFlagsElideLargeElementsAttrs(flags, largeElementLimit)
Enables the elision of large elements attributes by printing a lexically valid but otherwise meaningless form instead of the element data. The largeElementLimit
is used to configure what is considered to be a "large" ElementsAttr by providing an upper limit to the number of elements.
MLIR.API.mlirOpPrintingFlagsEnableDebugInfo
— MethodmlirOpPrintingFlagsEnableDebugInfo(flags, prettyForm)
Enable printing of debug information. If 'prettyForm' is set to true, debug information is printed in a more readable 'pretty' form. Note: The IR generated with 'prettyForm' is not parsable.
MLIR.API.mlirOpPrintingFlagsPrintGenericOpForm
— MethodmlirOpPrintingFlagsPrintGenericOpForm(flags)
Always print operations in the generic form.
MLIR.API.mlirOpPrintingFlagsUseLocalScope
— MethodmlirOpPrintingFlagsUseLocalScope(flags)
Use local scope when printing the operation. This allows for using the printer in a more localized and thread-safe setting, but may not necessarily be identical to what the IR will look like when dumping the full module.
MLIR.API.mlirOpResultGetOwner
— MethodmlirOpResultGetOwner(value)
Returns an operation that produced this value as its result. Asserts if the value is not an op result.
MLIR.API.mlirOpResultGetResultNumber
— MethodmlirOpResultGetResultNumber(value)
Returns the position of the value in the list of results of the operation that produced it.
MLIR.API.mlirOpaqueAttrGet
— MethodmlirOpaqueAttrGet(ctx, dialectNamespace, dataLength, data, type)
Creates an opaque attribute in the given context associated with the dialect identified by its namespace. The attribute contains opaque byte data of the specified length (data need not be null-terminated).
MLIR.API.mlirOpaqueAttrGetData
— MethodmlirOpaqueAttrGetData(attr)
Returns the raw data as a string reference. The data remains live as long as the context in which the attribute lives.
MLIR.API.mlirOpaqueAttrGetDialectNamespace
— MethodmlirOpaqueAttrGetDialectNamespace(attr)
Returns the namespace of the dialect with which the given opaque attribute is associated. The namespace string is owned by the context.
MLIR.API.mlirOpaqueTypeGet
— MethodmlirOpaqueTypeGet(ctx, dialectNamespace, typeData)
Creates an opaque type in the given context associated with the dialect identified by its namespace. The type contains opaque byte data of the specified length (data need not be null-terminated).
MLIR.API.mlirOpaqueTypeGetData
— MethodmlirOpaqueTypeGetData(type)
Returns the raw data as a string reference. The data remains live as long as the context in which the type lives.
MLIR.API.mlirOpaqueTypeGetDialectNamespace
— MethodmlirOpaqueTypeGetDialectNamespace(type)
Returns the namespace of the dialect with which the given opaque type is associated. The namespace string is owned by the context.
MLIR.API.mlirOperationClone
— MethodmlirOperationClone(op)
Creates a deep copy of an operation. The operation is not inserted and ownership is transferred to the caller.
MLIR.API.mlirOperationCreate
— MethodmlirOperationCreate(state)
Creates an operation and transfers ownership to the caller. Note that caller owned child objects are transferred in this call and must not be further used. Particularly, this applies to any regions added to the state (the implementation may invalidate any such pointers).
This call can fail under the following conditions, in which case, it will return a null operation and emit diagnostics: - Result type inference is enabled and cannot be performed.
MLIR.API.mlirOperationDestroy
— MethodmlirOperationDestroy(op)
Takes an operation owned by the caller and destroys it.
MLIR.API.mlirOperationDump
— MethodmlirOperationDump(op)
Prints an operation to stderr.
MLIR.API.mlirOperationEqual
— MethodmlirOperationEqual(op, other)
Checks whether two operation handles point to the same operation. This does not perform deep comparison.
MLIR.API.mlirOperationGetAttribute
— MethodmlirOperationGetAttribute(op, pos)
Return pos
-th attribute of the operation.
MLIR.API.mlirOperationGetAttributeByName
— MethodmlirOperationGetAttributeByName(op, name)
Returns an attribute attached to the operation given its name.
MLIR.API.mlirOperationGetBlock
— MethodmlirOperationGetBlock(op)
Gets the block that owns this operation, returning null if the operation is not owned.
MLIR.API.mlirOperationGetContext
— MethodmlirOperationGetContext(op)
Gets the context this operation is associated with
MLIR.API.mlirOperationGetFirstRegion
— MethodmlirOperationGetFirstRegion(op)
Returns first region attached to the operation.
MLIR.API.mlirOperationGetLocation
— MethodmlirOperationGetLocation(op)
Gets the location of the operation.
MLIR.API.mlirOperationGetName
— MethodmlirOperationGetName(op)
Gets the name of the operation as an identifier.
MLIR.API.mlirOperationGetNextInBlock
— MethodmlirOperationGetNextInBlock(op)
Returns an operation immediately following the given operation it its enclosing block.
MLIR.API.mlirOperationGetNumAttributes
— MethodmlirOperationGetNumAttributes(op)
Returns the number of attributes attached to the operation.
MLIR.API.mlirOperationGetNumOperands
— MethodmlirOperationGetNumOperands(op)
Returns the number of operands of the operation.
MLIR.API.mlirOperationGetNumRegions
— MethodmlirOperationGetNumRegions(op)
Returns the number of regions attached to the given operation.
MLIR.API.mlirOperationGetNumResults
— MethodmlirOperationGetNumResults(op)
Returns the number of results of the operation.
MLIR.API.mlirOperationGetNumSuccessors
— MethodmlirOperationGetNumSuccessors(op)
Returns the number of successor blocks of the operation.
MLIR.API.mlirOperationGetOperand
— MethodmlirOperationGetOperand(op, pos)
Returns pos
-th operand of the operation.
MLIR.API.mlirOperationGetParentOperation
— MethodmlirOperationGetParentOperation(op)
Gets the operation that owns this operation, returning null if the operation is not owned.
MLIR.API.mlirOperationGetRegion
— MethodmlirOperationGetRegion(op, pos)
Returns pos
-th region attached to the operation.
MLIR.API.mlirOperationGetResult
— MethodmlirOperationGetResult(op, pos)
Returns pos
-th result of the operation.
MLIR.API.mlirOperationGetSuccessor
— MethodmlirOperationGetSuccessor(op, pos)
Returns pos
-th successor of the operation.
MLIR.API.mlirOperationGetTypeID
— MethodmlirOperationGetTypeID(op)
Gets the type id of the operation. Returns null if the operation does not have a registered operation description.
MLIR.API.mlirOperationImplementsInterface
— MethodmlirOperationImplementsInterface(operation, interfaceTypeID)
Returns true
if the given operation implements an interface identified by its TypeID.
MLIR.API.mlirOperationImplementsInterfaceStatic
— MethodmlirOperationImplementsInterfaceStatic(operationName, context, interfaceTypeID)
Returns true
if the operation identified by its canonical string name implements the interface identified by its TypeID in the given context. Note that interfaces may be attached to operations in some contexts and not others.
MLIR.API.mlirOperationIsNull
— MethodmlirOperationIsNull(op)
Checks whether the underlying operation is null.
MLIR.API.mlirOperationMoveAfter
— MethodmlirOperationMoveAfter(op, other)
Moves the given operation immediately after the other operation in its parent block. The given operation may be owned by the caller or by its current block. The other operation must belong to a block. In any case, the ownership is transferred to the block of the other operation.
MLIR.API.mlirOperationMoveBefore
— MethodmlirOperationMoveBefore(op, other)
Moves the given operation immediately before the other operation in its parent block. The given operation may be owner by the caller or by its current block. The other operation must belong to a block. In any case, the ownership is transferred to the block of the other operation.
MLIR.API.mlirOperationPrint
— MethodmlirOperationPrint(op, callback, userData)
Prints an operation by sending chunks of the string representation and forwarding userData to
callback`. Note that the callback may be called several times with consecutive chunks of the string.
MLIR.API.mlirOperationPrintWithFlags
— MethodmlirOperationPrintWithFlags(op, flags, callback, userData)
Same as mlirOperationPrint
but accepts flags controlling the printing behavior.
MLIR.API.mlirOperationRemoveAttributeByName
— MethodmlirOperationRemoveAttributeByName(op, name)
Removes an attribute by name. Returns false if the attribute was not found and true if removed.
MLIR.API.mlirOperationRemoveFromParent
— MethodmlirOperationRemoveFromParent(op)
Removes the given operation from its parent block. The operation is not destroyed. The ownership of the operation is transferred to the caller.
MLIR.API.mlirOperationSetAttributeByName
— MethodmlirOperationSetAttributeByName(op, name, attr)
Sets an attribute by name, replacing the existing if it exists or adding a new one otherwise.
MLIR.API.mlirOperationSetOperand
— MethodmlirOperationSetOperand(op, pos, newValue)
Sets the pos
-th operand of the operation.
MLIR.API.mlirOperationStateAddResults
— MethodmlirOperationStateAddResults(state, n, results)
Adds a list of components to the operation state.
MLIR.API.mlirOperationStateEnableResultTypeInference
— MethodmlirOperationStateEnableResultTypeInference(state)
Enables result type inference for the operation under construction. If enabled, then the caller must not have called mlirOperationStateAddResults
(). Note that if enabled, the mlirOperationCreate
() call is failable: it will return a null operation on inference failure and will emit diagnostics.
MLIR.API.mlirOperationStateGet
— MethodmlirOperationStateGet(name, loc)
Constructs an operation state from a name and a location.
MLIR.API.mlirOperationVerify
— MethodmlirOperationVerify(op)
Verify the operation and return true if it passes, false if it fails.
MLIR.API.mlirParsePassPipeline
— MethodmlirParsePassPipeline(passManager, pipeline)
Parse a textual MLIR pass pipeline and add it to the provided OpPassManager.
MLIR.API.mlirPassManagerAddOwnedPass
— MethodmlirPassManagerAddOwnedPass(passManager, pass)
Add a pass and transfer ownership to the provided top-level mlirPassManager. If the pass is not a generic operation pass or a ModulePass, a new OpPassManager is implicitly nested under the provided PassManager.
MLIR.API.mlirPassManagerCreate
— MethodmlirPassManagerCreate(ctx)
Create a new top-level PassManager.
MLIR.API.mlirPassManagerDestroy
— MethodmlirPassManagerDestroy(passManager)
Destroy the provided PassManager.
MLIR.API.mlirPassManagerEnableIRPrinting
— MethodmlirPassManagerEnableIRPrinting(passManager)
Enable mlir-print-ir-after-all.
MLIR.API.mlirPassManagerEnableVerifier
— MethodmlirPassManagerEnableVerifier(passManager, enable)
Enable / disable verify-each.
MLIR.API.mlirPassManagerGetAsOpPassManager
— MethodmlirPassManagerGetAsOpPassManager(passManager)
Cast a top-level PassManager to a generic OpPassManager.
MLIR.API.mlirPassManagerGetNestedUnder
— MethodmlirPassManagerGetNestedUnder(passManager, operationName)
Nest an OpPassManager under the top-level PassManager, the nested passmanager will only run on operations matching the provided name. The returned OpPassManager will be destroyed when the parent is destroyed. To further nest more OpPassManager under the newly returned one, see mlirOpPassManagerNest
below.
MLIR.API.mlirPassManagerIsNull
— MethodmlirPassManagerIsNull(passManager)
Checks if a PassManager is null.
MLIR.API.mlirPassManagerRun
— MethodmlirPassManagerRun(passManager, _module)
Run the provided passManager
on the given module
.
MLIR.API.mlirPrintPassPipeline
— MethodmlirPrintPassPipeline(passManager, callback, userData)
Print a textual MLIR pass pipeline by sending chunks of the string representation and forwarding userData to
callback`. Note that the callback may be called several times with consecutive chunks of the string.
MLIR.API.mlirQuantizedTypeCastExpressedToStorageType
— MethodmlirQuantizedTypeCastExpressedToStorageType(type, candidate)
Casts from a type based on the expressed type of the given quantized type to equivalent type based on storage type of the same quantized type.
MLIR.API.mlirQuantizedTypeCastFromExpressedType
— MethodmlirQuantizedTypeCastFromExpressedType(type, candidate)
Casts from a type based on the expressed type of the given type to a corresponding type based on the given type. Returns a null type if the cast is not valid.
MLIR.API.mlirQuantizedTypeCastFromStorageType
— MethodmlirQuantizedTypeCastFromStorageType(type, candidate)
Casts from a type based on the storage type of the given type to a corresponding type based on the given type. Returns a null type if the cast is not valid.
MLIR.API.mlirQuantizedTypeCastToExpressedType
— MethodmlirQuantizedTypeCastToExpressedType(type)
Casts from a type based on a quantized type to a corresponding typed based on the expressed type. Returns a null type if the cast is not valid.
MLIR.API.mlirQuantizedTypeCastToStorageType
— MethodmlirQuantizedTypeCastToStorageType(type)
Casts from a type based on a quantized type to a corresponding typed based on the storage type. Returns a null type if the cast is not valid.
MLIR.API.mlirQuantizedTypeGetDefaultMaximumForInteger
— MethodmlirQuantizedTypeGetDefaultMaximumForInteger(isSigned, integralWidth)
Returns the maximum possible value stored by a quantized type.
MLIR.API.mlirQuantizedTypeGetDefaultMinimumForInteger
— MethodmlirQuantizedTypeGetDefaultMinimumForInteger(isSigned, integralWidth)
Returns the minimum possible value stored by a quantized type.
MLIR.API.mlirQuantizedTypeGetExpressedType
— MethodmlirQuantizedTypeGetExpressedType(type)
Gets the original type approximated by the given quantized type.
MLIR.API.mlirQuantizedTypeGetFlags
— MethodmlirQuantizedTypeGetFlags(type)
Gets the flags associated with the given quantized type.
MLIR.API.mlirQuantizedTypeGetQuantizedElementType
— MethodmlirQuantizedTypeGetQuantizedElementType(type)
Returns the element type of the given quantized type as another quantized type.
MLIR.API.mlirQuantizedTypeGetSignedFlag
— MethodmlirQuantizedTypeGetSignedFlag()
Returns the bit flag used to indicate signedness of a quantized type.
MLIR.API.mlirQuantizedTypeGetStorageType
— MethodmlirQuantizedTypeGetStorageType(type)
Returns the underlying type used to store the values.
MLIR.API.mlirQuantizedTypeGetStorageTypeIntegralWidth
— MethodmlirQuantizedTypeGetStorageTypeIntegralWidth(type)
Returns the integral bitwidth that the storage type of the given quantized type can represent exactly.
MLIR.API.mlirQuantizedTypeGetStorageTypeMax
— MethodmlirQuantizedTypeGetStorageTypeMax(type)
Returns the maximum value that the storage type of the given quantized type can take.
MLIR.API.mlirQuantizedTypeGetStorageTypeMin
— MethodmlirQuantizedTypeGetStorageTypeMin(type)
Returns the minimum value that the storage type of the given quantized type can take.
MLIR.API.mlirQuantizedTypeIsCompatibleExpressedType
— MethodmlirQuantizedTypeIsCompatibleExpressedType(type, candidate)
Returns true
if the candidate
type is compatible with the given quantized type
.
MLIR.API.mlirQuantizedTypeIsSigned
— MethodmlirQuantizedTypeIsSigned(type)
Returns true
if the given type is signed, false
otherwise.
MLIR.API.mlirRankedTensorTypeGet
— MethodmlirRankedTensorTypeGet(rank, shape, elementType, encoding)
Creates a tensor type of a fixed rank with the given shape, element type, and optional encoding in the same context as the element type. The type is owned by the context. Tensor types without any specific encoding field should assign mlirAttributeGetNull
() to this parameter.
MLIR.API.mlirRankedTensorTypeGetChecked
— MethodmlirRankedTensorTypeGetChecked(loc, rank, shape, elementType, encoding)
Same as "mlirRankedTensorTypeGet
" but returns a nullptr wrapping MlirType
on illegal arguments, emitting appropriate diagnostics.
MLIR.API.mlirRankedTensorTypeGetEncoding
— MethodmlirRankedTensorTypeGetEncoding(type)
Gets the 'encoding' attribute from the ranked tensor type, returning a null attribute if none.
MLIR.API.mlirRegionAppendOwnedBlock
— MethodmlirRegionAppendOwnedBlock(region, block)
Takes a block owned by the caller and appends it to the given region.
MLIR.API.mlirRegionCreate
— MethodmlirRegionCreate()
Creates a new empty region and transfers ownership to the caller.
MLIR.API.mlirRegionDestroy
— MethodmlirRegionDestroy(region)
Takes a region owned by the caller and destroys it.
MLIR.API.mlirRegionEqual
— MethodmlirRegionEqual(region, other)
Checks whether two region handles point to the same region. This does not perform deep comparison.
MLIR.API.mlirRegionGetFirstBlock
— MethodmlirRegionGetFirstBlock(region)
Gets the first block in the region.
MLIR.API.mlirRegionGetNextInOperation
— MethodmlirRegionGetNextInOperation(region)
Returns the region immediately following the given region in its parent operation.
MLIR.API.mlirRegionInsertOwnedBlock
— MethodmlirRegionInsertOwnedBlock(region, pos, block)
Takes a block owned by the caller and inserts it at pos
to the given region. This is an expensive operation that linearly scans the region, prefer insertAfter/Before instead.
MLIR.API.mlirRegionInsertOwnedBlockAfter
— MethodmlirRegionInsertOwnedBlockAfter(region, reference, block)
Takes a block owned by the caller and inserts it after the (non-owned) reference block in the given region. The reference block must belong to the region. If the reference block is null, prepends the block to the region.
MLIR.API.mlirRegionInsertOwnedBlockBefore
— MethodmlirRegionInsertOwnedBlockBefore(region, reference, block)
Takes a block owned by the caller and inserts it before the (non-owned) reference block in the given region. The reference block must belong to the region. If the reference block is null, appends the block to the region.
MLIR.API.mlirRegionIsNull
— MethodmlirRegionIsNull(region)
Checks whether a region is null.
MLIR.API.mlirRegisterAllDialects
— MethodmlirRegisterAllDialects(registry)
Appends all upstream dialects and extensions to the dialect registry.
MLIR.API.mlirRegisterAllLLVMTranslations
— MethodmlirRegisterAllLLVMTranslations(context)
Register all translations to LLVM IR for dialects that can support it.
MLIR.API.mlirRegisterAllPasses
— MethodmlirRegisterAllPasses()
Register all compiler passes of MLIR.
MLIR.API.mlirShapedTypeGetDimSize
— MethodmlirShapedTypeGetDimSize(type, dim)
Returns the dim-th dimension of the given ranked shaped type.
MLIR.API.mlirShapedTypeGetDynamicSize
— MethodmlirShapedTypeGetDynamicSize()
Returns the value indicating a dynamic size in a shaped type. Prefer mlirShapedTypeIsDynamicSize
to direct comparisons with this value.
MLIR.API.mlirShapedTypeGetDynamicStrideOrOffset
— MethodmlirShapedTypeGetDynamicStrideOrOffset()
Returns the value indicating a dynamic stride or offset in a shaped type. Prefer mlirShapedTypeGetDynamicStrideOrOffset
to direct comparisons with this value.
MLIR.API.mlirShapedTypeGetElementType
— MethodmlirShapedTypeGetElementType(type)
Returns the element type of the shaped type.
MLIR.API.mlirShapedTypeGetRank
— MethodmlirShapedTypeGetRank(type)
Returns the rank of the given ranked shaped type.
MLIR.API.mlirShapedTypeHasRank
— MethodmlirShapedTypeHasRank(type)
Checks whether the given shaped type is ranked.
MLIR.API.mlirShapedTypeHasStaticShape
— MethodmlirShapedTypeHasStaticShape(type)
Checks whether the given shaped type has a static shape.
MLIR.API.mlirShapedTypeIsDynamicDim
— MethodmlirShapedTypeIsDynamicDim(type, dim)
Checks wither the dim-th dimension of the given shaped type is dynamic.
MLIR.API.mlirShapedTypeIsDynamicSize
— MethodmlirShapedTypeIsDynamicSize(size)
Checks whether the given value is used as a placeholder for dynamic sizes in shaped types.
MLIR.API.mlirShapedTypeIsDynamicStrideOrOffset
— MethodmlirShapedTypeIsDynamicStrideOrOffset(val)
Checks whether the given value is used as a placeholder for dynamic strides and offsets in shaped types.
MLIR.API.mlirSparseElementsAttrGetIndices
— MethodmlirSparseElementsAttrGetIndices(attr)
Returns the dense elements attribute containing 64-bit integer indices of non-null elements in the given sparse elements attribute.
MLIR.API.mlirSparseElementsAttrGetValues
— MethodmlirSparseElementsAttrGetValues(attr)
Returns the dense elements attribute containing the non-null elements in the given sparse elements attribute.
MLIR.API.mlirSparseElementsAttribute
— MethodmlirSparseElementsAttribute(shapedType, denseIndices, denseValues)
Creates a sparse elements attribute of the given shape from a list of indices and a list of associated values. Both lists are expected to be dense elements attributes with the same number of elements. The list of indices is expected to contain 64-bit integers. The attribute is created in the same context as the type.
MLIR.API.mlirSparseTensorEncodingAttrGet
— MethodmlirSparseTensorEncodingAttrGet(ctx, numDimLevelTypes, dimLevelTypes, dimOrdering, pointerBitWidth, indexBitWidth)
Creates a sparse_tensor.encoding attribute with the given parameters.
MLIR.API.mlirSparseTensorEncodingAttrGetDimLevelType
— MethodmlirSparseTensorEncodingAttrGetDimLevelType(attr, pos)
Returns a specified dim level type in a sparse_tensor.encoding attribute.
MLIR.API.mlirSparseTensorEncodingAttrGetDimOrdering
— MethodmlirSparseTensorEncodingAttrGetDimOrdering(attr)
Returns the dimension ordering in a sparse_tensor.encoding attribute.
MLIR.API.mlirSparseTensorEncodingAttrGetIndexBitWidth
— MethodmlirSparseTensorEncodingAttrGetIndexBitWidth(attr)
Returns the index bit width in a sparse_tensor.encoding attribute.
MLIR.API.mlirSparseTensorEncodingAttrGetPointerBitWidth
— MethodmlirSparseTensorEncodingAttrGetPointerBitWidth(attr)
Returns the pointer bit width in a sparse_tensor.encoding attribute.
MLIR.API.mlirSparseTensorEncodingGetNumDimLevelTypes
— MethodmlirSparseTensorEncodingGetNumDimLevelTypes(attr)
Returns the number of dim level types in a sparse_tensor.encoding attribute.
MLIR.API.mlirStringAttrGet
— MethodmlirStringAttrGet(ctx, str)
Creates a string attribute in the given context containing the given string.
MLIR.API.mlirStringAttrGetValue
— MethodmlirStringAttrGetValue(attr)
Returns the attribute values as a string reference. The data remains live as long as the context in which the attribute lives.
MLIR.API.mlirStringAttrTypedGet
— MethodmlirStringAttrTypedGet(type, str)
Creates a string attribute in the given context containing the given string. Additionally, the attribute has the given type.
MLIR.API.mlirStringRefCreate
— MethodmlirStringRefCreate(str, length)
Constructs a string reference from the pointer and length. The pointer need not reference to a null-terminated string.
MLIR.API.mlirStringRefCreateFromCString
— MethodmlirStringRefCreateFromCString(str)
Constructs a string reference from a null-terminated C string. Prefer mlirStringRefCreate
if the length of the string is known.
MLIR.API.mlirStringRefEqual
— MethodmlirStringRefEqual(string, other)
Returns true if two string references are equal, false otherwise.
MLIR.API.mlirSymbolRefAttrGet
— MethodmlirSymbolRefAttrGet(ctx, symbol, numReferences, references)
Creates a symbol reference attribute in the given context referencing a symbol identified by the given string inside a list of nested references. Each of the references in the list must not be nested.
MLIR.API.mlirSymbolRefAttrGetLeafReference
— MethodmlirSymbolRefAttrGetLeafReference(attr)
Returns the string reference to the leaf referenced symbol. The data remains live as long as the context in which the attribute lives.
MLIR.API.mlirSymbolRefAttrGetNestedReference
— MethodmlirSymbolRefAttrGetNestedReference(attr, pos)
Returns pos-th reference nested in the given symbol reference attribute.
MLIR.API.mlirSymbolRefAttrGetNumNestedReferences
— MethodmlirSymbolRefAttrGetNumNestedReferences(attr)
Returns the number of references nested in the given symbol reference attribute.
MLIR.API.mlirSymbolRefAttrGetRootReference
— MethodmlirSymbolRefAttrGetRootReference(attr)
Returns the string reference to the root referenced symbol. The data remains live as long as the context in which the attribute lives.
MLIR.API.mlirSymbolTableCreate
— MethodmlirSymbolTableCreate(operation)
Creates a symbol table for the given operation. If the operation does not have the SymbolTable trait, returns a null symbol table.
MLIR.API.mlirSymbolTableDestroy
— MethodmlirSymbolTableDestroy(symbolTable)
Destroys the symbol table created with mlirSymbolTableCreate
. This does not affect the operations in the table.
MLIR.API.mlirSymbolTableErase
— MethodmlirSymbolTableErase(symbolTable, operation)
Removes the given operation from the symbol table and erases it.
MLIR.API.mlirSymbolTableGetSymbolAttributeName
— MethodmlirSymbolTableGetSymbolAttributeName()
Returns the name of the attribute used to store symbol names compatible with symbol tables.
MLIR.API.mlirSymbolTableGetVisibilityAttributeName
— MethodmlirSymbolTableGetVisibilityAttributeName()
Returns the name of the attribute used to store symbol visibility.
MLIR.API.mlirSymbolTableInsert
— MethodmlirSymbolTableInsert(symbolTable, operation)
Inserts the given operation into the given symbol table. The operation must have the symbol trait. If the symbol table already has a symbol with the same name, renames the symbol being inserted to ensure name uniqueness. Note that this does not move the operation itself into the block of the symbol table operation, this should be done separately. Returns the name of the symbol after insertion.
MLIR.API.mlirSymbolTableIsNull
— MethodmlirSymbolTableIsNull(symbolTable)
Returns true if the symbol table is null.
MLIR.API.mlirSymbolTableLookup
— MethodmlirSymbolTableLookup(symbolTable, name)
Looks up a symbol with the given name in the given symbol table and returns the operation that corresponds to the symbol. If the symbol cannot be found, returns a null operation.
MLIR.API.mlirSymbolTableReplaceAllSymbolUses
— MethodmlirSymbolTableReplaceAllSymbolUses(oldSymbol, newSymbol, from)
Attempt to replace all uses that are nested within the given operation of the given symbol 'oldSymbol' with the provided 'newSymbol'. This does not traverse into nested symbol tables. Will fail atomically if there are any unknown operations that may be potential symbol tables.
MLIR.API.mlirSymbolTableWalkSymbolTables
— MethodmlirSymbolTableWalkSymbolTables(from, allSymUsesVisible, callback, userData)
Walks all symbol table operations nested within, and including, op
. For each symbol table operation, the provided callback is invoked with the op and a boolean signifying if the symbols within that symbol table can be treated as if all uses within the IR are visible to the caller. allSymUsesVisible
identifies whether all of the symbol uses of symbols within op
are visible.
MLIR.API.mlirTupleTypeGet
— MethodmlirTupleTypeGet(ctx, numElements, elements)
Creates a tuple type that consists of the given list of elemental types. The type is owned by the context.
MLIR.API.mlirTupleTypeGetNumTypes
— MethodmlirTupleTypeGetNumTypes(type)
Returns the number of types contained in a tuple.
MLIR.API.mlirTupleTypeGetType
— MethodmlirTupleTypeGetType(type, pos)
Returns the pos-th type in the tuple type.
MLIR.API.mlirTypeAttrGet
— MethodmlirTypeAttrGet(type)
Creates a type attribute wrapping the given type in the same context as the type.
MLIR.API.mlirTypeAttrGetValue
— MethodmlirTypeAttrGetValue(attr)
Returns the type stored in the given type attribute.
MLIR.API.mlirTypeDump
— MethodmlirTypeDump(type)
Prints the type to the standard error stream.
MLIR.API.mlirTypeEqual
— MethodmlirTypeEqual(t1, t2)
Checks if two types are equal.
MLIR.API.mlirTypeGetContext
— MethodmlirTypeGetContext(type)
Gets the context that a type was created with.
MLIR.API.mlirTypeGetTypeID
— MethodmlirTypeGetTypeID(type)
Gets the type ID of the type.
MLIR.API.mlirTypeIDAllocatorAllocateTypeID
— MethodmlirTypeIDAllocatorAllocateTypeID(allocator)
Allocates a type id that is valid for the lifetime of the allocator
MLIR.API.mlirTypeIDAllocatorCreate
— MethodmlirTypeIDAllocatorCreate()
Creates a type id allocator for dynamic type id creation
MLIR.API.mlirTypeIDAllocatorDestroy
— MethodmlirTypeIDAllocatorDestroy(allocator)
Deallocates the allocator and all allocated type ids
MLIR.API.mlirTypeIDCreate
— MethodmlirTypeIDCreate(ptr)
ptr
must be 8 byte aligned and unique to a type valid for the duration of the returned type id's usage
MLIR.API.mlirTypeIDEqual
— MethodmlirTypeIDEqual(typeID1, typeID2)
Checks if two type ids are equal.
MLIR.API.mlirTypeIDHashValue
— MethodmlirTypeIDHashValue(typeID)
Returns the hash value of the type id.
MLIR.API.mlirTypeIDIsNull
— MethodmlirTypeIDIsNull(typeID)
Checks whether a type id is null.
MLIR.API.mlirTypeIsAAnyQuantizedType
— MethodmlirTypeIsAAnyQuantizedType(type)
Returns true
if the given type is an AnyQuantizedType.
MLIR.API.mlirTypeIsABF16
— MethodmlirTypeIsABF16(type)
Checks whether the given type is a bf16 type.
MLIR.API.mlirTypeIsACalibratedQuantizedType
— MethodmlirTypeIsACalibratedQuantizedType(type)
Returns true
if the given type is a CalibratedQuantizedType.
MLIR.API.mlirTypeIsAComplex
— MethodmlirTypeIsAComplex(type)
Checks whether the given type is a Complex type.
MLIR.API.mlirTypeIsAF16
— MethodmlirTypeIsAF16(type)
Checks whether the given type is an f16 type.
MLIR.API.mlirTypeIsAF32
— MethodmlirTypeIsAF32(type)
Checks whether the given type is an f32 type.
MLIR.API.mlirTypeIsAF64
— MethodmlirTypeIsAF64(type)
Checks whether the given type is an f64 type.
MLIR.API.mlirTypeIsAFunction
— MethodmlirTypeIsAFunction(type)
Checks whether the given type is a function type.
MLIR.API.mlirTypeIsAIndex
— MethodmlirTypeIsAIndex(type)
Checks whether the given type is an index type.
MLIR.API.mlirTypeIsAInteger
— MethodmlirTypeIsAInteger(type)
Checks whether the given type is an integer type.
MLIR.API.mlirTypeIsAMemRef
— MethodmlirTypeIsAMemRef(type)
Checks whether the given type is a MemRef type.
MLIR.API.mlirTypeIsANone
— MethodmlirTypeIsANone(type)
Checks whether the given type is a None type.
MLIR.API.mlirTypeIsAOpaque
— MethodmlirTypeIsAOpaque(type)
Checks whether the given type is an opaque type.
MLIR.API.mlirTypeIsAQuantizedType
— MethodmlirTypeIsAQuantizedType(type)
Returns true
if the given type is a quantization dialect type.
MLIR.API.mlirTypeIsARankedTensor
— MethodmlirTypeIsARankedTensor(type)
Checks whether the given type is a ranked tensor type.
MLIR.API.mlirTypeIsAShaped
— MethodmlirTypeIsAShaped(type)
Checks whether the given type is a Shaped type.
MLIR.API.mlirTypeIsATensor
— MethodmlirTypeIsATensor(type)
Checks whether the given type is a Tensor type.
MLIR.API.mlirTypeIsATuple
— MethodmlirTypeIsATuple(type)
Checks whether the given type is a tuple type.
MLIR.API.mlirTypeIsAUniformQuantizedPerAxisType
— MethodmlirTypeIsAUniformQuantizedPerAxisType(type)
Returns true
if the given type is a UniformQuantizedPerAxisType.
MLIR.API.mlirTypeIsAUniformQuantizedType
— MethodmlirTypeIsAUniformQuantizedType(type)
Returns true
if the given type is a UniformQuantizedType.
MLIR.API.mlirTypeIsAUnrankedMemRef
— MethodmlirTypeIsAUnrankedMemRef(type)
Checks whether the given type is an UnrankedMemRef type.
MLIR.API.mlirTypeIsAUnrankedTensor
— MethodmlirTypeIsAUnrankedTensor(type)
Checks whether the given type is an unranked tensor type.
MLIR.API.mlirTypeIsAVector
— MethodmlirTypeIsAVector(type)
Checks whether the given type is a Vector type.
MLIR.API.mlirTypeIsNull
— MethodmlirTypeIsNull(type)
Checks whether a type is null.
MLIR.API.mlirTypeParseGet
— MethodmlirTypeParseGet(context, type)
Parses a type. The type is owned by the context.
MLIR.API.mlirTypePrint
— MethodmlirTypePrint(type, callback, userData)
Prints a location by sending chunks of the string representation and forwarding userData to
callback`. Note that the callback may be called several times with consecutive chunks of the string.
MLIR.API.mlirUniformQuantizedPerAxisTypeGet
— MethodmlirUniformQuantizedPerAxisTypeGet(flags, storageType, expressedType, nDims, scales, zeroPoints, quantizedDimension, storageTypeMin, storageTypeMax)
Creates an instance of UniformQuantizedPerAxisType with the given parameters in the same context as storageType
and returns it. scales
and zeroPoints
point to nDims
number of elements. The instance is owned by the context.
MLIR.API.mlirUniformQuantizedPerAxisTypeGetNumDims
— MethodmlirUniformQuantizedPerAxisTypeGetNumDims(type)
Returns the number of axes in the given quantized per-axis type.
MLIR.API.mlirUniformQuantizedPerAxisTypeGetQuantizedDimension
— MethodmlirUniformQuantizedPerAxisTypeGetQuantizedDimension(type)
Returns the index of the quantized dimension in the given quantized per-axis type.
MLIR.API.mlirUniformQuantizedPerAxisTypeGetScale
— MethodmlirUniformQuantizedPerAxisTypeGetScale(type, pos)
Returns pos
-th scale of the given quantized per-axis type.
MLIR.API.mlirUniformQuantizedPerAxisTypeGetZeroPoint
— MethodmlirUniformQuantizedPerAxisTypeGetZeroPoint(type, pos)
Returns pos
-th zero point of the given quantized per-axis type.
MLIR.API.mlirUniformQuantizedPerAxisTypeIsFixedPoint
— MethodmlirUniformQuantizedPerAxisTypeIsFixedPoint(type)
Returns true
if the given uniform quantized per-axis type is fixed-point.
MLIR.API.mlirUniformQuantizedTypeGet
— MethodmlirUniformQuantizedTypeGet(flags, storageType, expressedType, scale, zeroPoint, storageTypeMin, storageTypeMax)
Creates an instance of UniformQuantizedType with the given parameters in the same context as storageType
and returns it. The instance is owned by the context.
MLIR.API.mlirUniformQuantizedTypeGetScale
— MethodmlirUniformQuantizedTypeGetScale(type)
Returns the scale of the given uniform quantized type.
MLIR.API.mlirUniformQuantizedTypeGetZeroPoint
— MethodmlirUniformQuantizedTypeGetZeroPoint(type)
Returns the zero point of the given uniform quantized type.
MLIR.API.mlirUniformQuantizedTypeIsFixedPoint
— MethodmlirUniformQuantizedTypeIsFixedPoint(type)
Returns true
if the given uniform quantized type is fixed-point.
MLIR.API.mlirUnitAttrGet
— MethodmlirUnitAttrGet(ctx)
Creates a unit attribute in the given context.
MLIR.API.mlirUnrankedMemRefTypeGet
— MethodmlirUnrankedMemRefTypeGet(elementType, memorySpace)
Creates an Unranked MemRef type with the given element type and in the given memory space. The type is owned by the context of element type.
MLIR.API.mlirUnrankedMemRefTypeGetChecked
— MethodmlirUnrankedMemRefTypeGetChecked(loc, elementType, memorySpace)
Same as "mlirUnrankedMemRefTypeGet
" but returns a nullptr wrapping MlirType
on illegal arguments, emitting appropriate diagnostics.
MLIR.API.mlirUnrankedMemrefGetMemorySpace
— MethodmlirUnrankedMemrefGetMemorySpace(type)
Returns the memory spcae of the given Unranked MemRef type.
MLIR.API.mlirUnrankedTensorTypeGet
— MethodmlirUnrankedTensorTypeGet(elementType)
Creates an unranked tensor type with the given element type in the same context as the element type. The type is owned by the context.
MLIR.API.mlirUnrankedTensorTypeGetChecked
— MethodmlirUnrankedTensorTypeGetChecked(loc, elementType)
Same as "mlirUnrankedTensorTypeGet
" but returns a nullptr wrapping MlirType
on illegal arguments, emitting appropriate diagnostics.
MLIR.API.mlirValueDump
— MethodmlirValueDump(value)
Prints the value to the standard error stream.
MLIR.API.mlirValueEqual
— MethodmlirValueEqual(value1, value2)
Returns 1 if two values are equal, 0 otherwise.
MLIR.API.mlirValueGetType
— MethodmlirValueGetType(value)
Returns the type of the value.
MLIR.API.mlirValueIsABlockArgument
— MethodmlirValueIsABlockArgument(value)
Returns 1 if the value is a block argument, 0 otherwise.
MLIR.API.mlirValueIsAOpResult
— MethodmlirValueIsAOpResult(value)
Returns 1 if the value is an operation result, 0 otherwise.
MLIR.API.mlirValueIsNull
— MethodmlirValueIsNull(value)
Returns whether the value is null.
MLIR.API.mlirValuePrint
— MethodmlirValuePrint(value, callback, userData)
Prints a value by sending chunks of the string representation and forwarding userData to
callback`. Note that the callback may be called several times with consecutive chunks of the string.
MLIR.API.mlirVectorTypeGet
— MethodmlirVectorTypeGet(rank, shape, elementType)
Creates a vector type of the shape identified by its rank and dimensions, with the given element type in the same context as the element type. The type is owned by the context.
MLIR.API.mlirVectorTypeGetChecked
— MethodmlirVectorTypeGetChecked(loc, rank, shape, elementType)
Same as "mlirVectorTypeGet
" but returns a nullptr wrapping MlirType
on illegal arguments, emitting appropriate diagnostics.