Higher level API
Core.Float64 Method
Float64(attr)
Returns the value stored in the given floating point attribute, interpreting the value as double.
sourceCore.Int64 Method
Int64(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.
sourceCore.String Method
String(attr)
Returns the attribute values as a string reference. The data remains live as long as the context in which the attribute lives.
sourceCore.UInt64 Method
UInt64(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.
sourceReactant.MLIR.IR.AffineMap Method
AffineMap(ndims, nsymbols, affineExprs; context=context())
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.
sourceReactant.MLIR.IR.AffineMap Method
AffineMap(ndims, nsymbols; context=context())
Creates a zero result affine map of the given dimensions and symbols in the context. The affine map is owned by the context.
sourceReactant.MLIR.IR.AffineMap Method
AffineMap(attr)
Returns the affine map wrapped in the given affine map attribute.
sourceReactant.MLIR.IR.AffineMap Method
AffineMap(; context=context())
Creates a zero result affine map with no dimensions or symbols in the context. The affine map is owned by the context.
sourceReactant.MLIR.IR.Attribute Method
Attribute(str; context=context())
Creates a string attribute in the given context containing the given string.
sourceReactant.MLIR.IR.Attribute Method
Attribute(value; context=context())
Creates a bool attribute in the given context with the given value.
sourceReactant.MLIR.IR.Attribute Method
Attribute(elements; context=context())
Creates a dictionary attribute containing the given list of elements in the provided context.
sourceReactant.MLIR.IR.Attribute Method
Attribute(affineMap)
Creates an affine map attribute wrapping the given map. The attribute belongs to the same context as the affine map.
sourceReactant.MLIR.IR.Attribute Method
Attribute(type, str)
Creates a string attribute in the given context containing the given string. Additionally, the attribute has the given type.
sourceReactant.MLIR.IR.Attribute Method
Attribute(type)
Creates a type attribute wrapping the given type in the same context as the type.
sourceReactant.MLIR.IR.Attribute Method
Attribute(float; context=context(), location=Location(), check=false)
Creates a floating point attribute in the given context with the given double value and double-precision FP semantics. If check=true
, emits appropriate diagnostics on illegal arguments.
Reactant.MLIR.IR.Attribute Method
Attribute(complex; context=context(), location=Location(), check=false)
Creates a complex attribute in the given context with the given complex value and double-precision FP semantics.
sourceReactant.MLIR.IR.Attribute Method
Attribute(elements; context=context())
Creates an array element containing the given list of elements in the given context.
sourceReactant.MLIR.IR.Attribute Method
Attribute(int)
Creates an integer attribute of the given type with the given integer value.
sourceReactant.MLIR.IR.Block Method
Block(args, locs)
Creates a new empty block with the given argument types and transfers ownership to the caller.
sourceReactant.MLIR.IR.BlockIterator Type
BlockIterator(region::Region)
Iterates over all blocks in the given region.
sourceReactant.MLIR.IR.Context Method
Context()
Creates an MLIR context and transfers its ownership to the caller.
sourceReactant.MLIR.IR.ExecutionEngine Type
ExecutionEngine(op, optLevel, sharedlibs = [])
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.
Reactant.MLIR.IR.Identifier Method
Identifier(context, str)
Gets an identifier with the given string value.
sourceReactant.MLIR.IR.IntegerSet Method
IntegerSet(ndims, nsymbols, constraints, eqflags; context=context())
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
need to be arrays of the same length.
Reactant.MLIR.IR.IntegerSet Method
Integerset(ndims, nsymbols; context=context())
Gets or creates a new canonically empty integer set with the give number of dimensions and symbols in the given context.
sourceReactant.MLIR.IR.LogicalResult Type
LogicalResult
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 LogicalResult
must only be inspected using the associated functions.
Reactant.MLIR.IR.Module Type
Module(location=Location())
Creates a new, empty module and transfers ownership to the caller.
sourceReactant.MLIR.IR.NamedAttribute Method
NamedAttribute(name, attr)
Associates an attribute with the name. Takes ownership of neither.
sourceReactant.MLIR.IR.OpPassManager Method
OpPassManager(opPassManager, 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.
Reactant.MLIR.IR.OpPassManager Method
OpPassManager(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.
Reactant.MLIR.IR.OpPassManager Method
OpPassManager(passManager)
Cast a top-level PassManager
to a generic OpPassManager
.
Reactant.MLIR.IR.Operation Method
Operation(module)
Views the module as a generic operation.
sourceReactant.MLIR.IR.OperationIterator Type
OperationIterator(block::Block)
Iterates over all operations for the given block.
sourceReactant.MLIR.IR.PassManager Method
PassManager(anchorOp; context=context())
Create a new top-level PassManager anchored on anchorOp
.
Reactant.MLIR.IR.PassManager Method
PassManager(; context=context())
Create a new top-level PassManager.
sourceReactant.MLIR.IR.Region Method
Region()
Creates a new empty region and transfers ownership to the caller.
sourceReactant.MLIR.IR.RegionIterator Type
RegionIterator(::Operation)
Iterates over all sub-regions for the given operation.
sourceReactant.MLIR.IR.SymbolTable Method
mlirSymbolTableCreate(operation)
Creates a symbol table for the given operation. If the operation does not have the SymbolTable trait, returns a null symbol table.
sourceReactant.MLIR.IR.Type Method
Type(attr)
Returns the type stored in the given type attribute.
sourceReactant.MLIR.IR.Type Method
Type(T::Core.Type{<:Integer}; context=context()
Creates a signless integer type of the given bitwidth in the context. The type is owned by the context.
sourceReactant.MLIR.IR.Type Method
Type(::Core.Type{Reactant.F8E4M3B11FNUZ}; context=context())
Creates a f8e4m3b11fnuz type in the given context. The type is owned by the context.
sourceReactant.MLIR.IR.Type Method
Type(::Core.Type{Reactant.F8E4M3FNUZ}; context=context())
Creates a f8e4m3fnuz type in the given context. The type is owned by the context.
sourceReactant.MLIR.IR.Type Method
Type(::Core.Type{Reactant.F8E4M3FN}; context=context())
Creates a f8e4m3fn type in the given context. The type is owned by the context.
sourceReactant.MLIR.IR.Type Method
Type(::Core.Type{Reactant.F8E5M2FNUZ}; context=context())
Creates a f8e5m2fnuz type in the given context. The type is owned by the context.
sourceReactant.MLIR.IR.Type Method
Type(::Core.Type{Reactant.F8E5M2}; context=context())
Creates a f8e5m2 type in the given context. The type is owned by the context.
sourceReactant.MLIR.IR.Type Method
Type(T::Core.Type{<:Signed}; context=context()
Creates a signed integer type of the given bitwidth in the context. The type is owned by the context.
sourceReactant.MLIR.IR.Type Method
Type(T::Core.Type{<:Unsigned}; context=context()
Creates an unsigned integer type of the given bitwidth in the context. The type is owned by the context.
sourceReactant.MLIR.IR.Type Method
Type(T::Core.Type{Bool}; context=context()
Creates a 1-bit signless integer type in the context. The type is owned by the context.
sourceReactant.MLIR.IR.Type Method
Type(::Core.Type{Float16}; context=context())
Creates an f16 type in the given context. The type is owned by the context.
sourceReactant.MLIR.IR.Type Method
Type(Core.Type{Float32}; context=context())
Creates an f32 type in the given context. The type is owned by the context.
sourceReactant.MLIR.IR.Type Method
Type(Core.Type{Float64}; context=context())
Creates a f64 type in the given context. The type is owned by the context.
sourceReactant.MLIR.IR.Type Method
Type(::Core.Type{Nothing}; context=context())
Creates a None type in the given context. The type is owned by the context.
sourceReactant.MLIR.IR.Type Method
Type(elements; context=context())
Type(::Core.Type{<:Tuple{T...}}; context=context())
Creates a tuple type that consists of the given list of elemental types. The type is owned by the context.
sourceReactant.MLIR.IR.Type Method
Type(Complex{T}) where {T}
Creates a complex type with the given element type in the same context as the element type. The type is owned by the context.
sourceBase.:== Method
==(block, other)
Checks whether two blocks handles point to the same block. This does not perform deep comparison.
sourceBase.:== Method
==(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.
sourceBase.:== Method
==(region, other)
Checks whether two region handles point to the same region. This does not perform deep comparison.
sourceBase.copy Method
copy(op)
Creates a deep copy of an operation. The operation is not inserted and ownership is transferred to the caller.
sourceBase.div Method
div(lhs, rhs)
÷(lhs, rhs)
fld(lhs, rhs)
Creates an affine floordiv expression with 'lhs' and 'rhs'.
sourceBase.fill Method
fill(attr, shapedType)
Creates a dense elements attribute with the given Shaped type containing a single replicated element (splat).
sourceBase.gcd Method
gcd(affineExpr)
Returns the greatest known integral divisor of this affine expression. The result is always positive.
sourceBase.insert! Method
insert!(block, index, operation)
Takes an operation owned by the caller and inserts it as index
to the block. This is an expensive operation that scans the block linearly, prefer insertBefore/After instead.
Base.insert! Method
insert!(region, index, block)
Takes a block owned by the caller and inserts it at index
to the given region. This is an expensive operation that linearly scans the region, prefer insertAfter/Before instead.
Base.isempty Method
isempty(affineMap)
Checks whether the given affine map is an empty affine map.
sourceBase.isperm Method
isperm(affineMap)
Checks whether the given affine map represents a symbol-less permutation map.
sourceBase.ndims Method
ndims(affineMap)
Returns the number of dimensions of the given affine map.
sourceBase.parse Method
parse(passManager, pipeline)
Parse a textual MLIR pass pipeline and add it to the provided OpPassManager
.
Base.parse Method
parse(::Core.Type{Attribute}, str; context=context())
Parses an attribute. The attribute is owned by the context.
sourceBase.parse Method
parse(::Type{Module}, module; context=context())
Parses a module from the string and transfers ownership to the caller.
sourceBase.parse Method
parse(type; context=context())
Parses a type. The type is owned by the context.
sourceBase.push! Method
push!(block, operation)
Takes an operation owned by the caller and appends it to the block.
sourceBase.push! Method
push!(region, block)
Takes a block owned by the caller and appends it to the given region.
sourceBase.push! Method
push!(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.
sourceBase.replace Method
mlirAffineMapReplace(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.
Base.replace Method
mlirIntegerSetReplaceGet(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.
Base.reshape Method
Base.reshape(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.
sourceReactant.MLIR.IR.AffineDimensionExpr Method
AffineDimensionExpr(position; context=context)
Creates an affine dimension expression with 'position' in the context.
sourceReactant.MLIR.IR.BFloat16Type Method
BFloat16Type(; context=context())
Creates a bf16 type in the given context. The type is owned by the context.
sourceReactant.MLIR.IR.ConstantAffineMap Method
ConstantAffineMap(val; context=context())
Creates a single constant result affine map in the context. The affine map is owned by the context.
sourceReactant.MLIR.IR.ConstantExpr Method
ConstantExpr(constant::Int; context=context())
Creates an affine constant expression with 'constant' in the context.
sourceReactant.MLIR.IR.DenseElementsAttribute Method
DenseElementsAttribute(array::AbstractArray)
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.
sourceReactant.MLIR.IR.DenseElementsAttribute Method
DenseElementsAttribute(array::AbstractArray{String})
Creates a dense elements attribute with the given shaped type from string elements.
sourceReactant.MLIR.IR.DenseElementsAttribute Method
DenseElementsAttribute(shapedType, elements)
Creates a dense elements attribute with the given Shaped type and elements in the same context as the type.
sourceReactant.MLIR.IR.FlatSymbolRefAttribute Method
FlatSymbolRefAttribute(ctx, symbol)
Creates a flat symbol reference attribute in the given context referencing a symbol identified by the given string.
sourceReactant.MLIR.IR.Float8E4M3FN Method
Float8E4M3FN(; context=context())
Creates an f8E4M3FN type in the given context. The type is owned by the context.
sourceReactant.MLIR.IR.Float8E5M2 Method
Float8E5M2(; context=context())
Creates an f8E5M2 type in the given context. The type is owned by the context.
sourceReactant.MLIR.IR.FunctionType Method
FunctionType(inputs, results; context=context())
Creates a function type, mapping a list of input types to result types.
sourceReactant.MLIR.IR.IdentityAffineMap Method
IdentityAffineMap(ndims; context=context())
Creates an affine map with 'ndims' identity in the context. The affine map is owned by the context.
sourceReactant.MLIR.IR.IndexType Method
IndexType(; context=context())
Creates an index type in the given context. The type is owned by the context.
sourceReactant.MLIR.IR.MemRefType Method
MemRefType(elementType, rank, shape, layout, memorySpace; location=Location(), check=false)
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. If check=true
, emits appropriate diagnostics on illegal arguments.
Reactant.MLIR.IR.MemRefType Method
MemRefType(elementType, rank, shape, memorySpace; location=Location(), check=false)
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. If check=true
, emits appropriate diagnostics on illegal arguments.
Reactant.MLIR.IR.MemRefType Method
MemRefType(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. If check=true
, emits appropriate diagnostics on illegal arguments.
Reactant.MLIR.IR.MinorIdentityAffineMap Method
MinorIdentityAffineMap(ndims, nresults; context=context())
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.
sourceReactant.MLIR.IR.OpaqueAttribute Method
OpaqueAttribute(dialectNamespace, dataLength, data, type; context=context())
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).
sourceReactant.MLIR.IR.OpaqueType Method
OpaqueType(dialectNamespace, typeData; context=context())
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).
sourceReactant.MLIR.IR.PermutationAffineMap Method
PermutationAffineMap(permutation; context=context())
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.
Reactant.MLIR.IR.SymbolExpr Method
SymbolExpr(position; context=context())
Creates an affine symbol expression with 'position' in the context.
sourceReactant.MLIR.IR.SymbolRefAttribute Method
SymbolRefAttribute(symbol, references; context=context())
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.
sourceReactant.MLIR.IR.TensorType Function
TensorType(shape, elementType, encoding=Attribute(); location=Location(), check=false)
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. If check=true
, emits appropriate diagnostics on illegal arguments.
Reactant.MLIR.IR.TensorType Method
TensorType(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. If check=true
, emits appropriate diagnostics on illegal arguments.
Reactant.MLIR.IR.UnitAttribute Method
UnitAttribute(; context=context())
Creates a unit attribute in the given context.
sourceReactant.MLIR.IR.VectorType Method
VectorType(rank, shape, elementType; location=Location(), check=false)
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. If check=true
, emits appropriate diagnostics on illegal arguments.
Reactant.MLIR.IR.add_owned_pass! Method
add_owned_pass!(opPassManager, pass)
Add a pass and transfer ownership to the provided OpPassManager
. If the pass is not a generic operation pass or matching the type of the provided OpPassManager
, a new OpPassManager
is implicitly nested under the provided OpPassManager
.
Reactant.MLIR.IR.add_owned_pass! Method
add_owned_pass!(passManager, pass)
Add a pass and transfer ownership to the provided top-level PassManager
. If the pass is not a generic operation pass or a ModulePass
, a new OpPassManager
is implicitly nested under the provided PassManager.
Reactant.MLIR.IR.add_pipeline! Method
add_pipeline!(passManager, pipelineElements, callback, userData)
Parse a sequence of textual MLIR pass pipeline elements and add them to the provided OpPassManager. If parsing fails an error message is reported using the provided callback.
sourceReactant.MLIR.IR.affinemap Method
affinemap(type)
Returns the affine map of the given MemRef type.
sourceReactant.MLIR.IR.attr! Method
attr!(op, name, attr)
Sets an attribute by name, replacing the existing if it exists or adding a new one otherwise.
sourceReactant.MLIR.IR.attr Method
attr(op, name)
Returns an attribute attached to the operation given its name.
sourceReactant.MLIR.IR.block Method
block(op)
Gets the block that owns this operation, returning null if the operation is not owned.
sourceReactant.MLIR.IR.block_arg_num Method
block_arg_num(value)
Returns the position of the value in the argument list of its block.
sourceReactant.MLIR.IR.block_owner Method
block_owner(value)
Returns the block in which this value is defined as an argument. Asserts if the value is not a block argument.
sourceReactant.MLIR.IR.body Method
body(module)
Gets the body of the module, i.e. the only block it contains.
sourceReactant.MLIR.IR.compose Method
compose(affineExpr, affineMap)
Composes the given map with the given expression.
sourceReactant.MLIR.IR.constraint Method
mlirIntegerSetGetConstraint(set, i)
Returns i
-th constraint of the set.
Reactant.MLIR.IR.context Method
context(affineExpr)
Gets the context that owns the affine expression.
sourceReactant.MLIR.IR.context Method
context(affineMap)
Gets the context that the given affine map was created with.
sourceReactant.MLIR.IR.context Method
context(attribute)
Gets the context that an attribute was created with.
sourceReactant.MLIR.IR.context Method
context(ident)
Returns the context associated with this identifier
sourceReactant.MLIR.IR.context Method
context(set)
Gets the context in which the given integer set lives.
sourceReactant.MLIR.IR.context Method
context(module)
Gets the context that a module was created with.
sourceReactant.MLIR.IR.context Method
context(op)
Gets the context this operation is associated with.
sourceReactant.MLIR.IR.context Method
context(type)
Gets the context that a type was created with.
sourceReactant.MLIR.IR.data Method
data(attr)
Returns the raw data as a string reference. The data remains live as long as the context in which the attribute lives.
sourceReactant.MLIR.IR.data Method
mlirOpaqueTypeGetData(type)
Returns the raw data as a string reference. The data remains live as long as the context in which the type lives.
sourceReactant.MLIR.IR.delete! Method
delete!(symboltable, operation)
Removes the given operation from the symbol table and erases it.
sourceReactant.MLIR.IR.dynsize Method
dynsize()
Returns the value indicating a dynamic size in a shaped type. Prefer isdynsize
to direct comparisons with this value.
Reactant.MLIR.IR.dynstrideoroffset Method
mlirShapedTypeGetDynamicStrideOrOffset()
Returns the value indicating a dynamic stride or offset in a shaped type. Prefer isdynstrideoroffset
to direct comparisons with this value.
Reactant.MLIR.IR.enable_ir_printing! Method
enable_ir_printing!(passManager)
Enable mlir-print-ir-after-all.
sourceReactant.MLIR.IR.enable_verifier! Function
enable_verifier!(passManager, enable)
Enable / disable verify-each.
sourceReactant.MLIR.IR.encoding Method
encoding(type)
Gets the 'encoding' attribute from the ranked tensor type, returning a nothing
if none.
Reactant.MLIR.IR.first_block Method
first_block(region)
Gets the first block in the region.
sourceReactant.MLIR.IR.first_op Method
first_op(block)
Returns the first operation in the block or nothing
if empty.
Reactant.MLIR.IR.first_use Method
first_use(value)
Returns an OpOperand
representing the first use of the value, or a nothing
if there are no uses.
Reactant.MLIR.IR.flatsymbol Method
flatsymbol(attr)
Returns the referenced symbol as a string reference. The data remains live as long as the context in which the attribute lives.
sourceReactant.MLIR.IR.hasrank Method
hasrank(type)
Checks whether the given shaped type is ranked.
sourceReactant.MLIR.IR.hasstaticshape Method
hasstaticshape(type)
Checks whether the given shaped type has a static shape.
sourceReactant.MLIR.IR.insert_after! Method
insert_after!(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.
sourceReactant.MLIR.IR.insert_after! Method
insert_after!(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.
sourceReactant.MLIR.IR.insert_before! Method
insert_before!(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.
sourceReactant.MLIR.IR.insert_before! Method
insert_before!(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.
sourceReactant.MLIR.IR.is_block_arg Method
is_block_arg(value)
Returns 1 if the value is a block argument, 0 otherwise.
sourceReactant.MLIR.IR.is_op_res Method
is_op_res(value)
Returns 1 if the value is an operation result, 0 otherwise.
sourceReactant.MLIR.IR.is_pure_affine Method
is_pure_affine(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.
sourceReactant.MLIR.IR.is_registered Method
is_registered(name; context=context())
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.
sourceReactant.MLIR.IR.is_symbolic_or_constant Method
is_symbolic_or_constant(affineExpr)
Checks whether the given affine expression is made out of only symbols and constants.
sourceReactant.MLIR.IR.isadd Method
isadd(affineExpr)
Checks whether the given affine expression is an add expression.
sourceReactant.MLIR.IR.isaffinemap Method
isaffinemap(attr)
Checks whether the given attribute is an affine map attribute.
sourceReactant.MLIR.IR.isarray Method
isarray(attr)
Checks whether the given attribute is an array attribute.
sourceReactant.MLIR.IR.isbinary Method
isbinary(affineExpr)
Checks whether the given affine expression is binary.
sourceReactant.MLIR.IR.isbool Method
isbool(attr)
Checks whether the given attribute is a bool attribute.
sourceReactant.MLIR.IR.isceildiv Method
isceildiv(affineExpr)
Checks whether the given affine expression is an ceildiv expression.
sourceReactant.MLIR.IR.iscomplex Method
iscomplex(type)
Checks whether the given type is a Complex type.
sourceReactant.MLIR.IR.isconstantexpr Method
isconstantexpr(affineExpr)
Checks whether the given affine expression is a constant expression.
sourceReactant.MLIR.IR.isconstrainteq Method
mlirIntegerSetIsConstraintEq(set, i)
Returns true
of the i
-th constraint of the set is an equality constraint, false
otherwise.
Reactant.MLIR.IR.isdenseelements Method
isdenseelements(attr)
Checks whether the given attribute is a dense elements attribute.
sourceReactant.MLIR.IR.isdict Method
isdict(attr)
Checks whether the given attribute is a dictionary attribute.
sourceReactant.MLIR.IR.isdimexpr Method
isdimexpr(affineExpr)
Checks whether the given affine expression is a dimension expression.
sourceReactant.MLIR.IR.isdyndim Method
isdyndim(type, i)
Checks wither the i
-th dimension of the given shaped type is dynamic.
Reactant.MLIR.IR.isdynsize Method
isdynsize(size)
Checks whether the given value is used as a placeholder for dynamic sizes in shaped types.
sourceReactant.MLIR.IR.isdynstrideoroffset Method
mlirShapedTypeIsDynamicStrideOrOffset(val)
Checks whether the given value is used as a placeholder for dynamic strides and offsets in shaped types.
sourceReactant.MLIR.IR.iselements Method
iselements(attr)
Checks whether the given attribute is an elements attribute.
sourceReactant.MLIR.IR.isempty Method
isempty(set)
Checks whether the given set is a canonical empty set, e.g., the set returned by mlirIntegerSetEmptyGet
.
Reactant.MLIR.IR.isf8e4m3b11fnuz Method
isf8e4m3b11fnuz(type)
Checks whether the given type is an f8E4M3B11FNUZ type.
sourceReactant.MLIR.IR.isf8e4m3fn Method
isf8e4m3fn(type)
Checks whether the given type is an f8E4M3FN type.
sourceReactant.MLIR.IR.isf8e4m3fnuz Method
isf8e4m3fnuz(type)
Checks whether the given type is an f8E4M3FNUZ type.
sourceReactant.MLIR.IR.isf8e5m2 Method
isf8e5m2(type)
Checks whether the given type is an f8E5M2 type.
sourceReactant.MLIR.IR.isf8e5m2fnuz Method
isf8e5m2fnuz(type)
Checks whether the given type is an f8E5M2FNUZ type.
sourceReactant.MLIR.IR.isfailure Method
isfailure(res)
Checks if the given logical result represents a failure.
sourceReactant.MLIR.IR.isflatsymbolref Method
isflatsymbolref(attr)
Checks whether the given attribute is a flat symbol reference attribute.
sourceReactant.MLIR.IR.isfloat Method
isfloat(attr)
Checks whether the given attribute is a floating point attribute.
sourceReactant.MLIR.IR.isfloordiv Method
isfloordiv(affineExpr)
Checks whether the given affine expression is an floordiv expression.
sourceReactant.MLIR.IR.isfunction Method
isfunction(type)
Checks whether the given type is a function type.
sourceReactant.MLIR.IR.isfunctionofdimexpr Method
isfunctionofdimexpr(affineExpr, position)
Checks whether the given affine expression involves AffineDimExpr 'position'.
sourceReactant.MLIR.IR.isidentity Method
isidentity(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.
sourceReactant.MLIR.IR.isindex Method
isindex(type)
Checks whether the given type is an index type.
sourceReactant.MLIR.IR.isinteger Method
isinteger(attr)
Checks whether the given attribute is an integer attribute.
sourceReactant.MLIR.IR.isinteger Method
isinteger(type)
Checks whether the given type is an integer type.
sourceReactant.MLIR.IR.isintegerset Method
isintegerset(attr)
Checks whether the given attribute is an integer set attribute.
sourceReactant.MLIR.IR.ismemref Method
ismemref(type)
Checks whether the given type is a MemRef type.
sourceReactant.MLIR.IR.isminoridentity Method
isminoridentity(affineMap)
Checks whether the given affine map is a minor identity affine map.
sourceReactant.MLIR.IR.ismod Method
ismod(affineExpr)
Checks whether the given affine expression is an mod expression.
sourceReactant.MLIR.IR.ismul Method
ismul(affineExpr)
Checks whether the given affine expression is an mul expression.
sourceReactant.MLIR.IR.ismultipleof Method
ismultipleof(affineExpr, factor)
Checks whether the given affine expression is a multiple of 'factor'.
sourceReactant.MLIR.IR.isnone Method
mlirTypeIsANone(type)
Checks whether the given type is a None type.
sourceReactant.MLIR.IR.isopaque Method
isopaque(attr)
Checks whether the given attribute is an opaque attribute.
sourceReactant.MLIR.IR.isopaque Method
isopaque(type)
Checks whether the given type is an opaque type.
sourceReactant.MLIR.IR.isprojperm Method
isprojperm(affineMap)
Checks whether the given affine map represents a subset of a symbol-less permutation map.
sourceReactant.MLIR.IR.isrankedtensor Method
isrankedtensor(type)
Checks whether the given type is a ranked tensor type.
sourceReactant.MLIR.IR.isshaped Method
isshaped(type)
Checks whether the given type is a Shaped type.
sourceReactant.MLIR.IR.issigned Method
issigned(type)
Checks whether the given integer type is signed.
sourceReactant.MLIR.IR.issignless Method
issignless(type)
Checks whether the given integer type is signless.
sourceReactant.MLIR.IR.issingleconstant Method
issingleconstant(affineMap)
Checks whether the given affine map is a single result constant affine map.
sourceReactant.MLIR.IR.issparseelements Method
issparseelements(attr)
Checks whether the given attribute is a sparse elements attribute.
sourceReactant.MLIR.IR.issplat Method
issplat(attr)
Checks whether the given dense elements attribute contains a single replicated value (splat).
sourceReactant.MLIR.IR.isstring Method
isstring(attr)
Checks whether the given attribute is a string attribute.
sourceReactant.MLIR.IR.issuccess Method
issuccess(res)
Checks if the given logical result represents a success.
sourceReactant.MLIR.IR.issymbolexpr Method
issymbolexpr(affineExpr)
Checks whether the given affine expression is a symbol expression.
sourceReactant.MLIR.IR.issymbolref Method
issymbolref(attr)
Checks whether the given attribute is a symbol reference attribute.
sourceReactant.MLIR.IR.istensor Method
istensor(type)
Checks whether the given type is a Tensor type.
sourceReactant.MLIR.IR.istuple Method
istuple(type)
Checks whether the given type is a tuple type.
sourceReactant.MLIR.IR.istype Method
istype(attr)
Checks whether the given attribute is a type attribute.
sourceReactant.MLIR.IR.isunit Method
isunit(attr)
Checks whether the given attribute is a unit attribute.
sourceReactant.MLIR.IR.isunrankedmemref Method
mlirTypeIsAUnrankedMemRef(type)
Checks whether the given type is an UnrankedMemRef type.
sourceReactant.MLIR.IR.isunrankedtensor Method
isunrankedtensor(type)
Checks whether the given type is an unranked tensor type.
sourceReactant.MLIR.IR.isunsigned Method
isunsigned(type)
Checks whether the given integer type is unsigned.
sourceReactant.MLIR.IR.isvector Method
isvector(type)
Checks whether the given type is a Vector type.
sourceReactant.MLIR.IR.leafref Method
leafref(attr)
Returns the string reference to the leaf referenced symbol. The data remains live as long as the context in which the attribute lives.
sourceReactant.MLIR.IR.lhs Method
lhs(affineExpr)
Returns the left hand side affine expression of the given affine binary operation expression.
sourceReactant.MLIR.IR.lookup Method
lookup(jit, name)
Lookup a native function in the execution engine by name, returns nullptr if the name can't be looked-up.
sourceReactant.MLIR.IR.lookup Method
lookup(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.
sourceReactant.MLIR.IR.majorsubmap Method
majorsubmap(affineMap, nresults)
Returns the affine map consisting of the most major nresults
results. Returns the null AffineMap if the nresults
is equal to zero. Returns the affineMap
if nresults
is greater or equals to number of results of the given affine map.
Reactant.MLIR.IR.memspace Method
mlirMemRefTypeGetMemorySpace(type)
Returns the memory space of the given MemRef type.
sourceReactant.MLIR.IR.minorsubmap Method
minorsubmap(affineMap, nresults)
Returns the affine map consisting of the most minor nresults
results. Returns the null AffineMap if the nresults
is equal to zero. Returns the affineMap
if nresults
is greater or equals to number of results of the given affine map.
Reactant.MLIR.IR.move_after! Method
move_after!(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.
sourceReactant.MLIR.IR.move_before! Method
move_before!(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.
sourceReactant.MLIR.IR.namespace Method
mlirOpaqueAttrGetDialectNamespace(attr)
Returns the namespace of the dialect with which the given opaque attribute is associated. The namespace string is owned by the context.
sourceReactant.MLIR.IR.namespace Method
mlirOpaqueTypeGetDialectNamespace(type)
Returns the namespace of the dialect with which the given opaque type is associated. The namespace string is owned by the context.
sourceReactant.MLIR.IR.nattrs Method
nattrs(op)
Returns the number of attributes attached to the operation.
sourceReactant.MLIR.IR.nconstraints Method
nconstraints(set)
Returns the number of constraints (equalities + inequalities) in the given set.
sourceReactant.MLIR.IR.nequalities Method
nequalities(set)
Returns the number of equalities in the given set.
sourceReactant.MLIR.IR.next Method
next(block)
Returns the block immediately following the given block in its parent region or nothing
if last.
Reactant.MLIR.IR.next Method
next(opOperand)
Returns an op operand representing the next use of the value, or nothing
if there is no next use.
Reactant.MLIR.IR.ninequalities Method
ninequalities(set)
Returns the number of inequalities in the given set.
sourceReactant.MLIR.IR.ninputs Method
ninputs(affineMap)
Returns the number of inputs (dimensions + symbols) of the given affine map.
sourceReactant.MLIR.IR.ninputs Method
ninputs(set)
Returns the number of inputs (dimensions + symbols) in the given set.
sourceReactant.MLIR.IR.nnestedrefs Method
nnestedrefs(attr)
Returns the number of references nested in the given symbol reference attribute.
sourceReactant.MLIR.IR.noperands Method
noperands(op)
Returns the number of operands of the operation.
sourceReactant.MLIR.IR.nregions Method
nregions(op)
Returns the number of regions attached to the given operation.
sourceReactant.MLIR.IR.nresults Method
nresults(affineMap)
Returns the number of results of the given affine map.
sourceReactant.MLIR.IR.nresults Method
nresults(op)
Returns the number of results of the operation.
sourceReactant.MLIR.IR.nsuccessors Method
nsuccessors(op)
Returns the number of successor blocks of the operation.
sourceReactant.MLIR.IR.nsymbols Method
nsymbols(affineMap)
Returns the number of symbols of the given affine map.
sourceReactant.MLIR.IR.nsymbols Method
nsymbols(set)
Returns the number of symbols in the given set.
sourceReactant.MLIR.IR.op_owner Method
op_owner(value)
Returns an operation that produced this value as its result. Asserts if the value is not an op result.
sourceReactant.MLIR.IR.op_res_num Method
op_res_num(value)
Returns the position of the value in the list of results of the operation that produced it.
sourceReactant.MLIR.IR.operand! Method
operand!(op, i, value)
Sets the i
-th operand of the operation.
Reactant.MLIR.IR.operandindex Method
operandindex(opOperand)
Returns the operand number of an op operand.
sourceReactant.MLIR.IR.owner Method
owner(opOperand)
Returns the owner operation of an op operand.
sourceReactant.MLIR.IR.parent_op Method
parent_op(block)
Returns the closest surrounding operation that contains this block.
sourceReactant.MLIR.IR.parent_op Method
parent_op(op)
Gets the operation that owns this operation, returning null if the operation is not owned.
sourceReactant.MLIR.IR.parent_region Method
parent_region(block)
Returns the region that contains this block.
sourceReactant.MLIR.IR.position Method
position(affineExpr)
Returns the position of the given affine dimension expression, affine symbol expression or ...
sourceReactant.MLIR.IR.push_argument! Method
push_argument!(block, type; location=Location())
Appends an argument of the specified type to the block. Returns the newly added argument.
sourceReactant.MLIR.IR.region Method
region(op, i)
Returns i
-th region attached to the operation.
Reactant.MLIR.IR.result Method
result(affineMap, pos)
Returns the result at the given position.
sourceReactant.MLIR.IR.result Method
result(affineMap)
Returns the constant result of the given affine map. The function asserts that the map has a single constant result.
sourceReactant.MLIR.IR.rhs Method
rhs(affineExpr)
Returns the right hand side affine expression of the given affine binary operation expression.
sourceReactant.MLIR.IR.rmattr! Method
rmattr!(op, name)
Removes an attribute by name. Returns false if the attribute was not found and true if removed.
sourceReactant.MLIR.IR.rmfromparent! Method
rmfromparent!(op)
Removes the given operation from its parent block. The operation is not destroyed. The ownership of the operation is transferred to the caller.
sourceReactant.MLIR.IR.rootref Method
rootref(attr)
Returns the string reference to the root referenced symbol. The data remains live as long as the context in which the attribute lives.
sourceReactant.MLIR.IR.run! Method
run!(passManager, module)
Run the provided passManager
on the given module
.
Reactant.MLIR.IR.submap Method
submap(affineMap, positions)
Returns the affine map consisting of the positions
subset.
Reactant.MLIR.IR.successor Method
successor(op, i)
Returns i
-th successor of the operation.
Reactant.MLIR.IR.terminator Method
terminator(block)
Returns the terminator operation in the block or nothing
if no terminator.
Reactant.MLIR.IR.type! Method
set_type!(value, type)
Sets the type of the block argument to the given type.
sourceReactant.MLIR.IR.typeid Method
typeid(op)
Gets the type id of the operation. Returns null if the operation does not have a registered operation description.
sourceReactant.MLIR.IR.value Method
value(affineExpr)
Returns the value of the given affine constant expression.
sourceReactant.MLIR.IR.verify Method
verify(op)
Verify the operation and return true if it passes, false if it fails.
sourceReactant.MLIR.IR.verifyall Method
verifyall(operation; debug=false)
Prints the operations which could not be verified.
sourceReactant.MLIR.IR.@affinemap Macro
@affinemap (d1, d2, d3, ...)[s1, s2, ...] -> (d0 + d1, ...)
Returns an affine map from the provided Julia expression. On the right hand side are allowed the following function calls:
- +, *, ÷, %, fld, cld
The rhs can only contains dimensions and symbols present on the left hand side or integer literals.
julia> using Reactant.MLIR: IR
julia> IR.context!(IR.Context()) do
IR.@affinemap (d1, d2)[s0] -> (d1 + s0, d2 % 10)
end
MLIR.IR.AffineMap(#= (d0, d1)[s0] -> (d0 + s0, d1 mod 10) =#)
MLIR C API
Reactant.MLIR.API.LLVMAttributeRef Type
Used to represent an attributes.
See also
llvm::Attribute
sourceReactant.MLIR.API.LLVMBasicBlockRef Type
Represents a basic block of instructions in LLVM IR.
This models llvm::BasicBlock.
sourceReactant.MLIR.API.LLVMBuilderRef Type
Represents an LLVM basic block builder.
This models llvm::IRBuilder.
sourceReactant.MLIR.API.LLVMContextRef Type
The top-level container for all LLVM global data. See the LLVMContext class.
sourceReactant.MLIR.API.LLVMDIBuilderRef Type
Represents an LLVM debug info builder.
This models llvm::DIBuilder.
sourceReactant.MLIR.API.LLVMMemoryBufferRef Type
Used to pass regions of memory through LLVM interfaces.
See also
llvm::MemoryBuffer
sourceReactant.MLIR.API.LLVMModuleProviderRef Type
Interface used to provide a module to JIT or interpreter. This is now just a synonym for llvm::Module, but we have to keep using the different type to keep binary compatibility.
sourceReactant.MLIR.API.LLVMModuleRef Type
The top-level container for all other LLVM Intermediate Representation (IR) objects.
See also
llvm::Module
sourceReactant.MLIR.API.LLVMNamedMDNodeRef Type
Represents an LLVM Named Metadata Node.
This models llvm::NamedMDNode.
sourceReactant.MLIR.API.LLVMTypeRef Type
Each value in the LLVM IR has a type, an LLVMTypeRef
.
See also
llvm::Type
sourceReactant.MLIR.API.LLVMValueMetadataEntry Type
Represents an entry in a Global Object's metadata attachments.
This models std::pair<unsigned, MDNode *>
sourceReactant.MLIR.API.LLVMValueRef Type
Represents an individual value in LLVM IR.
This models llvm::Value.
sourceReactant.MLIR.API.MlirDiagnostic Type
MlirDiagnostic
An opaque reference to a diagnostic, always owned by the diagnostics engine (context). Must not be stored outside of the diagnostic handler.
sourceReactant.MLIR.API.MlirDiagnosticHandler Type
Diagnostic 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.
Reactant.MLIR.API.MlirDiagnosticHandlerID Type
Opaque identifier of a diagnostic handler, useful to detach a handler.
sourceReactant.MLIR.API.MlirDiagnosticSeverity Type
MlirDiagnosticSeverity
Severity of a diagnostic.
sourceReactant.MLIR.API.MlirExternalPassCallbacks Type
MlirExternalPassCallbacks
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(). |
Reactant.MLIR.API.MlirLlvmThreadPool Type
MlirLlvmThreadPool
Re-export llvm::ThreadPool so as to avoid including the LLVM C API directly.
sourceReactant.MLIR.API.MlirLogicalResult Type
MlirLogicalResult
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.
Reactant.MLIR.API.MlirNamedAttribute Type
MlirNamedAttribute
Named MLIR attribute.
A named attribute is essentially a (name, attribute) pair where the name is a string.
sourceReactant.MLIR.API.MlirOperationState Type
MlirOperationState
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.
sourceReactant.MLIR.API.MlirOperationWalkCallback Type
Operation walker type. The handler is passed an (opaque) reference to an operation and a pointer to a userData
.
Reactant.MLIR.API.MlirShapedTypeComponentsCallback Type
These callbacks are used to return multiple shaped type components from functions while transferring ownership to the caller. The first argument is the has rank boolean followed by the the rank and a pointer to the shape (if applicable). The next argument is the element type, then the attribute. The last argument is an opaque pointer forwarded to the callback by the caller. This callback will be called potentially multiple times for each shaped type components.
sourceReactant.MLIR.API.MlirSparseTensorLevelType Type
Dimension level types (and properties) that define sparse tensors. See the documentation in SparseTensorAttrDefs.td for their meaning.
These correspond to SparseTensorEncodingAttr::LevelType in the C++ API. If updating, keep them in sync and update the static_assert in the impl file.
sourceReactant.MLIR.API.MlirStringCallback Type
A 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.
Reactant.MLIR.API.MlirStringRef Type
MlirStringRef
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. |
Reactant.MLIR.API.MlirTypesCallback Type
These 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.
sourceReactant.MLIR.API.LLVMAddSymbol Method
LLVMAddSymbol(symbolName, symbolValue)
This functions permanently adds the symbol symbolName
with the value symbolValue
. These symbols are searched before any libraries.
See also
sys::DynamicLibrary::AddSymbol()
sourceReactant.MLIR.API.LLVMLoadLibraryPermanently Method
LLVMLoadLibraryPermanently(Filename)
This function permanently loads the dynamic library at the given path. It is safe to call this function multiple times for the same library.
See also
sys::DynamicLibrary::LoadLibraryPermanently()
sourceReactant.MLIR.API.LLVMParseCommandLineOptions Method
LLVMParseCommandLineOptions(argc, argv, Overview)
This function parses the given arguments using the LLVM command line parser. Note that the only stable thing about this function is its signature; you cannot rely on any particular set of command line arguments being interpreted the same way across LLVM versions.
See also
llvm:🆑:ParseCommandLineOptions()
sourceReactant.MLIR.API.LLVMSearchForAddressOfSymbol Method
LLVMSearchForAddressOfSymbol(symbolName)
This function will search through all previously loaded dynamic libraries for the symbol symbolName
. If it is found, the address of that symbol is returned. If not, null is returned.
See also
sys::DynamicLibrary::SearchForAddressOfSymbol()
sourceReactant.MLIR.API.mlirAffineAddExprGet Method
mlirAffineAddExprGet(lhs, rhs)
Creates an affine add expression with 'lhs' and 'rhs'.
sourceReactant.MLIR.API.mlirAffineBinaryOpExprGetLHS Method
mlirAffineBinaryOpExprGetLHS(affineExpr)
Returns the left hand side affine expression of the given affine binary operation expression.
sourceReactant.MLIR.API.mlirAffineBinaryOpExprGetRHS Method
mlirAffineBinaryOpExprGetRHS(affineExpr)
Returns the right hand side affine expression of the given affine binary operation expression.
sourceReactant.MLIR.API.mlirAffineCeilDivExprGet Method
mlirAffineCeilDivExprGet(lhs, rhs)
Creates an affine ceildiv expression with 'lhs' and 'rhs'.
sourceReactant.MLIR.API.mlirAffineConstantExprGet Method
mlirAffineConstantExprGet(ctx, constant)
Creates an affine constant expression with 'constant' in the context.
sourceReactant.MLIR.API.mlirAffineConstantExprGetValue Method
mlirAffineConstantExprGetValue(affineExpr)
Returns the value of the given affine constant expression.
sourceReactant.MLIR.API.mlirAffineDimExprGet Method
mlirAffineDimExprGet(ctx, position)
Creates an affine dimension expression with 'position' in the context.
sourceReactant.MLIR.API.mlirAffineDimExprGetPosition Method
mlirAffineDimExprGetPosition(affineExpr)
Returns the position of the given affine dimension expression.
sourceReactant.MLIR.API.mlirAffineExprCompose Method
mlirAffineExprCompose(affineExpr, affineMap)
Composes the given map with the given expression.
sourceReactant.MLIR.API.mlirAffineExprDump Method
mlirAffineExprDump(affineExpr)
Prints the affine expression to the standard error stream.
sourceReactant.MLIR.API.mlirAffineExprEqual Method
mlirAffineExprEqual(lhs, rhs)
Returns true
if the two affine expressions are equal.
Reactant.MLIR.API.mlirAffineExprGetContext Method
mlirAffineExprGetContext(affineExpr)
Gets the context that owns the affine expression.
sourceReactant.MLIR.API.mlirAffineExprGetLargestKnownDivisor Method
mlirAffineExprGetLargestKnownDivisor(affineExpr)
Returns the greatest known integral divisor of this affine expression. The result is always positive.
sourceReactant.MLIR.API.mlirAffineExprIsAAdd Method
mlirAffineExprIsAAdd(affineExpr)
Checks whether the given affine expression is an add expression.
sourceReactant.MLIR.API.mlirAffineExprIsABinary Method
mlirAffineExprIsABinary(affineExpr)
Checks whether the given affine expression is binary.
sourceReactant.MLIR.API.mlirAffineExprIsACeilDiv Method
mlirAffineExprIsACeilDiv(affineExpr)
Checks whether the given affine expression is an ceildiv expression.
sourceReactant.MLIR.API.mlirAffineExprIsAConstant Method
mlirAffineExprIsAConstant(affineExpr)
Checks whether the given affine expression is a constant expression.
sourceReactant.MLIR.API.mlirAffineExprIsADim Method
mlirAffineExprIsADim(affineExpr)
Checks whether the given affine expression is a dimension expression.
sourceReactant.MLIR.API.mlirAffineExprIsAFloorDiv Method
mlirAffineExprIsAFloorDiv(affineExpr)
Checks whether the given affine expression is an floordiv expression.
sourceReactant.MLIR.API.mlirAffineExprIsAMod Method
mlirAffineExprIsAMod(affineExpr)
Checks whether the given affine expression is an mod expression.
sourceReactant.MLIR.API.mlirAffineExprIsAMul Method
mlirAffineExprIsAMul(affineExpr)
Checks whether the given affine expression is an mul expression.
sourceReactant.MLIR.API.mlirAffineExprIsASymbol Method
mlirAffineExprIsASymbol(affineExpr)
Checks whether the given affine expression is a symbol expression.
sourceReactant.MLIR.API.mlirAffineExprIsFunctionOfDim Method
mlirAffineExprIsFunctionOfDim(affineExpr, position)
Checks whether the given affine expression involves AffineDimExpr 'position'.
sourceReactant.MLIR.API.mlirAffineExprIsMultipleOf Method
mlirAffineExprIsMultipleOf(affineExpr, factor)
Checks whether the given affine expression is a multiple of 'factor'.
sourceReactant.MLIR.API.mlirAffineExprIsNull Method
mlirAffineExprIsNull(affineExpr)
Returns true
if the given affine expression is a null expression. Note constant zero is not a null expression.
Reactant.MLIR.API.mlirAffineExprIsPureAffine Method
mlirAffineExprIsPureAffine(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.
sourceReactant.MLIR.API.mlirAffineExprIsSymbolicOrConstant Method
mlirAffineExprIsSymbolicOrConstant(affineExpr)
Checks whether the given affine expression is made out of only symbols and constants.
sourceReactant.MLIR.API.mlirAffineExprPrint Method
mlirAffineExprPrint(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.
Reactant.MLIR.API.mlirAffineFloorDivExprGet Method
mlirAffineFloorDivExprGet(lhs, rhs)
Creates an affine floordiv expression with 'lhs' and 'rhs'.
sourceReactant.MLIR.API.mlirAffineMapAttrGet Method
mlirAffineMapAttrGet(map)
Creates an affine map attribute wrapping the given map. The attribute belongs to the same context as the affine map.
sourceReactant.MLIR.API.mlirAffineMapAttrGetTypeID Method
mlirAffineMapAttrGetTypeID()
Returns the typeID of an AffineMap attribute.
sourceReactant.MLIR.API.mlirAffineMapAttrGetValue Method
mlirAffineMapAttrGetValue(attr)
Returns the affine map wrapped in the given affine map attribute.
sourceReactant.MLIR.API.mlirAffineMapCompressUnusedSymbols Method
mlirAffineMapCompressUnusedSymbols(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.
Reactant.MLIR.API.mlirAffineMapConstantGet Method
mlirAffineMapConstantGet(ctx, val)
Creates a single constant result affine map in the context. The affine map is owned by the context.
sourceReactant.MLIR.API.mlirAffineMapDump Method
mlirAffineMapDump(affineMap)
Prints the affine map to the standard error stream.
sourceReactant.MLIR.API.mlirAffineMapEmptyGet Method
mlirAffineMapEmptyGet(ctx)
Creates a zero result affine map with no dimensions or symbols in the context. The affine map is owned by the context.
sourceReactant.MLIR.API.mlirAffineMapEqual Method
mlirAffineMapEqual(a1, a2)
Checks if two affine maps are equal.
sourceReactant.MLIR.API.mlirAffineMapGet Method
mlirAffineMapGet(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.
sourceReactant.MLIR.API.mlirAffineMapGetContext Method
mlirAffineMapGetContext(affineMap)
Gets the context that the given affine map was created with
sourceReactant.MLIR.API.mlirAffineMapGetMajorSubMap Method
mlirAffineMapGetMajorSubMap(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.
Reactant.MLIR.API.mlirAffineMapGetMinorSubMap Method
mlirAffineMapGetMinorSubMap(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.
Reactant.MLIR.API.mlirAffineMapGetNumDims Method
mlirAffineMapGetNumDims(affineMap)
Returns the number of dimensions of the given affine map.
sourceReactant.MLIR.API.mlirAffineMapGetNumInputs Method
mlirAffineMapGetNumInputs(affineMap)
Returns the number of inputs (dimensions + symbols) of the given affine map.
sourceReactant.MLIR.API.mlirAffineMapGetNumResults Method
mlirAffineMapGetNumResults(affineMap)
Returns the number of results of the given affine map.
sourceReactant.MLIR.API.mlirAffineMapGetNumSymbols Method
mlirAffineMapGetNumSymbols(affineMap)
Returns the number of symbols of the given affine map.
sourceReactant.MLIR.API.mlirAffineMapGetResult Method
mlirAffineMapGetResult(affineMap, pos)
Returns the result at the given position.
sourceReactant.MLIR.API.mlirAffineMapGetSingleConstantResult Method
mlirAffineMapGetSingleConstantResult(affineMap)
Returns the constant result of the given affine map. The function asserts that the map has a single constant result.
sourceReactant.MLIR.API.mlirAffineMapGetSubMap Method
mlirAffineMapGetSubMap(affineMap, size, resultPos)
Returns the affine map consisting of the resultPos
subset.
Reactant.MLIR.API.mlirAffineMapIsEmpty Method
mlirAffineMapIsEmpty(affineMap)
Checks whether the given affine map is an empty affine map.
sourceReactant.MLIR.API.mlirAffineMapIsIdentity Method
mlirAffineMapIsIdentity(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.
sourceReactant.MLIR.API.mlirAffineMapIsMinorIdentity Method
mlirAffineMapIsMinorIdentity(affineMap)
Checks whether the given affine map is a minor identity affine map.
sourceReactant.MLIR.API.mlirAffineMapIsNull Method
mlirAffineMapIsNull(affineMap)
Checks whether an affine map is null.
sourceReactant.MLIR.API.mlirAffineMapIsPermutation Method
mlirAffineMapIsPermutation(affineMap)
Checks whether the given affine map represents a symbol-less permutation map.
sourceReactant.MLIR.API.mlirAffineMapIsProjectedPermutation Method
mlirAffineMapIsProjectedPermutation(affineMap)
Checks whether the given affine map represents a subset of a symbol-less permutation map.
sourceReactant.MLIR.API.mlirAffineMapIsSingleConstant Method
mlirAffineMapIsSingleConstant(affineMap)
Checks whether the given affine map is a single result constant affine map.
sourceReactant.MLIR.API.mlirAffineMapMinorIdentityGet Method
mlirAffineMapMinorIdentityGet(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.
sourceReactant.MLIR.API.mlirAffineMapMultiDimIdentityGet Method
mlirAffineMapMultiDimIdentityGet(ctx, numDims)
Creates an affine map with 'numDims' identity in the context. The affine map is owned by the context.
sourceReactant.MLIR.API.mlirAffineMapPermutationGet Method
mlirAffineMapPermutationGet(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 permutation.) The affine map is owned by the context.
Reactant.MLIR.API.mlirAffineMapPrint Method
mlirAffineMapPrint(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.
Reactant.MLIR.API.mlirAffineMapReplace Method
mlirAffineMapReplace(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.
Reactant.MLIR.API.mlirAffineMapZeroResultGet Method
mlirAffineMapZeroResultGet(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.
sourceReactant.MLIR.API.mlirAffineModExprGet Method
mlirAffineModExprGet(lhs, rhs)
Creates an affine mod expression with 'lhs' and 'rhs'.
sourceReactant.MLIR.API.mlirAffineMulExprGet Method
mlirAffineMulExprGet(lhs, rhs)
Creates an affine mul expression with 'lhs' and 'rhs'.
sourceReactant.MLIR.API.mlirAffineSymbolExprGet Method
mlirAffineSymbolExprGet(ctx, position)
Creates an affine symbol expression with 'position' in the context.
sourceReactant.MLIR.API.mlirAffineSymbolExprGetPosition Method
mlirAffineSymbolExprGetPosition(affineExpr)
Returns the position of the given affine symbol expression.
sourceReactant.MLIR.API.mlirAnyQuantizedTypeGet Method
mlirAnyQuantizedTypeGet(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.
Reactant.MLIR.API.mlirArrayAttrGet Method
mlirArrayAttrGet(ctx, numElements, elements)
Creates an array element containing the given list of elements in the given context.
sourceReactant.MLIR.API.mlirArrayAttrGetElement Method
mlirArrayAttrGetElement(attr, pos)
Returns pos-th element stored in the given array attribute.
sourceReactant.MLIR.API.mlirArrayAttrGetNumElements Method
mlirArrayAttrGetNumElements(attr)
Returns the number of elements stored in the given array attribute.
sourceReactant.MLIR.API.mlirArrayAttrGetTypeID Method
mlirArrayAttrGetTypeID()
Returns the typeID of an Array attribute.
sourceReactant.MLIR.API.mlirAsmStateCreateForOperation Method
mlirAsmStateCreateForOperation(op, flags)
Creates new AsmState, as with AsmState the IR should not be mutated in-between using this state. Must be freed with a call to mlirAsmStateDestroy
().
Reactant.MLIR.API.mlirAsmStateCreateForValue Method
mlirAsmStateCreateForValue(value, flags)
Creates new AsmState from value. Must be freed with a call to mlirAsmStateDestroy
().
Reactant.MLIR.API.mlirAsmStateDestroy Method
mlirAsmStateDestroy(state)
Destroys printing flags created with mlirAsmStateCreate.
sourceReactant.MLIR.API.mlirAttributeDump Method
mlirAttributeDump(attr)
Prints the attribute to the standard error stream.
sourceReactant.MLIR.API.mlirAttributeEqual Method
mlirAttributeEqual(a1, a2)
Checks if two attributes are equal.
sourceReactant.MLIR.API.mlirAttributeGetContext Method
mlirAttributeGetContext(attribute)
Gets the context that an attribute was created with.
sourceReactant.MLIR.API.mlirAttributeGetDialect Method
mlirAttributeGetDialect(attribute)
Gets the dialect of the attribute.
sourceReactant.MLIR.API.mlirAttributeGetNull Method
mlirAttributeGetNull()
Returns an empty attribute.
sourceReactant.MLIR.API.mlirAttributeGetType Method
mlirAttributeGetType(attribute)
Gets the type of this attribute.
sourceReactant.MLIR.API.mlirAttributeGetTypeID Method
mlirAttributeGetTypeID(attribute)
Gets the type id of the attribute.
sourceReactant.MLIR.API.mlirAttributeIsAAffineMap Method
mlirAttributeIsAAffineMap(attr)
Checks whether the given attribute is an affine map attribute.
sourceReactant.MLIR.API.mlirAttributeIsAArray Method
mlirAttributeIsAArray(attr)
Checks whether the given attribute is an array attribute.
sourceReactant.MLIR.API.mlirAttributeIsABool Method
mlirAttributeIsABool(attr)
Checks whether the given attribute is a bool attribute.
sourceReactant.MLIR.API.mlirAttributeIsADenseBoolArray Method
mlirAttributeIsADenseBoolArray(attr)
Checks whether the given attribute is a dense array attribute.
sourceReactant.MLIR.API.mlirAttributeIsADenseElements Method
mlirAttributeIsADenseElements(attr)
Checks whether the given attribute is a dense elements attribute.
sourceReactant.MLIR.API.mlirAttributeIsADictionary Method
mlirAttributeIsADictionary(attr)
Checks whether the given attribute is a dictionary attribute.
sourceReactant.MLIR.API.mlirAttributeIsAElements Method
mlirAttributeIsAElements(attr)
Checks whether the given attribute is an elements attribute.
sourceReactant.MLIR.API.mlirAttributeIsAFlatSymbolRef Method
mlirAttributeIsAFlatSymbolRef(attr)
Checks whether the given attribute is a flat symbol reference attribute.
sourceReactant.MLIR.API.mlirAttributeIsAFloat Method
mlirAttributeIsAFloat(attr)
Checks whether the given attribute is a floating point attribute.
sourceReactant.MLIR.API.mlirAttributeIsAInteger Method
mlirAttributeIsAInteger(attr)
Checks whether the given attribute is an integer attribute.
sourceReactant.MLIR.API.mlirAttributeIsAIntegerSet Method
mlirAttributeIsAIntegerSet(attr)
Checks whether the given attribute is an integer set attribute.
sourceReactant.MLIR.API.mlirAttributeIsAOpaque Method
mlirAttributeIsAOpaque(attr)
Checks whether the given attribute is an opaque attribute.
sourceReactant.MLIR.API.mlirAttributeIsASparseElements Method
mlirAttributeIsASparseElements(attr)
Checks whether the given attribute is a sparse elements attribute.
sourceReactant.MLIR.API.mlirAttributeIsASparseTensorEncodingAttr Method
mlirAttributeIsASparseTensorEncodingAttr(attr)
Checks whether the given attribute is a sparse\_tensor.encoding
attribute.
Reactant.MLIR.API.mlirAttributeIsAString Method
mlirAttributeIsAString(attr)
Checks whether the given attribute is a string attribute.
sourceReactant.MLIR.API.mlirAttributeIsASymbolRef Method
mlirAttributeIsASymbolRef(attr)
Checks whether the given attribute is a symbol reference attribute.
sourceReactant.MLIR.API.mlirAttributeIsAType Method
mlirAttributeIsAType(attr)
Checks whether the given attribute is a type attribute.
sourceReactant.MLIR.API.mlirAttributeIsAUnit Method
mlirAttributeIsAUnit(attr)
Checks whether the given attribute is a unit attribute.
sourceReactant.MLIR.API.mlirAttributeIsNull Method
mlirAttributeIsNull(attr)
Checks whether an attribute is null.
sourceReactant.MLIR.API.mlirAttributeParseGet Method
mlirAttributeParseGet(context, attr)
Parses an attribute. The attribute is owned by the context.
sourceReactant.MLIR.API.mlirAttributePrint Method
mlirAttributePrint(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.
Reactant.MLIR.API.mlirBF16TypeGet Method
mlirBF16TypeGet(ctx)
Creates a bf16 type in the given context. The type is owned by the context.
sourceReactant.MLIR.API.mlirBFloat16TypeGetTypeID Method
mlirBFloat16TypeGetTypeID()
Returns the typeID of an BFloat16 type.
sourceReactant.MLIR.API.mlirBlockAddArgument Method
mlirBlockAddArgument(block, type, loc)
Appends an argument of the specified type to the block. Returns the newly added argument.
sourceReactant.MLIR.API.mlirBlockAppendOwnedOperation Method
mlirBlockAppendOwnedOperation(block, operation)
Takes an operation owned by the caller and appends it to the block.
sourceReactant.MLIR.API.mlirBlockArgumentGetArgNumber Method
mlirBlockArgumentGetArgNumber(value)
Returns the position of the value in the argument list of its block.
sourceReactant.MLIR.API.mlirBlockArgumentGetOwner Method
mlirBlockArgumentGetOwner(value)
Returns the block in which this value is defined as an argument. Asserts if the value is not a block argument.
sourceReactant.MLIR.API.mlirBlockArgumentSetType Method
mlirBlockArgumentSetType(value, type)
Sets the type of the block argument to the given type.
sourceReactant.MLIR.API.mlirBlockCreate Method
mlirBlockCreate(nArgs, args, locs)
Creates a new empty block with the given argument types and transfers ownership to the caller.
sourceReactant.MLIR.API.mlirBlockDestroy Method
mlirBlockDestroy(block)
Takes a block owned by the caller and destroys it.
sourceReactant.MLIR.API.mlirBlockDetach Method
mlirBlockDetach(block)
Detach a block from the owning region and assume ownership.
sourceReactant.MLIR.API.mlirBlockEqual Method
mlirBlockEqual(block, other)
Checks whether two blocks handles point to the same block. This does not perform deep comparison.
sourceReactant.MLIR.API.mlirBlockEraseArgument Method
mlirBlockEraseArgument(block, index)
Erase the argument at 'index' and remove it from the argument list.
sourceReactant.MLIR.API.mlirBlockGetArgument Method
mlirBlockGetArgument(block, pos)
Returns pos
-th argument of the block.
Reactant.MLIR.API.mlirBlockGetFirstOperation Method
mlirBlockGetFirstOperation(block)
Returns the first operation in the block.
sourceReactant.MLIR.API.mlirBlockGetNextInRegion Method
mlirBlockGetNextInRegion(block)
Returns the block immediately following the given block in its parent region.
sourceReactant.MLIR.API.mlirBlockGetNumArguments Method
mlirBlockGetNumArguments(block)
Returns the number of arguments of the block.
sourceReactant.MLIR.API.mlirBlockGetParentOperation Method
mlirBlockGetParentOperation(arg1)
Returns the closest surrounding operation that contains this block.
sourceReactant.MLIR.API.mlirBlockGetParentRegion Method
mlirBlockGetParentRegion(block)
Returns the region that contains this block.
sourceReactant.MLIR.API.mlirBlockGetTerminator Method
mlirBlockGetTerminator(block)
Returns the terminator operation in the block or null if no terminator.
sourceReactant.MLIR.API.mlirBlockInsertArgument Method
mlirBlockInsertArgument(block, pos, type, loc)
Inserts an argument of the specified type at a specified index to the block. Returns the newly added argument.
sourceReactant.MLIR.API.mlirBlockInsertOwnedOperation Method
mlirBlockInsertOwnedOperation(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.
Reactant.MLIR.API.mlirBlockInsertOwnedOperationAfter Method
mlirBlockInsertOwnedOperationAfter(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.
sourceReactant.MLIR.API.mlirBlockInsertOwnedOperationBefore Method
mlirBlockInsertOwnedOperationBefore(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.
sourceReactant.MLIR.API.mlirBlockIsNull Method
mlirBlockIsNull(block)
Checks whether a block is null.
sourceReactant.MLIR.API.mlirBlockPrint Method
mlirBlockPrint(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.
Reactant.MLIR.API.mlirBoolAttrGet Method
mlirBoolAttrGet(ctx, value)
Creates a bool attribute in the given context with the given value.
sourceReactant.MLIR.API.mlirBoolAttrGetValue Method
mlirBoolAttrGetValue(attr)
Returns the value stored in the given bool attribute.
sourceReactant.MLIR.API.mlirBytecodeWriterConfigCreate Method
mlirBytecodeWriterConfigCreate()
Creates new printing flags with defaults, intended for customization. Must be freed with a call to mlirBytecodeWriterConfigDestroy
().
Reactant.MLIR.API.mlirBytecodeWriterConfigDesiredEmitVersion Method
mlirBytecodeWriterConfigDesiredEmitVersion(flags, version)
Sets the version to emit in the writer config.
sourceReactant.MLIR.API.mlirBytecodeWriterConfigDestroy Method
mlirBytecodeWriterConfigDestroy(config)
Destroys printing flags created with mlirBytecodeWriterConfigCreate
.
Reactant.MLIR.API.mlirCalibratedQuantizedTypeGet Method
mlirCalibratedQuantizedTypeGet(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.
Reactant.MLIR.API.mlirCalibratedQuantizedTypeGetMax Method
mlirCalibratedQuantizedTypeGetMax(type)
Returns the max value of the given calibrated quantized type.
sourceReactant.MLIR.API.mlirCalibratedQuantizedTypeGetMin Method
mlirCalibratedQuantizedTypeGetMin(type)
Returns the min value of the given calibrated quantized type.
sourceReactant.MLIR.API.mlirComplexTypeGet Method
mlirComplexTypeGet(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.
sourceReactant.MLIR.API.mlirComplexTypeGetElementType Method
mlirComplexTypeGetElementType(type)
Returns the element type of the given complex type.
sourceReactant.MLIR.API.mlirComplexTypeGetTypeID Method
mlirComplexTypeGetTypeID()
Returns the typeID of an Complex type.
sourceReactant.MLIR.API.mlirContextAppendDialectRegistry Method
mlirContextAppendDialectRegistry(ctx, registry)
Append the contents of the given dialect registry to the registry associated with the context.
sourceReactant.MLIR.API.mlirContextAttachDiagnosticHandler Method
mlirContextAttachDiagnosticHandler(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.
Reactant.MLIR.API.mlirContextCreate Method
mlirContextCreate()
Creates an MLIR context and transfers its ownership to the caller. This sets the default multithreading option (enabled).
sourceReactant.MLIR.API.mlirContextCreateWithRegistry Method
mlirContextCreateWithRegistry(registry, threadingEnabled)
Creates an MLIR context, setting the multithreading setting explicitly and pre-loading the dialects from the provided DialectRegistry.
sourceReactant.MLIR.API.mlirContextCreateWithThreading Method
mlirContextCreateWithThreading(threadingEnabled)
Creates an MLIR context with an explicit setting of the multithreading setting and transfers its ownership to the caller.
sourceReactant.MLIR.API.mlirContextDestroy Method
mlirContextDestroy(context)
Takes an MLIR context owned by the caller and destroys it.
sourceReactant.MLIR.API.mlirContextDetachDiagnosticHandler Method
mlirContextDetachDiagnosticHandler(context, id)
Detaches an attached diagnostic handler from the context given its identifier.
sourceReactant.MLIR.API.mlirContextEnableMultithreading Method
mlirContextEnableMultithreading(context, enable)
Set threading mode (must be set to false to mlir-print-ir-after-all).
sourceReactant.MLIR.API.mlirContextEqual Method
mlirContextEqual(ctx1, ctx2)
Checks if two contexts are equal.
sourceReactant.MLIR.API.mlirContextGetAllowUnregisteredDialects Method
mlirContextGetAllowUnregisteredDialects(context)
Returns whether the context allows unregistered dialects.
sourceReactant.MLIR.API.mlirContextGetNumLoadedDialects Method
mlirContextGetNumLoadedDialects(context)
Returns the number of dialects loaded by the context.
sourceReactant.MLIR.API.mlirContextGetNumRegisteredDialects Method
mlirContextGetNumRegisteredDialects(context)
Returns the number of dialects registered with the given context. A registered dialect will be loaded if needed by the parser.
sourceReactant.MLIR.API.mlirContextGetOrLoadDialect Method
mlirContextGetOrLoadDialect(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.
sourceReactant.MLIR.API.mlirContextIsNull Method
mlirContextIsNull(context)
Checks whether a context is null.
sourceReactant.MLIR.API.mlirContextIsRegisteredOperation Method
mlirContextIsRegisteredOperation(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.
sourceReactant.MLIR.API.mlirContextLoadAllAvailableDialects Method
mlirContextLoadAllAvailableDialects(context)
Eagerly loads all available dialects registered with a context, making them available for use for IR construction.
sourceReactant.MLIR.API.mlirContextSetAllowUnregisteredDialects Method
mlirContextSetAllowUnregisteredDialects(context, allow)
Sets whether unregistered dialects are allowed in this context.
sourceReactant.MLIR.API.mlirContextSetThreadPool Method
mlirContextSetThreadPool(context, threadPool)
Sets the thread pool of the context explicitly, enabling multithreading in the process. This API should be used to avoid re-creating thread pools in long-running applications that perform multiple compilations, see the C++ documentation for MLIRContext for details.
sourceReactant.MLIR.API.mlirCreateExternalPass Method
mlirCreateExternalPass(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.
Reactant.MLIR.API.mlirDenseArrayGetNumElements Method
mlirDenseArrayGetNumElements(attr)
Get the size of a dense array.
sourceReactant.MLIR.API.mlirDenseBoolArrayGet Method
mlirDenseBoolArrayGet(ctx, size, values)
Create a dense array attribute with the given elements.
sourceReactant.MLIR.API.mlirDenseBoolArrayGetElement Method
mlirDenseBoolArrayGetElement(attr, pos)
Get an element of a dense array.
sourceReactant.MLIR.API.mlirDenseBoolResourceElementsAttrGetValue Method
mlirDenseBoolResourceElementsAttrGetValue(attr, pos)
Returns the pos-th value (flat contiguous indexing) of a specific type contained by the given dense resource elements attribute.
sourceReactant.MLIR.API.mlirDenseElementsAttrBoolGet Method
mlirDenseElementsAttrBoolGet(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.
sourceReactant.MLIR.API.mlirDenseElementsAttrGet Method
mlirDenseElementsAttrGet(shapedType, numElements, elements)
Creates a dense elements attribute with the given Shaped type and elements in the same context as the type.
sourceReactant.MLIR.API.mlirDenseElementsAttrGetBoolValue Method
mlirDenseElementsAttrGetBoolValue(attr, pos)
Returns the pos-th value (flat contiguous indexing) of a specific type contained by the given dense elements attribute.
sourceReactant.MLIR.API.mlirDenseElementsAttrGetRawData Method
mlirDenseElementsAttrGetRawData(attr)
Returns the raw data of the given dense elements attribute.
sourceReactant.MLIR.API.mlirDenseElementsAttrGetSplatValue Method
mlirDenseElementsAttrGetSplatValue(attr)
Returns the single replicated value (splat) of a specific type contained by the given dense elements attribute.
sourceReactant.MLIR.API.mlirDenseElementsAttrIsSplat Method
mlirDenseElementsAttrIsSplat(attr)
Checks whether the given dense elements attribute contains a single replicated value (splat).
sourceReactant.MLIR.API.mlirDenseElementsAttrRawBufferGet Method
mlirDenseElementsAttrRawBufferGet(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.
sourceReactant.MLIR.API.mlirDenseElementsAttrReshapeGet Method
mlirDenseElementsAttrReshapeGet(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.
sourceReactant.MLIR.API.mlirDenseElementsAttrSplatGet Method
mlirDenseElementsAttrSplatGet(shapedType, element)
Creates a dense elements attribute with the given Shaped type containing a single replicated element (splat).
sourceReactant.MLIR.API.mlirDenseElementsAttrStringGet Method
mlirDenseElementsAttrStringGet(shapedType, numElements, strs)
Creates a dense elements attribute with the given shaped type from string elements.
sourceReactant.MLIR.API.mlirDenseIntOrFPElementsAttrGetTypeID Method
mlirDenseIntOrFPElementsAttrGetTypeID()
Returns the typeID of an DenseIntOrFPElements attribute.
sourceReactant.MLIR.API.mlirDiagnosticGetLocation Method
mlirDiagnosticGetLocation(diagnostic)
Returns the location at which the diagnostic is reported.
sourceReactant.MLIR.API.mlirDiagnosticGetNote Method
mlirDiagnosticGetNote(diagnostic, pos)
Returns pos
-th note attached to the diagnostic. Expects pos
to be a valid zero-based index into the list of notes.
Reactant.MLIR.API.mlirDiagnosticGetNumNotes Method
mlirDiagnosticGetNumNotes(diagnostic)
Returns the number of notes attached to the diagnostic.
sourceReactant.MLIR.API.mlirDiagnosticGetSeverity Method
mlirDiagnosticGetSeverity(diagnostic)
Returns the severity of the diagnostic.
sourceReactant.MLIR.API.mlirDiagnosticPrint Method
mlirDiagnosticPrint(diagnostic, callback, userData)
Prints a diagnostic using the provided callback.
sourceReactant.MLIR.API.mlirDialectEqual Method
mlirDialectEqual(dialect1, dialect2)
Checks if two dialects that belong to the same context are equal. Dialects from different contexts will not compare equal.
sourceReactant.MLIR.API.mlirDialectGetContext Method
mlirDialectGetContext(dialect)
Returns the context that owns the dialect.
sourceReactant.MLIR.API.mlirDialectGetNamespace Method
mlirDialectGetNamespace(dialect)
Returns the namespace of the given dialect.
sourceReactant.MLIR.API.mlirDialectHandleGetNamespace Method
mlirDialectHandleGetNamespace(arg1)
Returns the namespace associated with the provided dialect handle.
sourceReactant.MLIR.API.mlirDialectHandleInsertDialect Method
mlirDialectHandleInsertDialect(arg1, arg2)
Inserts the dialect associated with the provided dialect handle into the provided dialect registry
sourceReactant.MLIR.API.mlirDialectHandleLoadDialect Method
mlirDialectHandleLoadDialect(arg1, arg2)
Loads the dialect associated with the provided dialect handle.
sourceReactant.MLIR.API.mlirDialectHandleRegisterDialect Method
mlirDialectHandleRegisterDialect(arg1, arg2)
Registers the dialect associated with the provided dialect handle.
sourceReactant.MLIR.API.mlirDialectIsNull Method
mlirDialectIsNull(dialect)
Checks if the dialect is null.
sourceReactant.MLIR.API.mlirDialectRegistryCreate Method
mlirDialectRegistryCreate()
Creates a dialect registry and transfers its ownership to the caller.
sourceReactant.MLIR.API.mlirDialectRegistryDestroy Method
mlirDialectRegistryDestroy(registry)
Takes a dialect registry owned by the caller and destroys it.
sourceReactant.MLIR.API.mlirDialectRegistryIsNull Method
mlirDialectRegistryIsNull(registry)
Checks if the dialect registry is null.
sourceReactant.MLIR.API.mlirDictionaryAttrGet Method
mlirDictionaryAttrGet(ctx, numElements, elements)
Creates a dictionary attribute containing the given list of elements in the provided context.
sourceReactant.MLIR.API.mlirDictionaryAttrGetElement Method
mlirDictionaryAttrGetElement(attr, pos)
Returns pos-th element of the given dictionary attribute.
sourceReactant.MLIR.API.mlirDictionaryAttrGetElementByName Method
mlirDictionaryAttrGetElementByName(attr, name)
Returns the dictionary attribute element with the given name or NULL if the given name does not exist in the dictionary.
sourceReactant.MLIR.API.mlirDictionaryAttrGetNumElements Method
mlirDictionaryAttrGetNumElements(attr)
Returns the number of attributes contained in a dictionary attribute.
sourceReactant.MLIR.API.mlirDictionaryAttrGetTypeID Method
mlirDictionaryAttrGetTypeID()
Returns the typeID of a Dictionary attribute.
sourceReactant.MLIR.API.mlirDisctinctAttrCreate Method
mlirDisctinctAttrCreate(referencedAttr)
Creates a DisctinctAttr with the referenced attribute.
sourceReactant.MLIR.API.mlirElementsAttrGetNumElements Method
mlirElementsAttrGetNumElements(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.
sourceReactant.MLIR.API.mlirElementsAttrGetValue Method
mlirElementsAttrGetValue(attr, rank, idxs)
Returns the element at the given rank-dimensional index.
sourceReactant.MLIR.API.mlirElementsAttrIsValidIndex Method
mlirElementsAttrIsValidIndex(attr, rank, idxs)
Checks whether the given rank-dimensional index is valid in the given elements attribute.
sourceReactant.MLIR.API.mlirEmitError Method
mlirEmitError(location, message)
Emits an error at the given location through the diagnostics engine. Used for testing purposes.
sourceReactant.MLIR.API.mlirEnableGlobalDebug Method
mlirEnableGlobalDebug(enable)
Sets the global debugging flag.
sourceReactant.MLIR.API.mlirExecutionEngineCreate Method
mlirExecutionEngineCreate(op, optLevel, numPaths, sharedLibPaths, enableObjectDump)
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.
Reactant.MLIR.API.mlirExecutionEngineDestroy Method
mlirExecutionEngineDestroy(jit)
Destroy an ExecutionEngine instance.
sourceReactant.MLIR.API.mlirExecutionEngineDumpToObjectFile Method
mlirExecutionEngineDumpToObjectFile(jit, fileName)
Dump as an object in fileName
.
Reactant.MLIR.API.mlirExecutionEngineInvokePacked Method
mlirExecutionEngineInvokePacked(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).
Reactant.MLIR.API.mlirExecutionEngineIsNull Method
mlirExecutionEngineIsNull(jit)
Checks whether an execution engine is null.
sourceReactant.MLIR.API.mlirExecutionEngineLookup Method
mlirExecutionEngineLookup(jit, name)
Lookup a native function in the execution engine by name, returns nullptr if the name can't be looked-up.
sourceReactant.MLIR.API.mlirExecutionEngineLookupPacked Method
mlirExecutionEngineLookupPacked(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.
sourceReactant.MLIR.API.mlirExecutionEngineRegisterSymbol Method
mlirExecutionEngineRegisterSymbol(jit, name, sym)
Register a symbol with the jit: this symbol will be accessible to the jitted code.
sourceReactant.MLIR.API.mlirExternalPassSignalFailure Method
mlirExternalPassSignalFailure(pass)
This signals that the pass has failed. This is only valid to call during the run
callback of MlirExternalPassCallbacks
. See Pass::signalPassFailure().
Reactant.MLIR.API.mlirF16TypeGet Method
mlirF16TypeGet(ctx)
Creates an f16 type in the given context. The type is owned by the context.
sourceReactant.MLIR.API.mlirF32TypeGet Method
mlirF32TypeGet(ctx)
Creates an f32 type in the given context. The type is owned by the context.
sourceReactant.MLIR.API.mlirF64TypeGet Method
mlirF64TypeGet(ctx)
Creates a f64 type in the given context. The type is owned by the context.
sourceReactant.MLIR.API.mlirFlatSymbolRefAttrGet Method
mlirFlatSymbolRefAttrGet(ctx, symbol)
Creates a flat symbol reference attribute in the given context referencing a symbol identified by the given string.
sourceReactant.MLIR.API.mlirFlatSymbolRefAttrGetValue Method
mlirFlatSymbolRefAttrGetValue(attr)
Returns the referenced symbol as a string reference. The data remains live as long as the context in which the attribute lives.
sourceReactant.MLIR.API.mlirFloat16TypeGetTypeID Method
mlirFloat16TypeGetTypeID()
Returns the typeID of an Float16 type.
sourceReactant.MLIR.API.mlirFloat32TypeGetTypeID Method
mlirFloat32TypeGetTypeID()
Returns the typeID of an Float32 type.
sourceReactant.MLIR.API.mlirFloat4E2M1FNTypeGet Method
mlirFloat4E2M1FNTypeGet(ctx)
Creates an f4E2M1FN type in the given context. The type is owned by the context.
sourceReactant.MLIR.API.mlirFloat4E2M1FNTypeGetTypeID Method
mlirFloat4E2M1FNTypeGetTypeID()
Returns the typeID of an Float4E2M1FN type.
sourceReactant.MLIR.API.mlirFloat64TypeGetTypeID Method
mlirFloat64TypeGetTypeID()
Returns the typeID of an Float64 type.
sourceReactant.MLIR.API.mlirFloat6E2M3FNTypeGet Method
mlirFloat6E2M3FNTypeGet(ctx)
Creates an f6E2M3FN type in the given context. The type is owned by the context.
sourceReactant.MLIR.API.mlirFloat6E2M3FNTypeGetTypeID Method
mlirFloat6E2M3FNTypeGetTypeID()
Returns the typeID of an Float6E2M3FN type.
sourceReactant.MLIR.API.mlirFloat6E3M2FNTypeGet Method
mlirFloat6E3M2FNTypeGet(ctx)
Creates an f6E3M2FN type in the given context. The type is owned by the context.
sourceReactant.MLIR.API.mlirFloat6E3M2FNTypeGetTypeID Method
mlirFloat6E3M2FNTypeGetTypeID()
Returns the typeID of an Float6E3M2FN type.
sourceReactant.MLIR.API.mlirFloat8E3M4TypeGet Method
mlirFloat8E3M4TypeGet(ctx)
Creates an f8E3M4 type in the given context. The type is owned by the context.
sourceReactant.MLIR.API.mlirFloat8E3M4TypeGetTypeID Method
mlirFloat8E3M4TypeGetTypeID()
Returns the typeID of an Float8E3M4 type.
sourceReactant.MLIR.API.mlirFloat8E4M3B11FNUZTypeGet Method
mlirFloat8E4M3B11FNUZTypeGet(ctx)
Creates an f8E4M3B11FNUZ type in the given context. The type is owned by the context.
sourceReactant.MLIR.API.mlirFloat8E4M3B11FNUZTypeGetTypeID Method
mlirFloat8E4M3B11FNUZTypeGetTypeID()
Returns the typeID of an Float8E4M3B11FNUZ type.
sourceReactant.MLIR.API.mlirFloat8E4M3FNTypeGet Method
mlirFloat8E4M3FNTypeGet(ctx)
Creates an f8E4M3FN type in the given context. The type is owned by the context.
sourceReactant.MLIR.API.mlirFloat8E4M3FNTypeGetTypeID Method
mlirFloat8E4M3FNTypeGetTypeID()
Returns the typeID of an Float8E4M3FN type.
sourceReactant.MLIR.API.mlirFloat8E4M3FNUZTypeGet Method
mlirFloat8E4M3FNUZTypeGet(ctx)
Creates an f8E4M3FNUZ type in the given context. The type is owned by the context.
sourceReactant.MLIR.API.mlirFloat8E4M3FNUZTypeGetTypeID Method
mlirFloat8E4M3FNUZTypeGetTypeID()
Returns the typeID of an Float8E4M3FNUZ type.
sourceReactant.MLIR.API.mlirFloat8E4M3TypeGet Method
mlirFloat8E4M3TypeGet(ctx)
Creates an f8E4M3 type in the given context. The type is owned by the context.
sourceReactant.MLIR.API.mlirFloat8E4M3TypeGetTypeID Method
mlirFloat8E4M3TypeGetTypeID()
Returns the typeID of an Float8E4M3 type.
sourceReactant.MLIR.API.mlirFloat8E5M2FNUZTypeGet Method
mlirFloat8E5M2FNUZTypeGet(ctx)
Creates an f8E5M2FNUZ type in the given context. The type is owned by the context.
sourceReactant.MLIR.API.mlirFloat8E5M2FNUZTypeGetTypeID Method
mlirFloat8E5M2FNUZTypeGetTypeID()
Returns the typeID of an Float8E5M2FNUZ type.
sourceReactant.MLIR.API.mlirFloat8E5M2TypeGet Method
mlirFloat8E5M2TypeGet(ctx)
Creates an f8E5M2 type in the given context. The type is owned by the context.
sourceReactant.MLIR.API.mlirFloat8E5M2TypeGetTypeID Method
mlirFloat8E5M2TypeGetTypeID()
Returns the typeID of an Float8E5M2 type.
sourceReactant.MLIR.API.mlirFloat8E8M0FNUTypeGet Method
mlirFloat8E8M0FNUTypeGet(ctx)
Creates an f8E8M0FNU type in the given context. The type is owned by the context.
sourceReactant.MLIR.API.mlirFloat8E8M0FNUTypeGetTypeID Method
mlirFloat8E8M0FNUTypeGetTypeID()
Returns the typeID of an Float8E8M0FNU type.
sourceReactant.MLIR.API.mlirFloatAttrDoubleGet Method
mlirFloatAttrDoubleGet(ctx, type, value)
Creates a floating point attribute in the given context with the given double value and double-precision FP semantics.
sourceReactant.MLIR.API.mlirFloatAttrDoubleGetChecked Method
mlirFloatAttrDoubleGetChecked(loc, type, value)
Same as "mlirFloatAttrDoubleGet
", but if the type is not valid for a construction of a FloatAttr, returns a null MlirAttribute
.
Reactant.MLIR.API.mlirFloatAttrGetTypeID Method
mlirFloatAttrGetTypeID()
Returns the typeID of a Float attribute.
sourceReactant.MLIR.API.mlirFloatAttrGetValueDouble Method
mlirFloatAttrGetValueDouble(attr)
Returns the value stored in the given floating point attribute, interpreting the value as double.
sourceReactant.MLIR.API.mlirFloatTF32TypeGetTypeID Method
mlirFloatTF32TypeGetTypeID()
Returns the typeID of a TF32 type.
sourceReactant.MLIR.API.mlirFloatTypeGetWidth Method
mlirFloatTypeGetWidth(type)
Returns the bitwidth of a floating-point type.
sourceReactant.MLIR.API.mlirFreezeRewritePattern Method
mlirFreezeRewritePattern(op)
FrozenRewritePatternSet API
sourceReactant.MLIR.API.mlirFuncSetArgAttr Method
mlirFuncSetArgAttr(op, pos, name, attr)
Sets the argument attribute 'name' of an argument at index 'pos'. Asserts that the operation is a FuncOp.
sourceReactant.MLIR.API.mlirFunctionTypeGet Method
mlirFunctionTypeGet(ctx, numInputs, inputs, numResults, results)
Creates a function type, mapping a list of input types to result types.
sourceReactant.MLIR.API.mlirFunctionTypeGetInput Method
mlirFunctionTypeGetInput(type, pos)
Returns the pos-th input type.
sourceReactant.MLIR.API.mlirFunctionTypeGetNumInputs Method
mlirFunctionTypeGetNumInputs(type)
Returns the number of input types.
sourceReactant.MLIR.API.mlirFunctionTypeGetNumResults Method
mlirFunctionTypeGetNumResults(type)
Returns the number of result types.
sourceReactant.MLIR.API.mlirFunctionTypeGetResult Method
mlirFunctionTypeGetResult(type, pos)
Returns the pos-th result type.
sourceReactant.MLIR.API.mlirFunctionTypeGetTypeID Method
mlirFunctionTypeGetTypeID()
Returns the typeID of an Function type.
sourceReactant.MLIR.API.mlirIRRewriterCreate Method
mlirIRRewriterCreate(context)
Create an IRRewriter and transfer ownership to the caller.
sourceReactant.MLIR.API.mlirIRRewriterCreateFromOp Method
mlirIRRewriterCreateFromOp(op)
Create an IRRewriter and transfer ownership to the caller. Additionally set the insertion point before the operation.
sourceReactant.MLIR.API.mlirIRRewriterDestroy Method
mlirIRRewriterDestroy(rewriter)
Takes an IRRewriter owned by the caller and destroys it. It is the responsibility of the user to only pass an IRRewriter class.
sourceReactant.MLIR.API.mlirIdentifierEqual Method
mlirIdentifierEqual(ident, other)
Checks whether two identifiers are the same.
sourceReactant.MLIR.API.mlirIdentifierGet Method
mlirIdentifierGet(context, str)
Gets an identifier with the given string value.
sourceReactant.MLIR.API.mlirIdentifierGetContext Method
mlirIdentifierGetContext(arg1)
Returns the context associated with this identifier
sourceReactant.MLIR.API.mlirIdentifierStr Method
mlirIdentifierStr(ident)
Gets the string value of the identifier.
sourceReactant.MLIR.API.mlirIndexTypeGet Method
mlirIndexTypeGet(ctx)
Creates an index type in the given context. The type is owned by the context.
sourceReactant.MLIR.API.mlirIndexTypeGetTypeID Method
mlirIndexTypeGetTypeID()
Returns the typeID of an Index type.
sourceReactant.MLIR.API.mlirInferShapedTypeOpInterfaceInferReturnTypes Method
mlirInferShapedTypeOpInterfaceInferReturnTypes(opName, context, location, nOperands, operands, attributes, properties, nRegions, regions, callback, userData)
Infers the return shaped type components of the operation. Calls callback
with the types of inferred arguments on success. Returns failure otherwise.
Reactant.MLIR.API.mlirInferShapedTypeOpInterfaceTypeID Method
mlirInferShapedTypeOpInterfaceTypeID()
Returns the interface TypeID of the InferShapedTypeOpInterface.
sourceReactant.MLIR.API.mlirInferTypeOpInterfaceInferReturnTypes Method
mlirInferTypeOpInterfaceInferReturnTypes(opName, context, location, nOperands, operands, attributes, properties, 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.
Reactant.MLIR.API.mlirInferTypeOpInterfaceTypeID Method
mlirInferTypeOpInterfaceTypeID()
Returns the interface TypeID of the InferTypeOpInterface.
sourceReactant.MLIR.API.mlirIntegerAttrGet Method
mlirIntegerAttrGet(type, value)
Creates an integer attribute of the given type with the given integer value.
sourceReactant.MLIR.API.mlirIntegerAttrGetTypeID Method
mlirIntegerAttrGetTypeID()
Returns the typeID of an Integer attribute.
sourceReactant.MLIR.API.mlirIntegerAttrGetValueInt Method
mlirIntegerAttrGetValueInt(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.
sourceReactant.MLIR.API.mlirIntegerAttrGetValueSInt Method
mlirIntegerAttrGetValueSInt(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.
sourceReactant.MLIR.API.mlirIntegerAttrGetValueUInt Method
mlirIntegerAttrGetValueUInt(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.
sourceReactant.MLIR.API.mlirIntegerSetAttrGet Method
mlirIntegerSetAttrGet(set)
Creates an integer set attribute wrapping the given set. The attribute belongs to the same context as the integer set.
sourceReactant.MLIR.API.mlirIntegerSetAttrGetTypeID Method
mlirIntegerSetAttrGetTypeID()
Returns the typeID of an IntegerSet attribute.
sourceReactant.MLIR.API.mlirIntegerSetAttrGetValue Method
mlirIntegerSetAttrGetValue(attr)
Returns the integer set wrapped in the given integer set attribute.
sourceReactant.MLIR.API.mlirIntegerSetDump Method
mlirIntegerSetDump(set)
Prints an integer set to the standard error stream.
sourceReactant.MLIR.API.mlirIntegerSetEmptyGet Method
mlirIntegerSetEmptyGet(context, numDims, numSymbols)
Gets or creates a new canonically empty integer set with the give number of dimensions and symbols in the given context.
sourceReactant.MLIR.API.mlirIntegerSetEqual Method
mlirIntegerSetEqual(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.
sourceReactant.MLIR.API.mlirIntegerSetGet Method
mlirIntegerSetGet(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.
Reactant.MLIR.API.mlirIntegerSetGetConstraint Method
mlirIntegerSetGetConstraint(set, pos)
Returns pos
-th constraint of the set.
Reactant.MLIR.API.mlirIntegerSetGetContext Method
mlirIntegerSetGetContext(set)
Gets the context in which the given integer set lives.
sourceReactant.MLIR.API.mlirIntegerSetGetNumConstraints Method
mlirIntegerSetGetNumConstraints(set)
Returns the number of constraints (equalities + inequalities) in the given set.
sourceReactant.MLIR.API.mlirIntegerSetGetNumDims Method
mlirIntegerSetGetNumDims(set)
Returns the number of dimensions in the given set.
sourceReactant.MLIR.API.mlirIntegerSetGetNumEqualities Method
mlirIntegerSetGetNumEqualities(set)
Returns the number of equalities in the given set.
sourceReactant.MLIR.API.mlirIntegerSetGetNumInequalities Method
mlirIntegerSetGetNumInequalities(set)
Returns the number of inequalities in the given set.
sourceReactant.MLIR.API.mlirIntegerSetGetNumInputs Method
mlirIntegerSetGetNumInputs(set)
Returns the number of inputs (dimensions + symbols) in the given set.
sourceReactant.MLIR.API.mlirIntegerSetGetNumSymbols Method
mlirIntegerSetGetNumSymbols(set)
Returns the number of symbols in the given set.
sourceReactant.MLIR.API.mlirIntegerSetIsCanonicalEmpty Method
mlirIntegerSetIsCanonicalEmpty(set)
Checks whether the given set is a canonical empty set, e.g., the set returned by mlirIntegerSetEmptyGet
.
Reactant.MLIR.API.mlirIntegerSetIsConstraintEq Method
mlirIntegerSetIsConstraintEq(set, pos)
Returns true
of the pos
-th constraint of the set is an equality constraint, false
otherwise.
Reactant.MLIR.API.mlirIntegerSetIsNull Method
mlirIntegerSetIsNull(set)
Checks whether an integer set is a null object.
sourceReactant.MLIR.API.mlirIntegerSetPrint Method
mlirIntegerSetPrint(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.
Reactant.MLIR.API.mlirIntegerSetReplaceGet Method
mlirIntegerSetReplaceGet(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.
Reactant.MLIR.API.mlirIntegerTypeGet Method
mlirIntegerTypeGet(ctx, bitwidth)
Creates a signless integer type of the given bitwidth in the context. The type is owned by the context.
sourceReactant.MLIR.API.mlirIntegerTypeGetTypeID Method
mlirIntegerTypeGetTypeID()
Returns the typeID of an Integer type.
sourceReactant.MLIR.API.mlirIntegerTypeGetWidth Method
mlirIntegerTypeGetWidth(type)
Returns the bitwidth of an integer type.
sourceReactant.MLIR.API.mlirIntegerTypeIsSigned Method
mlirIntegerTypeIsSigned(type)
Checks whether the given integer type is signed.
sourceReactant.MLIR.API.mlirIntegerTypeIsSignless Method
mlirIntegerTypeIsSignless(type)
Checks whether the given integer type is signless.
sourceReactant.MLIR.API.mlirIntegerTypeIsUnsigned Method
mlirIntegerTypeIsUnsigned(type)
Checks whether the given integer type is unsigned.
sourceReactant.MLIR.API.mlirIntegerTypeSignedGet Method
mlirIntegerTypeSignedGet(ctx, bitwidth)
Creates a signed integer type of the given bitwidth in the context. The type is owned by the context.
sourceReactant.MLIR.API.mlirIntegerTypeUnsignedGet Method
mlirIntegerTypeUnsignedGet(ctx, bitwidth)
Creates an unsigned integer type of the given bitwidth in the context. The type is owned by the context.
sourceReactant.MLIR.API.mlirIsCurrentDebugType Method
mlirIsCurrentDebugType(type)
Checks if type
is set as the current debug type.
Reactant.MLIR.API.mlirIsGlobalDebugEnabled Method
mlirIsGlobalDebugEnabled()
Retuns true
if the global debugging flag is set, false otherwise.
Reactant.MLIR.API.mlirLLVMArrayTypeGet Method
mlirLLVMArrayTypeGet(elementType, numElements)
Creates an llvm.array type.
sourceReactant.MLIR.API.mlirLLVMArrayTypeGetElementType Method
mlirLLVMArrayTypeGetElementType(type)
Returns the element type of the llvm.array type.
sourceReactant.MLIR.API.mlirLLVMCConvAttrGet Method
mlirLLVMCConvAttrGet(ctx, cconv)
Creates a LLVM CConv attribute.
sourceReactant.MLIR.API.mlirLLVMComdatAttrGet Method
mlirLLVMComdatAttrGet(ctx, comdat)
Creates a LLVM Comdat attribute.
sourceReactant.MLIR.API.mlirLLVMDIAnnotationAttrGet Method
mlirLLVMDIAnnotationAttrGet(ctx, name, value)
Creates a LLVM DIAnnotation attribute.
sourceReactant.MLIR.API.mlirLLVMDIBasicTypeAttrGet Method
mlirLLVMDIBasicTypeAttrGet(ctx, tag, name, sizeInBits, encoding)
Creates a LLVM DIBasicType attribute.
sourceReactant.MLIR.API.mlirLLVMDICompileUnitAttrGet Method
mlirLLVMDICompileUnitAttrGet(ctx, id, sourceLanguage, file, producer, isOptimized, emissionKind, nameTableKind)
Creates a LLVM DICompileUnit attribute.
sourceReactant.MLIR.API.mlirLLVMDICompositeTypeAttrGet Method
mlirLLVMDICompositeTypeAttrGet(ctx, recId, isRecSelf, tag, name, file, line, scope, baseType, flags, sizeInBits, alignInBits, nElements, elements, dataLocation, rank, allocated, associated)
Creates a LLVM DICompositeType attribute.
sourceReactant.MLIR.API.mlirLLVMDICompositeTypeAttrGetRecSelf Method
mlirLLVMDICompositeTypeAttrGetRecSelf(recId)
Creates a self-referencing LLVM DICompositeType attribute.
sourceReactant.MLIR.API.mlirLLVMDIDerivedTypeAttrGet Method
mlirLLVMDIDerivedTypeAttrGet(ctx, tag, name, baseType, sizeInBits, alignInBits, offsetInBits, dwarfAddressSpace, extraData)
Creates a LLVM DIDerivedType attribute. Note that dwarfAddressSpace
is an optional field, where MLIR_CAPI_DWARF_ADDRESS_SPACE_NULL
indicates null and non-negative values indicate a value present.
Reactant.MLIR.API.mlirLLVMDIDerivedTypeAttrGetBaseType Method
mlirLLVMDIDerivedTypeAttrGetBaseType(diDerivedType)
Gets the base type from a LLVM DIDerivedType attribute.
sourceReactant.MLIR.API.mlirLLVMDIExpressionAttrGet Method
mlirLLVMDIExpressionAttrGet(ctx, nOperations, operations)
Creates a LLVM DIExpression attribute.
sourceReactant.MLIR.API.mlirLLVMDIExpressionElemAttrGet Method
mlirLLVMDIExpressionElemAttrGet(ctx, opcode, nArguments, arguments)
Creates a LLVM DIExpressionElem attribute.
sourceReactant.MLIR.API.mlirLLVMDIFileAttrGet Method
mlirLLVMDIFileAttrGet(ctx, name, directory)
Creates a LLVM DIFileAttr attribute.
sourceReactant.MLIR.API.mlirLLVMDIFlagsAttrGet Method
mlirLLVMDIFlagsAttrGet(ctx, value)
Creates a LLVM DIFlags attribute.
sourceReactant.MLIR.API.mlirLLVMDIImportedEntityAttrGet Method
mlirLLVMDIImportedEntityAttrGet(ctx, tag, scope, entity, file, line, name, nElements, elements)
Creates a LLVM DIImportedEntityAttr attribute.
sourceReactant.MLIR.API.mlirLLVMDILexicalBlockAttrGet Method
mlirLLVMDILexicalBlockAttrGet(ctx, scope, file, line, column)
Creates a LLVM DILexicalBlock attribute.
sourceReactant.MLIR.API.mlirLLVMDILexicalBlockFileAttrGet Method
mlirLLVMDILexicalBlockFileAttrGet(ctx, scope, file, discriminator)
Creates a LLVM DILexicalBlockFile attribute.
sourceReactant.MLIR.API.mlirLLVMDILocalVariableAttrGet Method
mlirLLVMDILocalVariableAttrGet(ctx, scope, name, diFile, line, arg, alignInBits, diType, flags)
Creates a LLVM DILocalVariableAttr attribute.
sourceReactant.MLIR.API.mlirLLVMDIModuleAttrGet Method
mlirLLVMDIModuleAttrGet(ctx, file, scope, name, configMacros, includePath, apinotes, line, isDecl)
Creates a LLVM DIModuleAttr attribute.
sourceReactant.MLIR.API.mlirLLVMDIModuleAttrGetScope Method
mlirLLVMDIModuleAttrGetScope(diModule)
Gets the scope of this DIModuleAttr.
sourceReactant.MLIR.API.mlirLLVMDINullTypeAttrGet Method
mlirLLVMDINullTypeAttrGet(ctx)
Creates a LLVM DINullType attribute.
sourceReactant.MLIR.API.mlirLLVMDISubprogramAttrGet Method
mlirLLVMDISubprogramAttrGet(ctx, recId, isRecSelf, id, compileUnit, scope, name, linkageName, file, line, scopeLine, subprogramFlags, type, nRetainedNodes, retainedNodes, nAnnotations, annotations)
Creates a LLVM DISubprogramAttr attribute.
sourceReactant.MLIR.API.mlirLLVMDISubprogramAttrGetCompileUnit Method
mlirLLVMDISubprogramAttrGetCompileUnit(diSubprogram)
Gets the compile unit from this DISubprogram.
sourceReactant.MLIR.API.mlirLLVMDISubprogramAttrGetFile Method
mlirLLVMDISubprogramAttrGetFile(diSubprogram)
Gets the file from this DISubprogramAttr.
sourceReactant.MLIR.API.mlirLLVMDISubprogramAttrGetLine Method
mlirLLVMDISubprogramAttrGetLine(diSubprogram)
Gets the line from this DISubprogramAttr.
sourceReactant.MLIR.API.mlirLLVMDISubprogramAttrGetRecSelf Method
mlirLLVMDISubprogramAttrGetRecSelf(recId)
Creates a self-referencing LLVM DISubprogramAttr attribute.
sourceReactant.MLIR.API.mlirLLVMDISubprogramAttrGetScope Method
mlirLLVMDISubprogramAttrGetScope(diSubprogram)
Gets the scope from this DISubprogramAttr.
sourceReactant.MLIR.API.mlirLLVMDISubprogramAttrGetScopeLine Method
mlirLLVMDISubprogramAttrGetScopeLine(diSubprogram)
Gets the scope line from this DISubprogram.
sourceReactant.MLIR.API.mlirLLVMDISubprogramAttrGetType Method
mlirLLVMDISubprogramAttrGetType(diSubprogram)
Gets the type from this DISubprogramAttr.
sourceReactant.MLIR.API.mlirLLVMDISubroutineTypeAttrGet Method
mlirLLVMDISubroutineTypeAttrGet(ctx, callingConvention, nTypes, types)
Creates a LLVM DISubroutineTypeAttr attribute.
sourceReactant.MLIR.API.mlirLLVMFunctionTypeGet Method
mlirLLVMFunctionTypeGet(resultType, nArgumentTypes, argumentTypes, isVarArg)
Creates an llvm.func type.
sourceReactant.MLIR.API.mlirLLVMFunctionTypeGetInput Method
mlirLLVMFunctionTypeGetInput(type, pos)
Returns the pos-th input type.
sourceReactant.MLIR.API.mlirLLVMFunctionTypeGetNumInputs Method
mlirLLVMFunctionTypeGetNumInputs(type)
Returns the number of input types.
sourceReactant.MLIR.API.mlirLLVMFunctionTypeGetReturnType Method
mlirLLVMFunctionTypeGetReturnType(type)
Returns the return type of the function type.
sourceReactant.MLIR.API.mlirLLVMLinkageAttrGet Method
mlirLLVMLinkageAttrGet(ctx, linkage)
Creates a LLVM Linkage attribute.
sourceReactant.MLIR.API.mlirLLVMPointerTypeGet Method
mlirLLVMPointerTypeGet(ctx, addressSpace)
Creates an llvm.ptr type.
sourceReactant.MLIR.API.mlirLLVMPointerTypeGetAddressSpace Method
mlirLLVMPointerTypeGetAddressSpace(pointerType)
Returns address space of llvm.ptr
sourceReactant.MLIR.API.mlirLLVMStructTypeGetElementType Method
mlirLLVMStructTypeGetElementType(type, position)
Returns the positions
-th field of the struct. Asserts if the struct is opaque, not yet initialized or if the position is out of range.
Reactant.MLIR.API.mlirLLVMStructTypeGetIdentifier Method
mlirLLVMStructTypeGetIdentifier(type)
Returns the identifier of the identified struct. Asserts that the struct is identified, i.e., not literal.
sourceReactant.MLIR.API.mlirLLVMStructTypeGetNumElementTypes Method
mlirLLVMStructTypeGetNumElementTypes(type)
Returns the number of fields in the struct. Asserts if the struct is opaque or not yet initialized.
sourceReactant.MLIR.API.mlirLLVMStructTypeIdentifiedGet Method
mlirLLVMStructTypeIdentifiedGet(ctx, name)
Creates an LLVM identified struct type with no body. If a struct type with this name already exists in the context, returns that type. Use mlirLLVMStructTypeIdentifiedNewGet
to create a fresh struct type, potentially renaming it. The body should be set separatelty by calling mlirLLVMStructTypeSetBody
, if it isn't set already.
Reactant.MLIR.API.mlirLLVMStructTypeIdentifiedNewGet Method
mlirLLVMStructTypeIdentifiedNewGet(ctx, name, nFieldTypes, fieldTypes, isPacked)
Creates an LLVM identified struct type with no body and a name starting with the given prefix. If a struct with the exact name as the given prefix already exists, appends an unspecified suffix to the name so that the name is unique in context.
sourceReactant.MLIR.API.mlirLLVMStructTypeIsLiteral Method
mlirLLVMStructTypeIsLiteral(type)
Returns true
if the type is a literal (unnamed) LLVM struct type.
Reactant.MLIR.API.mlirLLVMStructTypeIsOpaque Method
mlirLLVMStructTypeIsOpaque(type)
Returns true
is the struct is explicitly opaque (will not have a body) or uninitialized (will eventually have a body).
Reactant.MLIR.API.mlirLLVMStructTypeIsPacked Method
mlirLLVMStructTypeIsPacked(type)
Returns true
if the struct is packed.
Reactant.MLIR.API.mlirLLVMStructTypeLiteralGet Method
mlirLLVMStructTypeLiteralGet(ctx, nFieldTypes, fieldTypes, isPacked)
Creates an LLVM literal (unnamed) struct type. This may assert if the fields have types not compatible with the LLVM dialect. For a graceful failure, use the checked version.
sourceReactant.MLIR.API.mlirLLVMStructTypeLiteralGetChecked Method
mlirLLVMStructTypeLiteralGetChecked(loc, nFieldTypes, fieldTypes, isPacked)
Creates an LLVM literal (unnamed) struct type if possible. Emits a diagnostic at the given location and returns null otherwise.
sourceReactant.MLIR.API.mlirLLVMStructTypeSetBody Method
mlirLLVMStructTypeSetBody(structType, nFieldTypes, fieldTypes, isPacked)
Sets the body of the identified struct if it hasn't been set yet. Returns whether the operation was successful.
sourceReactant.MLIR.API.mlirLLVMVoidTypeGet Method
mlirLLVMVoidTypeGet(ctx)
Creates an llmv.void type.
sourceReactant.MLIR.API.mlirLinalgFillBuiltinNamedOpRegion Method
mlirLinalgFillBuiltinNamedOpRegion(mlirOp)
Apply the special region builder for the builtin named Linalg op. Assert that mlirOp
is a builtin named Linalg op.
Reactant.MLIR.API.mlirLlvmThreadPoolCreate Method
mlirLlvmThreadPoolCreate()
Create an LLVM thread pool. This is reexported here to avoid directly pulling in the LLVM headers directly.
sourceReactant.MLIR.API.mlirLlvmThreadPoolDestroy Method
mlirLlvmThreadPoolDestroy(pool)
Destroy an LLVM thread pool.
sourceReactant.MLIR.API.mlirLoadIRDLDialects Method
mlirLoadIRDLDialects(_module)
Loads all IRDL dialects in the provided module, registering the dialects in the module's associated context.
sourceReactant.MLIR.API.mlirLocationCallSiteGet Method
mlirLocationCallSiteGet(callee, caller)
Creates a call site location with a callee and a caller.
sourceReactant.MLIR.API.mlirLocationEqual Method
mlirLocationEqual(l1, l2)
Checks if two locations are equal.
sourceReactant.MLIR.API.mlirLocationFileLineColGet Method
mlirLocationFileLineColGet(context, filename, line, col)
Creates an File/Line/Column location owned by the given context.
sourceReactant.MLIR.API.mlirLocationFileLineColRangeGet Method
mlirLocationFileLineColRangeGet(context, filename, start_line, start_col, end_line, end_col)
Creates an File/Line/Column range location owned by the given context.
sourceReactant.MLIR.API.mlirLocationFromAttribute Method
mlirLocationFromAttribute(attribute)
Creates a location from a location attribute.
sourceReactant.MLIR.API.mlirLocationFusedGet Method
mlirLocationFusedGet(ctx, nLocations, locations, metadata)
Creates a fused location with an array of locations and metadata.
sourceReactant.MLIR.API.mlirLocationGetAttribute Method
mlirLocationGetAttribute(location)
Returns the underlying location attribute of this location.
sourceReactant.MLIR.API.mlirLocationGetContext Method
mlirLocationGetContext(location)
Gets the context that a location was created with.
sourceReactant.MLIR.API.mlirLocationIsNull Method
mlirLocationIsNull(location)
Checks if the location is null.
sourceReactant.MLIR.API.mlirLocationNameGet Method
mlirLocationNameGet(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.
sourceReactant.MLIR.API.mlirLocationPrint Method
mlirLocationPrint(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.
Reactant.MLIR.API.mlirLocationUnknownGet Method
mlirLocationUnknownGet(context)
Creates a location with unknown position owned by the given context.
sourceReactant.MLIR.API.mlirLogicalResultFailure Method
mlirLogicalResultFailure()
Creates a logical result representing a failure.
sourceReactant.MLIR.API.mlirLogicalResultIsFailure Method
mlirLogicalResultIsFailure(res)
Checks if the given logical result represents a failure.
sourceReactant.MLIR.API.mlirLogicalResultIsSuccess Method
mlirLogicalResultIsSuccess(res)
Checks if the given logical result represents a success.
sourceReactant.MLIR.API.mlirLogicalResultSuccess Method
mlirLogicalResultSuccess()
Creates a logical result representing a success.
sourceReactant.MLIR.API.mlirMemRefTypeContiguousGet Method
mlirMemRefTypeContiguousGet(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.
sourceReactant.MLIR.API.mlirMemRefTypeContiguousGetChecked Method
mlirMemRefTypeContiguousGetChecked(loc, elementType, rank, shape, memorySpace)
Same as "mlirMemRefTypeContiguousGet
" but returns a nullptr wrapping MlirType
on illegal arguments, emitting appropriate diagnostics.
Reactant.MLIR.API.mlirMemRefTypeGet Method
mlirMemRefTypeGet(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.
sourceReactant.MLIR.API.mlirMemRefTypeGetAffineMap Method
mlirMemRefTypeGetAffineMap(type)
Returns the affine map of the given MemRef type.
sourceReactant.MLIR.API.mlirMemRefTypeGetChecked Method
mlirMemRefTypeGetChecked(loc, elementType, rank, shape, layout, memorySpace)
Same as "mlirMemRefTypeGet
" but returns a nullptr-wrapping MlirType
o illegal arguments, emitting appropriate diagnostics.
Reactant.MLIR.API.mlirMemRefTypeGetLayout Method
mlirMemRefTypeGetLayout(type)
Returns the layout of the given MemRef type.
sourceReactant.MLIR.API.mlirMemRefTypeGetMemorySpace Method
mlirMemRefTypeGetMemorySpace(type)
Returns the memory space of the given MemRef type.
sourceReactant.MLIR.API.mlirMemRefTypeGetStridesAndOffset Method
mlirMemRefTypeGetStridesAndOffset(type, strides, offset)
Returns the strides of the MemRef if the layout map is in strided form. Both strides and offset are out params. strides must point to pre-allocated memory of length equal to the rank of the memref.
sourceReactant.MLIR.API.mlirMemRefTypeGetTypeID Method
mlirMemRefTypeGetTypeID()
Returns the typeID of an MemRef type.
sourceReactant.MLIR.API.mlirMergeSymbolsIntoFromClone Method
mlirMergeSymbolsIntoFromClone(target, other)
Merge the symbols from other
into target
, potentially renaming them to avoid conflicts. Private symbols may be renamed during the merge, public symbols must have at most one declaration. A name conflict in public symbols is reported as an error before returning a failure.
Note that this clones the other
operation unlike the C++ counterpart that takes ownership.
Reactant.MLIR.API.mlirModuleCreateEmpty Method
mlirModuleCreateEmpty(location)
Creates a new, empty module and transfers ownership to the caller.
sourceReactant.MLIR.API.mlirModuleCreateParse Method
mlirModuleCreateParse(context, _module)
Parses a module from the string and transfers ownership to the caller.
sourceReactant.MLIR.API.mlirModuleCreateParseFromFile Method
mlirModuleCreateParseFromFile(context, fileName)
Parses a module from file and transfers ownership to the caller.
sourceReactant.MLIR.API.mlirModuleDestroy Method
mlirModuleDestroy(_module)
Takes a module owned by the caller and deletes it.
sourceReactant.MLIR.API.mlirModuleFromOperation Method
mlirModuleFromOperation(op)
Views the generic operation as a module. The returned module is null when the input operation was not a ModuleOp.
sourceReactant.MLIR.API.mlirModuleGetBody Method
mlirModuleGetBody(_module)
Gets the body of the module, i.e. the only block it contains.
sourceReactant.MLIR.API.mlirModuleGetContext Method
mlirModuleGetContext(_module)
Gets the context that a module was created with.
sourceReactant.MLIR.API.mlirModuleGetOperation Method
mlirModuleGetOperation(_module)
Views the module as a generic operation.
sourceReactant.MLIR.API.mlirModuleIsNull Method
mlirModuleIsNull(_module)
Checks whether a module is null.
sourceReactant.MLIR.API.mlirNamedAttributeGet Method
mlirNamedAttributeGet(name, attr)
Associates an attribute with the name. Takes ownership of neither.
sourceReactant.MLIR.API.mlirNoneTypeGet Method
mlirNoneTypeGet(ctx)
Creates a None type in the given context. The type is owned by the context.
sourceReactant.MLIR.API.mlirNoneTypeGetTypeID Method
mlirNoneTypeGetTypeID()
Returns the typeID of an None type.
sourceReactant.MLIR.API.mlirOpOperandGetNextUse Method
mlirOpOperandGetNextUse(opOperand)
Returns an op operand representing the next use of the value, or a null op operand if there is no next use.
sourceReactant.MLIR.API.mlirOpOperandGetOperandNumber Method
mlirOpOperandGetOperandNumber(opOperand)
Returns the operand number of an op operand.
sourceReactant.MLIR.API.mlirOpOperandGetOwner Method
mlirOpOperandGetOwner(opOperand)
Returns the owner operation of an op operand.
sourceReactant.MLIR.API.mlirOpOperandGetValue Method
mlirOpOperandGetValue(opOperand)
Returns the value of an op operand.
sourceReactant.MLIR.API.mlirOpOperandIsNull Method
mlirOpOperandIsNull(opOperand)
Returns whether the op operand is null.
sourceReactant.MLIR.API.mlirOpPassManagerAddOwnedPass Method
mlirOpPassManagerAddOwnedPass(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.
sourceReactant.MLIR.API.mlirOpPassManagerAddPipeline Method
mlirOpPassManagerAddPipeline(passManager, pipelineElements, callback, userData)
Parse a sequence of textual MLIR pass pipeline elements and add them to the provided OpPassManager. If parsing fails an error message is reported using the provided callback.
sourceReactant.MLIR.API.mlirOpPassManagerGetNestedUnder Method
mlirOpPassManagerGetNestedUnder(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.
sourceReactant.MLIR.API.mlirOpPrintingFlagsAssumeVerified Method
mlirOpPrintingFlagsAssumeVerified(flags)
Do not verify the operation when using custom operation printers.
sourceReactant.MLIR.API.mlirOpPrintingFlagsCreate Method
mlirOpPrintingFlagsCreate()
Creates new printing flags with defaults, intended for customization. Must be freed with a call to mlirOpPrintingFlagsDestroy
().
Reactant.MLIR.API.mlirOpPrintingFlagsDestroy Method
mlirOpPrintingFlagsDestroy(flags)
Destroys printing flags created with mlirOpPrintingFlagsCreate
.
Reactant.MLIR.API.mlirOpPrintingFlagsElideLargeElementsAttrs Method
mlirOpPrintingFlagsElideLargeElementsAttrs(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.
Reactant.MLIR.API.mlirOpPrintingFlagsElideLargeResourceString Method
mlirOpPrintingFlagsElideLargeResourceString(flags, largeResourceLimit)
Enables the elision of large resources strings by omitting them from the dialect_resources
section. The largeResourceLimit
is used to configure what is considered to be a "large" resource by providing an upper limit to the string size.
Reactant.MLIR.API.mlirOpPrintingFlagsEnableDebugInfo Method
mlirOpPrintingFlagsEnableDebugInfo(flags, enable, prettyForm)
Enable or disable printing of debug information (based on enable
). 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.
Reactant.MLIR.API.mlirOpPrintingFlagsPrintGenericOpForm Method
mlirOpPrintingFlagsPrintGenericOpForm(flags)
Always print operations in the generic form.
sourceReactant.MLIR.API.mlirOpPrintingFlagsSkipRegions Method
mlirOpPrintingFlagsSkipRegions(flags)
Skip printing regions.
sourceReactant.MLIR.API.mlirOpPrintingFlagsUseLocalScope Method
mlirOpPrintingFlagsUseLocalScope(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.
sourceReactant.MLIR.API.mlirOpResultGetOwner Method
mlirOpResultGetOwner(value)
Returns an operation that produced this value as its result. Asserts if the value is not an op result.
sourceReactant.MLIR.API.mlirOpResultGetResultNumber Method
mlirOpResultGetResultNumber(value)
Returns the position of the value in the list of results of the operation that produced it.
sourceReactant.MLIR.API.mlirOpaqueAttrGet Method
mlirOpaqueAttrGet(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).
sourceReactant.MLIR.API.mlirOpaqueAttrGetData Method
mlirOpaqueAttrGetData(attr)
Returns the raw data as a string reference. The data remains live as long as the context in which the attribute lives.
sourceReactant.MLIR.API.mlirOpaqueAttrGetDialectNamespace Method
mlirOpaqueAttrGetDialectNamespace(attr)
Returns the namespace of the dialect with which the given opaque attribute is associated. The namespace string is owned by the context.
sourceReactant.MLIR.API.mlirOpaqueAttrGetTypeID Method
mlirOpaqueAttrGetTypeID()
Returns the typeID of an Opaque attribute.
sourceReactant.MLIR.API.mlirOpaqueTypeGet Method
mlirOpaqueTypeGet(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).
sourceReactant.MLIR.API.mlirOpaqueTypeGetData Method
mlirOpaqueTypeGetData(type)
Returns the raw data as a string reference. The data remains live as long as the context in which the type lives.
sourceReactant.MLIR.API.mlirOpaqueTypeGetDialectNamespace Method
mlirOpaqueTypeGetDialectNamespace(type)
Returns the namespace of the dialect with which the given opaque type is associated. The namespace string is owned by the context.
sourceReactant.MLIR.API.mlirOpaqueTypeGetTypeID Method
mlirOpaqueTypeGetTypeID()
Returns the typeID of an Opaque type.
sourceReactant.MLIR.API.mlirOperationClone Method
mlirOperationClone(op)
Creates a deep copy of an operation. The operation is not inserted and ownership is transferred to the caller.
sourceReactant.MLIR.API.mlirOperationCreate Method
mlirOperationCreate(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.
sourceReactant.MLIR.API.mlirOperationCreateParse Method
mlirOperationCreateParse(context, sourceStr, sourceName)
Parses an operation, giving ownership to the caller. If parsing fails a null operation will be returned, and an error diagnostic emitted.
sourceStr
may be either the text assembly format, or binary bytecode format. sourceName
is used as the file name of the source; any IR without locations will get a FileLineColLoc
location with sourceName
as the file name.
Reactant.MLIR.API.mlirOperationDestroy Method
mlirOperationDestroy(op)
Takes an operation owned by the caller and destroys it.
sourceReactant.MLIR.API.mlirOperationDump Method
mlirOperationDump(op)
Prints an operation to stderr.
sourceReactant.MLIR.API.mlirOperationEqual Method
mlirOperationEqual(op, other)
Checks whether two operation handles point to the same operation. This does not perform deep comparison.
sourceReactant.MLIR.API.mlirOperationGetAttribute Method
mlirOperationGetAttribute(op, pos)
Return pos
-th attribute of the operation. Deprecated, please use mlirOperationGetInherentAttribute
or mlirOperationGetDiscardableAttribute
.
Reactant.MLIR.API.mlirOperationGetAttributeByName Method
mlirOperationGetAttributeByName(op, name)
Returns an attribute attached to the operation given its name. Deprecated, please use mlirOperationGetInherentAttributeByName
or mlirOperationGetDiscardableAttributeByName
.
Reactant.MLIR.API.mlirOperationGetBlock Method
mlirOperationGetBlock(op)
Gets the block that owns this operation, returning null if the operation is not owned.
sourceReactant.MLIR.API.mlirOperationGetContext Method
mlirOperationGetContext(op)
Gets the context this operation is associated with
sourceReactant.MLIR.API.mlirOperationGetDiscardableAttribute Method
mlirOperationGetDiscardableAttribute(op, pos)
Return pos
-th discardable attribute of the operation.
Reactant.MLIR.API.mlirOperationGetDiscardableAttributeByName Method
mlirOperationGetDiscardableAttributeByName(op, name)
Returns a discardable attribute attached to the operation given its name.
sourceReactant.MLIR.API.mlirOperationGetFirstRegion Method
mlirOperationGetFirstRegion(op)
Returns first region attached to the operation.
sourceReactant.MLIR.API.mlirOperationGetInherentAttributeByName Method
mlirOperationGetInherentAttributeByName(op, name)
Returns an inherent attribute attached to the operation given its name.
sourceReactant.MLIR.API.mlirOperationGetLocation Method
mlirOperationGetLocation(op)
Gets the location of the operation.
sourceReactant.MLIR.API.mlirOperationGetName Method
mlirOperationGetName(op)
Gets the name of the operation as an identifier.
sourceReactant.MLIR.API.mlirOperationGetNextInBlock Method
mlirOperationGetNextInBlock(op)
Returns an operation immediately following the given operation it its enclosing block.
sourceReactant.MLIR.API.mlirOperationGetNumAttributes Method
mlirOperationGetNumAttributes(op)
Returns the number of attributes attached to the operation. Deprecated, please use mlirOperationGetNumInherentAttributes
or mlirOperationGetNumDiscardableAttributes
.
Reactant.MLIR.API.mlirOperationGetNumDiscardableAttributes Method
mlirOperationGetNumDiscardableAttributes(op)
Returns the number of discardable attributes attached to the operation.
sourceReactant.MLIR.API.mlirOperationGetNumOperands Method
mlirOperationGetNumOperands(op)
Returns the number of operands of the operation.
sourceReactant.MLIR.API.mlirOperationGetNumRegions Method
mlirOperationGetNumRegions(op)
Returns the number of regions attached to the given operation.
sourceReactant.MLIR.API.mlirOperationGetNumResults Method
mlirOperationGetNumResults(op)
Returns the number of results of the operation.
sourceReactant.MLIR.API.mlirOperationGetNumSuccessors Method
mlirOperationGetNumSuccessors(op)
Returns the number of successor blocks of the operation.
sourceReactant.MLIR.API.mlirOperationGetOperand Method
mlirOperationGetOperand(op, pos)
Returns pos
-th operand of the operation.
Reactant.MLIR.API.mlirOperationGetParentOperation Method
mlirOperationGetParentOperation(op)
Gets the operation that owns this operation, returning null if the operation is not owned.
sourceReactant.MLIR.API.mlirOperationGetRegion Method
mlirOperationGetRegion(op, pos)
Returns pos
-th region attached to the operation.
Reactant.MLIR.API.mlirOperationGetResult Method
mlirOperationGetResult(op, pos)
Returns pos
-th result of the operation.
Reactant.MLIR.API.mlirOperationGetSuccessor Method
mlirOperationGetSuccessor(op, pos)
Returns pos
-th successor of the operation.
Reactant.MLIR.API.mlirOperationGetTypeID Method
mlirOperationGetTypeID(op)
Gets the type id of the operation. Returns null if the operation does not have a registered operation description.
sourceReactant.MLIR.API.mlirOperationHasInherentAttributeByName Method
mlirOperationHasInherentAttributeByName(op, name)
Returns true if this operation defines an inherent attribute with this name. Note: the attribute can be optional, so mlirOperationGetInherentAttributeByName
can still return a null attribute.
Reactant.MLIR.API.mlirOperationImplementsInterface Method
mlirOperationImplementsInterface(operation, interfaceTypeID)
Returns true
if the given operation implements an interface identified by its TypeID.
Reactant.MLIR.API.mlirOperationImplementsInterfaceStatic Method
mlirOperationImplementsInterfaceStatic(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.
Reactant.MLIR.API.mlirOperationIsNull Method
mlirOperationIsNull(op)
Checks whether the underlying operation is null.
sourceReactant.MLIR.API.mlirOperationMoveAfter Method
mlirOperationMoveAfter(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.
sourceReactant.MLIR.API.mlirOperationMoveBefore Method
mlirOperationMoveBefore(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.
sourceReactant.MLIR.API.mlirOperationPrint Method
mlirOperationPrint(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.
Reactant.MLIR.API.mlirOperationPrintWithFlags Method
mlirOperationPrintWithFlags(op, flags, callback, userData)
Same as mlirOperationPrint
but accepts flags controlling the printing behavior.
Reactant.MLIR.API.mlirOperationPrintWithState Method
mlirOperationPrintWithState(op, state, callback, userData)
Same as mlirOperationPrint
but accepts AsmState controlling the printing behavior as well as caching computed names.
Reactant.MLIR.API.mlirOperationRemoveAttributeByName Method
mlirOperationRemoveAttributeByName(op, name)
Removes an attribute by name. Returns false if the attribute was not found and true if removed. Deprecated, please use mlirOperationRemoveInherentAttributeByName
or mlirOperationRemoveDiscardableAttributeByName
.
Reactant.MLIR.API.mlirOperationRemoveDiscardableAttributeByName Method
mlirOperationRemoveDiscardableAttributeByName(op, name)
Removes a discardable attribute by name. Returns false if the attribute was not found and true if removed.
sourceReactant.MLIR.API.mlirOperationRemoveFromParent Method
mlirOperationRemoveFromParent(op)
Removes the given operation from its parent block. The operation is not destroyed. The ownership of the operation is transferred to the caller.
sourceReactant.MLIR.API.mlirOperationSetAttributeByName Method
mlirOperationSetAttributeByName(op, name, attr)
Sets an attribute by name, replacing the existing if it exists or adding a new one otherwise. Deprecated, please use mlirOperationSetInherentAttributeByName
or mlirOperationSetDiscardableAttributeByName
.
Reactant.MLIR.API.mlirOperationSetDiscardableAttributeByName Method
mlirOperationSetDiscardableAttributeByName(op, name, attr)
Sets a discardable attribute by name, replacing the existing if it exists or adding a new one otherwise. The new attr
Attribute is not allowed to be null, use mlirOperationRemoveDiscardableAttributeByName
to remove an Attribute instead.
Reactant.MLIR.API.mlirOperationSetInherentAttributeByName Method
mlirOperationSetInherentAttributeByName(op, name, attr)
Sets an inherent attribute by name, replacing the existing if it exists. This has no effect if "name" does not match an inherent attribute.
sourceReactant.MLIR.API.mlirOperationSetOperand Method
mlirOperationSetOperand(op, pos, newValue)
Sets the pos
-th operand of the operation.
Reactant.MLIR.API.mlirOperationSetOperands Method
mlirOperationSetOperands(op, nOperands, operands)
Replaces the operands of the operation.
sourceReactant.MLIR.API.mlirOperationSetSuccessor Method
mlirOperationSetSuccessor(op, pos, block)
Set pos
-th successor of the operation.
Reactant.MLIR.API.mlirOperationStateAddResults Method
mlirOperationStateAddResults(state, n, results)
Adds a list of components to the operation state.
sourceReactant.MLIR.API.mlirOperationStateEnableResultTypeInference Method
mlirOperationStateEnableResultTypeInference(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.
Reactant.MLIR.API.mlirOperationStateGet Method
mlirOperationStateGet(name, loc)
Constructs an operation state from a name and a location.
sourceReactant.MLIR.API.mlirOperationVerify Method
mlirOperationVerify(op)
Verify the operation and return true if it passes, false if it fails.
sourceReactant.MLIR.API.mlirOperationWalk Method
mlirOperationWalk(op, callback, userData, walkOrder)
Walks operation op
in walkOrder
and calls callback
on that operation. *userData
is passed to the callback as well and can be used to tunnel some context or other data into the callback.
Reactant.MLIR.API.mlirOperationWriteBytecode Method
mlirOperationWriteBytecode(op, callback, userData)
Same as mlirOperationPrint
but writing the bytecode format.
Reactant.MLIR.API.mlirOperationWriteBytecodeWithConfig Method
mlirOperationWriteBytecodeWithConfig(op, config, callback, userData)
Same as mlirOperationWriteBytecode
but with writer config and returns failure only if desired bytecode could not be honored.
Reactant.MLIR.API.mlirParsePassPipeline Method
mlirParsePassPipeline(passManager, pipeline, callback, userData)
Parse a textual MLIR pass pipeline and assign it to the provided OpPassManager. If parsing fails an error message is reported using the provided callback.
sourceReactant.MLIR.API.mlirPassManagerAddOwnedPass Method
mlirPassManagerAddOwnedPass(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.
sourceReactant.MLIR.API.mlirPassManagerCreate Method
mlirPassManagerCreate(ctx)
Create a new top-level PassManager with the default anchor.
sourceReactant.MLIR.API.mlirPassManagerCreateOnOperation Method
mlirPassManagerCreateOnOperation(ctx, anchorOp)
Create a new top-level PassManager anchored on anchorOp
.
Reactant.MLIR.API.mlirPassManagerDestroy Method
mlirPassManagerDestroy(passManager)
Destroy the provided PassManager.
sourceReactant.MLIR.API.mlirPassManagerEnableIRPrinting Method
mlirPassManagerEnableIRPrinting(passManager, printBeforeAll, printAfterAll, printModuleScope, printAfterOnlyOnChange, printAfterOnlyOnFailure, flags, treePrintingPath)
Enable IR printing. The treePrintingPath argument is an optional path to a directory where the dumps will be produced. If it isn't provided then dumps are produced to stderr.
sourceReactant.MLIR.API.mlirPassManagerEnableVerifier Method
mlirPassManagerEnableVerifier(passManager, enable)
Enable / disable verify-each.
sourceReactant.MLIR.API.mlirPassManagerGetAsOpPassManager Method
mlirPassManagerGetAsOpPassManager(passManager)
Cast a top-level PassManager to a generic OpPassManager.
sourceReactant.MLIR.API.mlirPassManagerGetNestedUnder Method
mlirPassManagerGetNestedUnder(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.
Reactant.MLIR.API.mlirPassManagerIsNull Method
mlirPassManagerIsNull(passManager)
Checks if a PassManager is null.
sourceReactant.MLIR.API.mlirPassManagerRunOnOp Method
mlirPassManagerRunOnOp(passManager, op)
Run the provided passManager
on the given op
.
Reactant.MLIR.API.mlirPrintPassPipeline Method
mlirPrintPassPipeline(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.
Reactant.MLIR.API.mlirQuantizedTypeCastExpressedToStorageType Method
mlirQuantizedTypeCastExpressedToStorageType(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.
sourceReactant.MLIR.API.mlirQuantizedTypeCastFromExpressedType Method
mlirQuantizedTypeCastFromExpressedType(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.
sourceReactant.MLIR.API.mlirQuantizedTypeCastFromStorageType Method
mlirQuantizedTypeCastFromStorageType(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.
sourceReactant.MLIR.API.mlirQuantizedTypeCastToExpressedType Method
mlirQuantizedTypeCastToExpressedType(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.
sourceReactant.MLIR.API.mlirQuantizedTypeCastToStorageType Method
mlirQuantizedTypeCastToStorageType(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.
sourceReactant.MLIR.API.mlirQuantizedTypeGetDefaultMaximumForInteger Method
mlirQuantizedTypeGetDefaultMaximumForInteger(isSigned, integralWidth)
Returns the maximum possible value stored by a quantized type.
sourceReactant.MLIR.API.mlirQuantizedTypeGetDefaultMinimumForInteger Method
mlirQuantizedTypeGetDefaultMinimumForInteger(isSigned, integralWidth)
Returns the minimum possible value stored by a quantized type.
sourceReactant.MLIR.API.mlirQuantizedTypeGetExpressedType Method
mlirQuantizedTypeGetExpressedType(type)
Gets the original type approximated by the given quantized type.
sourceReactant.MLIR.API.mlirQuantizedTypeGetFlags Method
mlirQuantizedTypeGetFlags(type)
Gets the flags associated with the given quantized type.
sourceReactant.MLIR.API.mlirQuantizedTypeGetQuantizedElementType Method
mlirQuantizedTypeGetQuantizedElementType(type)
Returns the element type of the given quantized type as another quantized type.
sourceReactant.MLIR.API.mlirQuantizedTypeGetSignedFlag Method
mlirQuantizedTypeGetSignedFlag()
Returns the bit flag used to indicate signedness of a quantized type.
sourceReactant.MLIR.API.mlirQuantizedTypeGetStorageType Method
mlirQuantizedTypeGetStorageType(type)
Returns the underlying type used to store the values.
sourceReactant.MLIR.API.mlirQuantizedTypeGetStorageTypeIntegralWidth Method
mlirQuantizedTypeGetStorageTypeIntegralWidth(type)
Returns the integral bitwidth that the storage type of the given quantized type can represent exactly.
sourceReactant.MLIR.API.mlirQuantizedTypeGetStorageTypeMax Method
mlirQuantizedTypeGetStorageTypeMax(type)
Returns the maximum value that the storage type of the given quantized type can take.
sourceReactant.MLIR.API.mlirQuantizedTypeGetStorageTypeMin Method
mlirQuantizedTypeGetStorageTypeMin(type)
Returns the minimum value that the storage type of the given quantized type can take.
sourceReactant.MLIR.API.mlirQuantizedTypeIsCompatibleExpressedType Method
mlirQuantizedTypeIsCompatibleExpressedType(type, candidate)
Returns true
if the candidate
type is compatible with the given quantized type
.
Reactant.MLIR.API.mlirQuantizedTypeIsSigned Method
mlirQuantizedTypeIsSigned(type)
Returns true
if the given type is signed, false
otherwise.
Reactant.MLIR.API.mlirRankedTensorTypeGet Method
mlirRankedTensorTypeGet(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.
Reactant.MLIR.API.mlirRankedTensorTypeGetChecked Method
mlirRankedTensorTypeGetChecked(loc, rank, shape, elementType, encoding)
Same as "mlirRankedTensorTypeGet
" but returns a nullptr wrapping MlirType
on illegal arguments, emitting appropriate diagnostics.
Reactant.MLIR.API.mlirRankedTensorTypeGetEncoding Method
mlirRankedTensorTypeGetEncoding(type)
Gets the 'encoding' attribute from the ranked tensor type, returning a null attribute if none.
sourceReactant.MLIR.API.mlirRankedTensorTypeGetTypeID Method
mlirRankedTensorTypeGetTypeID()
Returns the typeID of an RankedTensor type.
sourceReactant.MLIR.API.mlirRegionAppendOwnedBlock Method
mlirRegionAppendOwnedBlock(region, block)
Takes a block owned by the caller and appends it to the given region.
sourceReactant.MLIR.API.mlirRegionCreate Method
mlirRegionCreate()
Creates a new empty region and transfers ownership to the caller.
sourceReactant.MLIR.API.mlirRegionDestroy Method
mlirRegionDestroy(region)
Takes a region owned by the caller and destroys it.
sourceReactant.MLIR.API.mlirRegionEqual Method
mlirRegionEqual(region, other)
Checks whether two region handles point to the same region. This does not perform deep comparison.
sourceReactant.MLIR.API.mlirRegionGetFirstBlock Method
mlirRegionGetFirstBlock(region)
Gets the first block in the region.
sourceReactant.MLIR.API.mlirRegionGetNextInOperation Method
mlirRegionGetNextInOperation(region)
Returns the region immediately following the given region in its parent operation.
sourceReactant.MLIR.API.mlirRegionInsertOwnedBlock Method
mlirRegionInsertOwnedBlock(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.
Reactant.MLIR.API.mlirRegionInsertOwnedBlockAfter Method
mlirRegionInsertOwnedBlockAfter(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.
sourceReactant.MLIR.API.mlirRegionInsertOwnedBlockBefore Method
mlirRegionInsertOwnedBlockBefore(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.
sourceReactant.MLIR.API.mlirRegionIsNull Method
mlirRegionIsNull(region)
Checks whether a region is null.
sourceReactant.MLIR.API.mlirRegionTakeBody Method
mlirRegionTakeBody(target, source)
Moves the entire content of the source region to the target region.
sourceReactant.MLIR.API.mlirRegisterAllDialects Method
mlirRegisterAllDialects(registry)
Appends all upstream dialects and extensions to the dialect registry.
sourceReactant.MLIR.API.mlirRegisterAllLLVMTranslations Method
mlirRegisterAllLLVMTranslations(context)
Register all translations to LLVM IR for dialects that can support it.
sourceReactant.MLIR.API.mlirRegisterAllPasses Method
mlirRegisterAllPasses()
Register all compiler passes of MLIR.
sourceReactant.MLIR.API.mlirRewriterBaseCancelOpModification Method
mlirRewriterBaseCancelOpModification(rewriter, op)
This method cancels a pending in-place modification. This can only be called on operations that were provided to a call to startOpModification
.
Reactant.MLIR.API.mlirRewriterBaseClearInsertionPoint Method
mlirRewriterBaseClearInsertionPoint(rewriter)
Reset the insertion point to no location. Creating an operation without a set insertion point is an error, but this can still be useful when the current insertion point a builder refers to is being removed.
sourceReactant.MLIR.API.mlirRewriterBaseClone Method
mlirRewriterBaseClone(rewriter, op)
Creates a deep copy of the specified operation.
sourceReactant.MLIR.API.mlirRewriterBaseCloneRegionBefore Method
mlirRewriterBaseCloneRegionBefore(rewriter, region, before)
Clone the blocks that belong to "region" before the given position in another region "parent".
sourceReactant.MLIR.API.mlirRewriterBaseCloneWithoutRegions Method
mlirRewriterBaseCloneWithoutRegions(rewriter, op)
Creates a deep copy of this operation but keep the operation regions empty.
sourceReactant.MLIR.API.mlirRewriterBaseCreateBlockBefore Method
mlirRewriterBaseCreateBlockBefore(rewriter, insertBefore, nArgTypes, argTypes, locations)
Add new block with 'argTypes' arguments and set the insertion point to the end of it. The block is placed before 'insertBefore'. locs
contains the locations of the inserted arguments, and should match the size of argTypes
.
Reactant.MLIR.API.mlirRewriterBaseEraseBlock Method
mlirRewriterBaseEraseBlock(rewriter, block)
Erases a block along with all operations inside it.
sourceReactant.MLIR.API.mlirRewriterBaseEraseOp Method
mlirRewriterBaseEraseOp(rewriter, op)
Erases an operation that is known to have no uses.
sourceReactant.MLIR.API.mlirRewriterBaseFinalizeOpModification Method
mlirRewriterBaseFinalizeOpModification(rewriter, op)
This method is used to signal the end of an in-place modification of the given operation. This can only be called on operations that were provided to a call to startOpModification
.
Reactant.MLIR.API.mlirRewriterBaseGetBlock Method
mlirRewriterBaseGetBlock(rewriter)
Returns the current block of the rewriter.
sourceReactant.MLIR.API.mlirRewriterBaseGetContext Method
mlirRewriterBaseGetContext(rewriter)
Get the MLIR context referenced by the rewriter.
sourceReactant.MLIR.API.mlirRewriterBaseGetInsertionBlock Method
mlirRewriterBaseGetInsertionBlock(rewriter)
Return the block the current insertion point belongs to. Note that the insertion point is not necessarily the end of the block.
sourceReactant.MLIR.API.mlirRewriterBaseInlineBlockBefore Method
mlirRewriterBaseInlineBlockBefore(rewriter, source, op, nArgValues, argValues)
Inline the operations of block 'source' before the operation 'op'. The source block will be deleted and must have no uses. 'argValues' is used to replace the block arguments of 'source'
The source block must have no successors. Otherwise, the resulting IR would have unreachable operations.
sourceReactant.MLIR.API.mlirRewriterBaseInlineRegionBefore Method
mlirRewriterBaseInlineRegionBefore(rewriter, region, before)
Move the blocks that belong to "region" before the given position in another region "parent". The two regions must be different. The caller is responsible for creating or updating the operation transferring flow of control to the region and passing it the correct block arguments.
sourceReactant.MLIR.API.mlirRewriterBaseInsert Method
mlirRewriterBaseInsert(rewriter, op)
Insert the given operation at the current insertion point and return it.
sourceReactant.MLIR.API.mlirRewriterBaseMergeBlocks Method
mlirRewriterBaseMergeBlocks(rewriter, source, dest, nArgValues, argValues)
Inline the operations of block 'source' into the end of block 'dest'. The source block will be deleted and must have no uses. 'argValues' is used to replace the block arguments of 'source'
The dest block must have no successors. Otherwise, the resulting IR would have unreachable operation.
sourceReactant.MLIR.API.mlirRewriterBaseMoveBlockBefore Method
mlirRewriterBaseMoveBlockBefore(rewriter, block, existingBlock)
Unlink this block and insert it right before existingBlock
.
Reactant.MLIR.API.mlirRewriterBaseMoveOpAfter Method
mlirRewriterBaseMoveOpAfter(rewriter, op, existingOp)
Unlink this operation from its current block and insert it right after existingOp
which may be in the same or another block in the same function.
Reactant.MLIR.API.mlirRewriterBaseMoveOpBefore Method
mlirRewriterBaseMoveOpBefore(rewriter, op, existingOp)
Unlink this operation from its current block and insert it right before existingOp
which may be in the same or another block in the same function.
Reactant.MLIR.API.mlirRewriterBaseReplaceAllOpUsesWithOperation Method
mlirRewriterBaseReplaceAllOpUsesWithOperation(rewriter, from, to)
Find uses of from
and replace them with to
. Also notify the listener about every in-place op modification (for every use that was replaced) and that the from
operation is about to be replaced.
Reactant.MLIR.API.mlirRewriterBaseReplaceAllOpUsesWithValueRange Method
mlirRewriterBaseReplaceAllOpUsesWithValueRange(rewriter, from, nTo, to)
Find uses of from
and replace them with to
. Also notify the listener about every in-place op modification (for every use that was replaced) and that the from
operation is about to be replaced.
Reactant.MLIR.API.mlirRewriterBaseReplaceAllUsesExcept Method
mlirRewriterBaseReplaceAllUsesExcept(rewriter, from, to, exceptedUser)
Find uses of from
and replace them with to
except if the user is exceptedUser
. Also notify the listener about every in-place op modification (for every use that was replaced).
Reactant.MLIR.API.mlirRewriterBaseReplaceAllUsesWith Method
mlirRewriterBaseReplaceAllUsesWith(rewriter, from, to)
Find uses of from
and replace them with to
. Also notify the listener about every in-place op modification (for every use that was replaced).
Reactant.MLIR.API.mlirRewriterBaseReplaceAllValueRangeUsesWith Method
mlirRewriterBaseReplaceAllValueRangeUsesWith(rewriter, nValues, from, to)
Find uses of from
and replace them with to
. Also notify the listener about every in-place op modification (for every use that was replaced).
Reactant.MLIR.API.mlirRewriterBaseReplaceOpUsesWithinBlock Method
mlirRewriterBaseReplaceOpUsesWithinBlock(rewriter, op, nNewValues, newValues, block)
Find uses of from
within block
and replace them with to
. Also notify the listener about every in-place op modification (for every use that was replaced). The optional allUsesReplaced
flag is set to "true" if all uses were replaced.
Reactant.MLIR.API.mlirRewriterBaseReplaceOpWithOperation Method
mlirRewriterBaseReplaceOpWithOperation(rewriter, op, newOp)
Replace the results of the given (original) operation with the specified new op (replacement). The result types of the two ops must match. The original op is erased.
sourceReactant.MLIR.API.mlirRewriterBaseReplaceOpWithValues Method
mlirRewriterBaseReplaceOpWithValues(rewriter, op, nValues, values)
Replace the results of the given (original) operation with the specified list of values (replacements). The result types of the given op and the replacements must match. The original op is erased.
sourceReactant.MLIR.API.mlirRewriterBaseSetInsertionPointAfter Method
mlirRewriterBaseSetInsertionPointAfter(rewriter, op)
Sets the insertion point to the node after the specified operation, which will cause subsequent insertions to go right after it.
sourceReactant.MLIR.API.mlirRewriterBaseSetInsertionPointAfterValue Method
mlirRewriterBaseSetInsertionPointAfterValue(rewriter, value)
Sets the insertion point to the node after the specified value. If value has a defining operation, sets the insertion point to the node after such defining operation. This will cause subsequent insertions to go right after it. Otherwise, value is a BlockArgument. Sets the insertion point to the start of its block.
sourceReactant.MLIR.API.mlirRewriterBaseSetInsertionPointBefore Method
mlirRewriterBaseSetInsertionPointBefore(rewriter, op)
Sets the insertion point to the specified operation, which will cause subsequent insertions to go right before it.
sourceReactant.MLIR.API.mlirRewriterBaseSetInsertionPointToEnd Method
mlirRewriterBaseSetInsertionPointToEnd(rewriter, block)
Sets the insertion point to the end of the specified block.
sourceReactant.MLIR.API.mlirRewriterBaseSetInsertionPointToStart Method
mlirRewriterBaseSetInsertionPointToStart(rewriter, block)
Sets the insertion point to the start of the specified block.
sourceReactant.MLIR.API.mlirRewriterBaseStartOpModification Method
mlirRewriterBaseStartOpModification(rewriter, op)
This method is used to notify the rewriter that an in-place operation modification is about to happen. A call to this function must be followed by a call to either finalizeOpModification
or cancelOpModification
. This is a minor efficiency win (it avoids creating a new operation and removing the old one) but also often allows simpler code in the client.
Reactant.MLIR.API.mlirSetGlobalDebugType Method
mlirSetGlobalDebugType(type)
Sets the current debug type, similarly to -debug-only=type
in the command-line tools. Note that global debug should be enabled for any output to be produced.
Reactant.MLIR.API.mlirSetGlobalDebugTypes Method
mlirSetGlobalDebugTypes(types, n)
Sets multiple current debug types, similarly to `-debug-only=type1,type2" in the command-line tools. Note that global debug should be enabled for any output to be produced.
sourceReactant.MLIR.API.mlirShapedTypeGetDimSize Method
mlirShapedTypeGetDimSize(type, dim)
Returns the dim-th dimension of the given ranked shaped type.
sourceReactant.MLIR.API.mlirShapedTypeGetDynamicSize Method
mlirShapedTypeGetDynamicSize()
Returns the value indicating a dynamic size in a shaped type. Prefer mlirShapedTypeIsDynamicSize
to direct comparisons with this value.
Reactant.MLIR.API.mlirShapedTypeGetDynamicStrideOrOffset Method
mlirShapedTypeGetDynamicStrideOrOffset()
Returns the value indicating a dynamic stride or offset in a shaped type. Prefer mlirShapedTypeGetDynamicStrideOrOffset
to direct comparisons with this value.
Reactant.MLIR.API.mlirShapedTypeGetElementType Method
mlirShapedTypeGetElementType(type)
Returns the element type of the shaped type.
sourceReactant.MLIR.API.mlirShapedTypeGetRank Method
mlirShapedTypeGetRank(type)
Returns the rank of the given ranked shaped type.
sourceReactant.MLIR.API.mlirShapedTypeHasRank Method
mlirShapedTypeHasRank(type)
Checks whether the given shaped type is ranked.
sourceReactant.MLIR.API.mlirShapedTypeHasStaticShape Method
mlirShapedTypeHasStaticShape(type)
Checks whether the given shaped type has a static shape.
sourceReactant.MLIR.API.mlirShapedTypeIsDynamicDim Method
mlirShapedTypeIsDynamicDim(type, dim)
Checks wither the dim-th dimension of the given shaped type is dynamic.
sourceReactant.MLIR.API.mlirShapedTypeIsDynamicSize Method
mlirShapedTypeIsDynamicSize(size)
Checks whether the given value is used as a placeholder for dynamic sizes in shaped types.
sourceReactant.MLIR.API.mlirShapedTypeIsDynamicStrideOrOffset Method
mlirShapedTypeIsDynamicStrideOrOffset(val)
Checks whether the given value is used as a placeholder for dynamic strides and offsets in shaped types.
sourceReactant.MLIR.API.mlirSparseElementsAttrGetIndices Method
mlirSparseElementsAttrGetIndices(attr)
Returns the dense elements attribute containing 64-bit integer indices of non-null elements in the given sparse elements attribute.
sourceReactant.MLIR.API.mlirSparseElementsAttrGetTypeID Method
mlirSparseElementsAttrGetTypeID()
Returns the typeID of a SparseElements attribute.
sourceReactant.MLIR.API.mlirSparseElementsAttrGetValues Method
mlirSparseElementsAttrGetValues(attr)
Returns the dense elements attribute containing the non-null elements in the given sparse elements attribute.
sourceReactant.MLIR.API.mlirSparseElementsAttribute Method
mlirSparseElementsAttribute(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.
sourceReactant.MLIR.API.mlirSparseTensorEncodingAttrGet Method
mlirSparseTensorEncodingAttrGet(ctx, lvlRank, lvlTypes, dimToLvl, lvlTodim, posWidth, crdWidth, explicitVal, implicitVal)
Creates a sparse\_tensor.encoding
attribute with the given parameters.
Reactant.MLIR.API.mlirSparseTensorEncodingAttrGetCrdWidth Method
mlirSparseTensorEncodingAttrGetCrdWidth(attr)
Returns the coordinate bitwidth of the sparse\_tensor.encoding
attribute.
Reactant.MLIR.API.mlirSparseTensorEncodingAttrGetDimToLvl Method
mlirSparseTensorEncodingAttrGetDimToLvl(attr)
Returns the dimension-to-level mapping of the sparse\_tensor.encoding
attribute.
Reactant.MLIR.API.mlirSparseTensorEncodingAttrGetExplicitVal Method
mlirSparseTensorEncodingAttrGetExplicitVal(attr)
Returns the explicit value of the sparse\_tensor.encoding
attribute.
Reactant.MLIR.API.mlirSparseTensorEncodingAttrGetImplicitVal Method
mlirSparseTensorEncodingAttrGetImplicitVal(attr)
Returns the implicit value of the sparse\_tensor.encoding
attribute.
Reactant.MLIR.API.mlirSparseTensorEncodingAttrGetLvlFmt Method
mlirSparseTensorEncodingAttrGetLvlFmt(attr, lvl)
Returns a specified level-format of the sparse\_tensor.encoding
attribute.
Reactant.MLIR.API.mlirSparseTensorEncodingAttrGetLvlToDim Method
mlirSparseTensorEncodingAttrGetLvlToDim(attr)
Returns the level-to-dimension mapping of the sparse\_tensor.encoding
attribute.
Reactant.MLIR.API.mlirSparseTensorEncodingAttrGetLvlType Method
mlirSparseTensorEncodingAttrGetLvlType(attr, lvl)
Returns a specified level-type of the sparse\_tensor.encoding
attribute.
Reactant.MLIR.API.mlirSparseTensorEncodingAttrGetPosWidth Method
mlirSparseTensorEncodingAttrGetPosWidth(attr)
Returns the position bitwidth of the sparse\_tensor.encoding
attribute.
Reactant.MLIR.API.mlirSparseTensorEncodingGetLvlRank Method
mlirSparseTensorEncodingGetLvlRank(attr)
Returns the level-rank of the sparse\_tensor.encoding
attribute.
Reactant.MLIR.API.mlirStridedLayoutAttrGetTypeID Method
mlirStridedLayoutAttrGetTypeID()
Returns the typeID of a StridedLayout attribute.
sourceReactant.MLIR.API.mlirStringAttrGet Method
mlirStringAttrGet(ctx, str)
Creates a string attribute in the given context containing the given string.
sourceReactant.MLIR.API.mlirStringAttrGetTypeID Method
mlirStringAttrGetTypeID()
Returns the typeID of a String attribute.
sourceReactant.MLIR.API.mlirStringAttrGetValue Method
mlirStringAttrGetValue(attr)
Returns the attribute values as a string reference. The data remains live as long as the context in which the attribute lives.
sourceReactant.MLIR.API.mlirStringAttrTypedGet Method
mlirStringAttrTypedGet(type, str)
Creates a string attribute in the given context containing the given string. Additionally, the attribute has the given type.
sourceReactant.MLIR.API.mlirStringRefCreate Method
mlirStringRefCreate(str, length)
Constructs a string reference from the pointer and length. The pointer need not reference to a null-terminated string.
sourceReactant.MLIR.API.mlirStringRefCreateFromCString Method
mlirStringRefCreateFromCString(str)
Constructs a string reference from a null-terminated C string. Prefer mlirStringRefCreate
if the length of the string is known.
Reactant.MLIR.API.mlirStringRefEqual Method
mlirStringRefEqual(string, other)
Returns true if two string references are equal, false otherwise.
sourceReactant.MLIR.API.mlirSymbolRefAttrGet Method
mlirSymbolRefAttrGet(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.
sourceReactant.MLIR.API.mlirSymbolRefAttrGetLeafReference Method
mlirSymbolRefAttrGetLeafReference(attr)
Returns the string reference to the leaf referenced symbol. The data remains live as long as the context in which the attribute lives.
sourceReactant.MLIR.API.mlirSymbolRefAttrGetNestedReference Method
mlirSymbolRefAttrGetNestedReference(attr, pos)
Returns pos-th reference nested in the given symbol reference attribute.
sourceReactant.MLIR.API.mlirSymbolRefAttrGetNumNestedReferences Method
mlirSymbolRefAttrGetNumNestedReferences(attr)
Returns the number of references nested in the given symbol reference attribute.
sourceReactant.MLIR.API.mlirSymbolRefAttrGetRootReference Method
mlirSymbolRefAttrGetRootReference(attr)
Returns the string reference to the root referenced symbol. The data remains live as long as the context in which the attribute lives.
sourceReactant.MLIR.API.mlirSymbolRefAttrGetTypeID Method
mlirSymbolRefAttrGetTypeID()
Returns the typeID of an SymbolRef attribute.
sourceReactant.MLIR.API.mlirSymbolTableCreate Method
mlirSymbolTableCreate(operation)
Creates a symbol table for the given operation. If the operation does not have the SymbolTable trait, returns a null symbol table.
sourceReactant.MLIR.API.mlirSymbolTableDestroy Method
mlirSymbolTableDestroy(symbolTable)
Destroys the symbol table created with mlirSymbolTableCreate
. This does not affect the operations in the table.
Reactant.MLIR.API.mlirSymbolTableErase Method
mlirSymbolTableErase(symbolTable, operation)
Removes the given operation from the symbol table and erases it.
sourceReactant.MLIR.API.mlirSymbolTableGetSymbolAttributeName Method
mlirSymbolTableGetSymbolAttributeName()
Returns the name of the attribute used to store symbol names compatible with symbol tables.
sourceReactant.MLIR.API.mlirSymbolTableGetVisibilityAttributeName Method
mlirSymbolTableGetVisibilityAttributeName()
Returns the name of the attribute used to store symbol visibility.
sourceReactant.MLIR.API.mlirSymbolTableInsert Method
mlirSymbolTableInsert(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.
sourceReactant.MLIR.API.mlirSymbolTableIsNull Method
mlirSymbolTableIsNull(symbolTable)
Returns true if the symbol table is null.
sourceReactant.MLIR.API.mlirSymbolTableLookup Method
mlirSymbolTableLookup(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.
sourceReactant.MLIR.API.mlirSymbolTableReplaceAllSymbolUses Method
mlirSymbolTableReplaceAllSymbolUses(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.
sourceReactant.MLIR.API.mlirSymbolTableWalkSymbolTables Method
mlirSymbolTableWalkSymbolTables(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.
Reactant.MLIR.API.mlirTF32TypeGet Method
mlirTF32TypeGet(ctx)
Creates a TF32 type in the given context. The type is owned by the context.
sourceReactant.MLIR.API.mlirTransformApplyNamedSequence Method
mlirTransformApplyNamedSequence(payload, transformRoot, transformModule, transformOptions)
Applies the transformation script starting at the given transform root operation to the given payload operation. The module containing the transform root as well as the transform options should be provided. The transform operation must implement TransformOpInterface and the module must be a ModuleOp. Returns the status of the application.
sourceReactant.MLIR.API.mlirTransformOptionsCreate Method
mlirTransformOptionsCreate()
Creates a default-initialized transform options object.
sourceReactant.MLIR.API.mlirTransformOptionsDestroy Method
mlirTransformOptionsDestroy(transformOptions)
Destroys a transform options object previously created by mlirTransformOptionsCreate
.
Reactant.MLIR.API.mlirTransformOptionsEnableExpensiveChecks Method
mlirTransformOptionsEnableExpensiveChecks(transformOptions, enable)
Enables or disables expensive checks in transform options.
sourceReactant.MLIR.API.mlirTransformOptionsEnforceSingleTopLevelTransformOp Method
mlirTransformOptionsEnforceSingleTopLevelTransformOp(transformOptions, enable)
Enables or disables the enforcement of the top-level transform op being single in transform options.
sourceReactant.MLIR.API.mlirTransformOptionsGetEnforceSingleTopLevelTransformOp Method
mlirTransformOptionsGetEnforceSingleTopLevelTransformOp(transformOptions)
Returns true if the enforcement of the top-level transform op being single is enabled in transform options.
sourceReactant.MLIR.API.mlirTransformOptionsGetExpensiveChecksEnabled Method
mlirTransformOptionsGetExpensiveChecksEnabled(transformOptions)
Returns true if expensive checks are enabled in transform options.
sourceReactant.MLIR.API.mlirTranslateModuleToLLVMIR Method
mlirTranslateModuleToLLVMIR(_module, context)
Translate operation that satisfies LLVM dialect module requirements into an LLVM IR module living in the given context. This translates operations from any dilalect that has a registered implementation of LLVMTranslationDialectInterface.
Returns
the generated LLVM IR Module from the translated MLIR module, it is owned by the caller.
sourceReactant.MLIR.API.mlirTupleTypeGet Method
mlirTupleTypeGet(ctx, numElements, elements)
Creates a tuple type that consists of the given list of elemental types. The type is owned by the context.
sourceReactant.MLIR.API.mlirTupleTypeGetNumTypes Method
mlirTupleTypeGetNumTypes(type)
Returns the number of types contained in a tuple.
sourceReactant.MLIR.API.mlirTupleTypeGetType Method
mlirTupleTypeGetType(type, pos)
Returns the pos-th type in the tuple type.
sourceReactant.MLIR.API.mlirTupleTypeGetTypeID Method
mlirTupleTypeGetTypeID()
Returns the typeID of an Tuple type.
sourceReactant.MLIR.API.mlirTypeAttrGet Method
mlirTypeAttrGet(type)
Creates a type attribute wrapping the given type in the same context as the type.
sourceReactant.MLIR.API.mlirTypeAttrGetTypeID Method
mlirTypeAttrGetTypeID()
Returns the typeID of a Type attribute.
sourceReactant.MLIR.API.mlirTypeAttrGetValue Method
mlirTypeAttrGetValue(attr)
Returns the type stored in the given type attribute.
sourceReactant.MLIR.API.mlirTypeDump Method
mlirTypeDump(type)
Prints the type to the standard error stream.
sourceReactant.MLIR.API.mlirTypeEqual Method
mlirTypeEqual(t1, t2)
Checks if two types are equal.
sourceReactant.MLIR.API.mlirTypeFromLLVMIRTranslatorCreate Method
mlirTypeFromLLVMIRTranslatorCreate(ctx)
Create an LLVM::TypeFromLLVMIRTranslator and transfer ownership to the caller.
sourceReactant.MLIR.API.mlirTypeFromLLVMIRTranslatorDestroy Method
mlirTypeFromLLVMIRTranslatorDestroy(translator)
Takes an LLVM::TypeFromLLVMIRTranslator owned by the caller and destroys it. It is the responsibility of the user to only pass an LLVM::TypeFromLLVMIRTranslator class.
sourceReactant.MLIR.API.mlirTypeFromLLVMIRTranslatorTranslateType Method
mlirTypeFromLLVMIRTranslatorTranslateType(translator, llvmType)
Translates the given LLVM IR type to the MLIR LLVM dialect.
sourceReactant.MLIR.API.mlirTypeGetContext Method
mlirTypeGetContext(type)
Gets the context that a type was created with.
sourceReactant.MLIR.API.mlirTypeGetDialect Method
mlirTypeGetDialect(type)
Gets the dialect a type belongs to.
sourceReactant.MLIR.API.mlirTypeGetTypeID Method
mlirTypeGetTypeID(type)
Gets the type ID of the type.
sourceReactant.MLIR.API.mlirTypeIDAllocatorAllocateTypeID Method
mlirTypeIDAllocatorAllocateTypeID(allocator)
Allocates a type id that is valid for the lifetime of the allocator
sourceReactant.MLIR.API.mlirTypeIDAllocatorCreate Method
mlirTypeIDAllocatorCreate()
Creates a type id allocator for dynamic type id creation
sourceReactant.MLIR.API.mlirTypeIDAllocatorDestroy Method
mlirTypeIDAllocatorDestroy(allocator)
Deallocates the allocator and all allocated type ids
sourceReactant.MLIR.API.mlirTypeIDCreate Method
mlirTypeIDCreate(ptr)
ptr
must be 8 byte aligned and unique to a type valid for the duration of the returned type id's usage
Reactant.MLIR.API.mlirTypeIDEqual Method
mlirTypeIDEqual(typeID1, typeID2)
Checks if two type ids are equal.
sourceReactant.MLIR.API.mlirTypeIDHashValue Method
mlirTypeIDHashValue(typeID)
Returns the hash value of the type id.
sourceReactant.MLIR.API.mlirTypeIDIsNull Method
mlirTypeIDIsNull(typeID)
Checks whether a type id is null.
sourceReactant.MLIR.API.mlirTypeIsAAnyQuantizedType Method
mlirTypeIsAAnyQuantizedType(type)
Returns true
if the given type is an AnyQuantizedType.
Reactant.MLIR.API.mlirTypeIsABF16 Method
mlirTypeIsABF16(type)
Checks whether the given type is a bf16 type.
sourceReactant.MLIR.API.mlirTypeIsACalibratedQuantizedType Method
mlirTypeIsACalibratedQuantizedType(type)
Returns true
if the given type is a CalibratedQuantizedType.
Reactant.MLIR.API.mlirTypeIsAComplex Method
mlirTypeIsAComplex(type)
Checks whether the given type is a Complex type.
sourceReactant.MLIR.API.mlirTypeIsAF16 Method
mlirTypeIsAF16(type)
Checks whether the given type is an f16 type.
sourceReactant.MLIR.API.mlirTypeIsAF32 Method
mlirTypeIsAF32(type)
Checks whether the given type is an f32 type.
sourceReactant.MLIR.API.mlirTypeIsAF64 Method
mlirTypeIsAF64(type)
Checks whether the given type is an f64 type.
sourceReactant.MLIR.API.mlirTypeIsAFloat Method
mlirTypeIsAFloat(type)
Checks whether the given type is a floating-point type.
sourceReactant.MLIR.API.mlirTypeIsAFloat4E2M1FN Method
mlirTypeIsAFloat4E2M1FN(type)
Checks whether the given type is an f4E2M1FN type.
sourceReactant.MLIR.API.mlirTypeIsAFloat6E2M3FN Method
mlirTypeIsAFloat6E2M3FN(type)
Checks whether the given type is an f6E2M3FN type.
sourceReactant.MLIR.API.mlirTypeIsAFloat6E3M2FN Method
mlirTypeIsAFloat6E3M2FN(type)
Checks whether the given type is an f6E3M2FN type.
sourceReactant.MLIR.API.mlirTypeIsAFloat8E3M4 Method
mlirTypeIsAFloat8E3M4(type)
Checks whether the given type is an f8E3M4 type.
sourceReactant.MLIR.API.mlirTypeIsAFloat8E4M3 Method
mlirTypeIsAFloat8E4M3(type)
Checks whether the given type is an f8E4M3 type.
sourceReactant.MLIR.API.mlirTypeIsAFloat8E4M3B11FNUZ Method
mlirTypeIsAFloat8E4M3B11FNUZ(type)
Checks whether the given type is an f8E4M3B11FNUZ type.
sourceReactant.MLIR.API.mlirTypeIsAFloat8E4M3FN Method
mlirTypeIsAFloat8E4M3FN(type)
Checks whether the given type is an f8E4M3FN type.
sourceReactant.MLIR.API.mlirTypeIsAFloat8E4M3FNUZ Method
mlirTypeIsAFloat8E4M3FNUZ(type)
Checks whether the given type is an f8E4M3FNUZ type.
sourceReactant.MLIR.API.mlirTypeIsAFloat8E5M2 Method
mlirTypeIsAFloat8E5M2(type)
Checks whether the given type is an f8E5M2 type.
sourceReactant.MLIR.API.mlirTypeIsAFloat8E5M2FNUZ Method
mlirTypeIsAFloat8E5M2FNUZ(type)
Checks whether the given type is an f8E5M2FNUZ type.
sourceReactant.MLIR.API.mlirTypeIsAFloat8E8M0FNU Method
mlirTypeIsAFloat8E8M0FNU(type)
Checks whether the given type is an f8E8M0FNU type.
sourceReactant.MLIR.API.mlirTypeIsAFunction Method
mlirTypeIsAFunction(type)
Checks whether the given type is a function type.
sourceReactant.MLIR.API.mlirTypeIsAIndex Method
mlirTypeIsAIndex(type)
Checks whether the given type is an index type.
sourceReactant.MLIR.API.mlirTypeIsAInteger Method
mlirTypeIsAInteger(type)
Checks whether the given type is an integer type.
sourceReactant.MLIR.API.mlirTypeIsALLVMPointerType Method
mlirTypeIsALLVMPointerType(type)
Returns true
if the type is an LLVM dialect pointer type.
Reactant.MLIR.API.mlirTypeIsALLVMStructType Method
mlirTypeIsALLVMStructType(type)
Returns true
if the type is an LLVM dialect struct type.
Reactant.MLIR.API.mlirTypeIsAMemRef Method
mlirTypeIsAMemRef(type)
Checks whether the given type is a MemRef type.
sourceReactant.MLIR.API.mlirTypeIsANone Method
mlirTypeIsANone(type)
Checks whether the given type is a None type.
sourceReactant.MLIR.API.mlirTypeIsAOpaque Method
mlirTypeIsAOpaque(type)
Checks whether the given type is an opaque type.
sourceReactant.MLIR.API.mlirTypeIsAQuantizedType Method
mlirTypeIsAQuantizedType(type)
Returns true
if the given type is a quantization dialect type.
Reactant.MLIR.API.mlirTypeIsARankedTensor Method
mlirTypeIsARankedTensor(type)
Checks whether the given type is a ranked tensor type.
sourceReactant.MLIR.API.mlirTypeIsAShaped Method
mlirTypeIsAShaped(type)
Checks whether the given type is a Shaped type.
sourceReactant.MLIR.API.mlirTypeIsATF32 Method
mlirTypeIsATF32(type)
Checks whether the given type is an TF32 type.
sourceReactant.MLIR.API.mlirTypeIsATensor Method
mlirTypeIsATensor(type)
Checks whether the given type is a Tensor type.
sourceReactant.MLIR.API.mlirTypeIsATuple Method
mlirTypeIsATuple(type)
Checks whether the given type is a tuple type.
sourceReactant.MLIR.API.mlirTypeIsAUniformQuantizedPerAxisType Method
mlirTypeIsAUniformQuantizedPerAxisType(type)
Returns true
if the given type is a UniformQuantizedPerAxisType.
Reactant.MLIR.API.mlirTypeIsAUniformQuantizedType Method
mlirTypeIsAUniformQuantizedType(type)
Returns true
if the given type is a UniformQuantizedType.
Reactant.MLIR.API.mlirTypeIsAUnrankedMemRef Method
mlirTypeIsAUnrankedMemRef(type)
Checks whether the given type is an UnrankedMemRef type.
sourceReactant.MLIR.API.mlirTypeIsAUnrankedTensor Method
mlirTypeIsAUnrankedTensor(type)
Checks whether the given type is an unranked tensor type.
sourceReactant.MLIR.API.mlirTypeIsAVector Method
mlirTypeIsAVector(type)
Checks whether the given type is a Vector type.
sourceReactant.MLIR.API.mlirTypeIsNull Method
mlirTypeIsNull(type)
Checks whether a type is null.
sourceReactant.MLIR.API.mlirTypeParseGet Method
mlirTypeParseGet(context, type)
Parses a type. The type is owned by the context.
sourceReactant.MLIR.API.mlirTypePrint Method
mlirTypePrint(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.
Reactant.MLIR.API.mlirTypeToLLVMIRTranslatorCreate Method
mlirTypeToLLVMIRTranslatorCreate(ctx)
Create an LLVM::TypeToLLVMIRTranslator and transfer ownership to the caller.
sourceReactant.MLIR.API.mlirTypeToLLVMIRTranslatorDestroy Method
mlirTypeToLLVMIRTranslatorDestroy(translator)
Takes an LLVM::TypeToLLVMIRTranslator owned by the caller and destroys it. It is the responsibility of the user to only pass an LLVM::TypeToLLVMIRTranslator class.
sourceReactant.MLIR.API.mlirTypeToLLVMIRTranslatorTranslateType Method
mlirTypeToLLVMIRTranslatorTranslateType(translator, mlirType)
Translates the given MLIR LLVM dialect to the LLVM IR type.
sourceReactant.MLIR.API.mlirUniformQuantizedPerAxisTypeGet Method
mlirUniformQuantizedPerAxisTypeGet(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.
Reactant.MLIR.API.mlirUniformQuantizedPerAxisTypeGetNumDims Method
mlirUniformQuantizedPerAxisTypeGetNumDims(type)
Returns the number of axes in the given quantized per-axis type.
sourceReactant.MLIR.API.mlirUniformQuantizedPerAxisTypeGetQuantizedDimension Method
mlirUniformQuantizedPerAxisTypeGetQuantizedDimension(type)
Returns the index of the quantized dimension in the given quantized per-axis type.
sourceReactant.MLIR.API.mlirUniformQuantizedPerAxisTypeGetScale Method
mlirUniformQuantizedPerAxisTypeGetScale(type, pos)
Returns pos
-th scale of the given quantized per-axis type.
Reactant.MLIR.API.mlirUniformQuantizedPerAxisTypeGetZeroPoint Method
mlirUniformQuantizedPerAxisTypeGetZeroPoint(type, pos)
Returns pos
-th zero point of the given quantized per-axis type.
Reactant.MLIR.API.mlirUniformQuantizedPerAxisTypeIsFixedPoint Method
mlirUniformQuantizedPerAxisTypeIsFixedPoint(type)
Returns true
if the given uniform quantized per-axis type is fixed-point.
Reactant.MLIR.API.mlirUniformQuantizedTypeGet Method
mlirUniformQuantizedTypeGet(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.
Reactant.MLIR.API.mlirUniformQuantizedTypeGetScale Method
mlirUniformQuantizedTypeGetScale(type)
Returns the scale of the given uniform quantized type.
sourceReactant.MLIR.API.mlirUniformQuantizedTypeGetZeroPoint Method
mlirUniformQuantizedTypeGetZeroPoint(type)
Returns the zero point of the given uniform quantized type.
sourceReactant.MLIR.API.mlirUniformQuantizedTypeIsFixedPoint Method
mlirUniformQuantizedTypeIsFixedPoint(type)
Returns true
if the given uniform quantized type is fixed-point.
Reactant.MLIR.API.mlirUnitAttrGet Method
mlirUnitAttrGet(ctx)
Creates a unit attribute in the given context.
sourceReactant.MLIR.API.mlirUnitAttrGetTypeID Method
mlirUnitAttrGetTypeID()
Returns the typeID of a Unit attribute.
sourceReactant.MLIR.API.mlirUnmanagedDenseResourceElementsAttrGet Method
mlirUnmanagedDenseResourceElementsAttrGet(shapedType, name, data, dataLength, dataAlignment, dataIsMutable, deleter, userData)
Unlike the typed accessors below, constructs the attribute with a raw data buffer and no type/alignment checking. Use a more strongly typed accessor if possible. If dataIsMutable is false, then an immutable AsmResourceBlob will be created and that passed data contents will be treated as const. If the deleter is non NULL, then it will be called when the data buffer can no longer be accessed (passing userData to it).
sourceReactant.MLIR.API.mlirUnrankedMemRefTypeGet Method
mlirUnrankedMemRefTypeGet(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.
sourceReactant.MLIR.API.mlirUnrankedMemRefTypeGetChecked Method
mlirUnrankedMemRefTypeGetChecked(loc, elementType, memorySpace)
Same as "mlirUnrankedMemRefTypeGet
" but returns a nullptr wrapping MlirType
on illegal arguments, emitting appropriate diagnostics.
Reactant.MLIR.API.mlirUnrankedMemRefTypeGetTypeID Method
mlirUnrankedMemRefTypeGetTypeID()
Returns the typeID of an UnrankedMemRef type.
sourceReactant.MLIR.API.mlirUnrankedMemrefGetMemorySpace Method
mlirUnrankedMemrefGetMemorySpace(type)
Returns the memory spcae of the given Unranked MemRef type.
sourceReactant.MLIR.API.mlirUnrankedTensorTypeGet Method
mlirUnrankedTensorTypeGet(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.
sourceReactant.MLIR.API.mlirUnrankedTensorTypeGetChecked Method
mlirUnrankedTensorTypeGetChecked(loc, elementType)
Same as "mlirUnrankedTensorTypeGet
" but returns a nullptr wrapping MlirType
on illegal arguments, emitting appropriate diagnostics.
Reactant.MLIR.API.mlirUnrankedTensorTypeGetTypeID Method
mlirUnrankedTensorTypeGetTypeID()
Returns the typeID of an UnrankedTensor type.
sourceReactant.MLIR.API.mlirValueDump Method
mlirValueDump(value)
Prints the value to the standard error stream.
sourceReactant.MLIR.API.mlirValueEqual Method
mlirValueEqual(value1, value2)
Returns 1 if two values are equal, 0 otherwise.
sourceReactant.MLIR.API.mlirValueGetFirstUse Method
mlirValueGetFirstUse(value)
Returns an op operand representing the first use of the value, or a null op operand if there are no uses.
sourceReactant.MLIR.API.mlirValueGetType Method
mlirValueGetType(value)
Returns the type of the value.
sourceReactant.MLIR.API.mlirValueIsABlockArgument Method
mlirValueIsABlockArgument(value)
Returns 1 if the value is a block argument, 0 otherwise.
sourceReactant.MLIR.API.mlirValueIsAOpResult Method
mlirValueIsAOpResult(value)
Returns 1 if the value is an operation result, 0 otherwise.
sourceReactant.MLIR.API.mlirValueIsNull Method
mlirValueIsNull(value)
Returns whether the value is null.
sourceReactant.MLIR.API.mlirValuePrint Method
mlirValuePrint(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.
Reactant.MLIR.API.mlirValuePrintAsOperand Method
mlirValuePrintAsOperand(value, state, callback, userData)
Prints a value as an operand (i.e., the ValueID).
sourceReactant.MLIR.API.mlirValueReplaceAllUsesExcept Method
mlirValueReplaceAllUsesExcept(of, with, numExceptions, exceptions)
Replace all uses of 'of' value with 'with' value, updating anything in the IR that uses 'of' to use 'with' instead, except if the user is listed in 'exceptions'. The 'exceptions' parameter is an array of MlirOperation
pointers with a length of 'numExceptions'.
Reactant.MLIR.API.mlirValueReplaceAllUsesOfWith Method
mlirValueReplaceAllUsesOfWith(of, with)
Replace all uses of 'of' value with the 'with' value, updating anything in the IR that uses 'of' to use the other value instead. When this returns there are zero uses of 'of'.
sourceReactant.MLIR.API.mlirValueSetType Method
mlirValueSetType(value, type)
Set the type of the value.
sourceReactant.MLIR.API.mlirVectorTypeGet Method
mlirVectorTypeGet(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.
sourceReactant.MLIR.API.mlirVectorTypeGetChecked Method
mlirVectorTypeGetChecked(loc, rank, shape, elementType)
Same as "mlirVectorTypeGet
" but returns a nullptr wrapping MlirType
on illegal arguments, emitting appropriate diagnostics.
Reactant.MLIR.API.mlirVectorTypeGetScalable Method
mlirVectorTypeGetScalable(rank, shape, scalable, elementType)
Creates a scalable vector type with the shape identified by its rank and dimensions. A subset of dimensions may be marked as scalable via the corresponding flag list, which is expected to have as many entries as the rank of the vector. The vector is created in the same context as the element type.
sourceReactant.MLIR.API.mlirVectorTypeGetScalableChecked Method
mlirVectorTypeGetScalableChecked(loc, rank, shape, scalable, elementType)
Same as "mlirVectorTypeGetScalable
" but returns a nullptr wrapping MlirType
on illegal arguments, emitting appropriate diagnostics.
Reactant.MLIR.API.mlirVectorTypeGetTypeID Method
mlirVectorTypeGetTypeID()
Returns the typeID of an Vector type.
sourceReactant.MLIR.API.mlirVectorTypeIsDimScalable Method
mlirVectorTypeIsDimScalable(type, dim)
Checks whether the "dim"-th dimension of the given vector is scalable.
sourceReactant.MLIR.API.mlirVectorTypeIsScalable Method
mlirVectorTypeIsScalable(type)
Checks whether the given vector type is scalable, i.e., has at least one scalable dimension.
source