Builtin
builtin
¶
BuiltinFunctions
dataclass
¶
Bases: InterpreterFunctions
Source code in xdsl/interpreters/builtin.py
run_cast(interpreter: Interpreter, op: UnrealizedConversionCastOp, args: tuple[Any, ...])
¶
Source code in xdsl/interpreters/builtin.py
float_attr_value(interpreter: Interpreter, attr: Attribute, attr_type: AnyFloat) -> FloatAttr
¶
integer_attr_value(interpreter: Interpreter, attr: Attribute, attr_type: IntegerType) -> IntegerAttr
¶
index_attr_value(interpreter: Interpreter, attr: Attribute, attr_type: builtin.IndexType) -> IntegerAttr[IntegerType]
¶
Source code in xdsl/interpreters/builtin.py
dense_int_or_fp_elements_value(interpreter: Interpreter, attr: Attribute, type_attr: builtin.MemRefType[Any]) -> ShapedArray[Any]
¶
Source code in xdsl/interpreters/builtin.py
scalar_attr(value: int | float, value_type: Attribute, index_bitwidth: Literal[32, 64]) -> IntegerAttr[IntegerType] | FloatAttr
¶
Wrap a numeric storage value or computation result as a runtime scalar.
Source code in xdsl/interpreters/builtin.py
xtype_for_el_type(el_type: Attribute, index_bitwidth: Literal[32, 64]) -> PackableType[Any]
¶
Returns the datatype to use during interpretation for a given value.
For index, uses either i32 or i64, depending on the index_bitwidth.
For all other types returns the input, as long as it's a subclass of
PackableType, raising an error otherwise.