tvm_tirx.script.ir_builder

tvm_tirx.script.ir_builder#

Shared TVMScript construction APIs and lazy language variant builders.

Classes#

AlreadyEmitted(value)

Hold the exact native result of an already emitted builder operation.

IRBuilder()

A shared construction context for any language variant's IR.

IRModuleFrame(loc, global_vars, functions, ...)

Functions#

at_(loc, value)

Attach source context to the same IR node, emission receipt, or frame.

resolve_global_info_args(*fields, resolver)

Resolve selected string arguments before calling a builder operation.

with_at_group_(location, thunk, *[, ...])

Evaluate once under a location, optionally attaching it to the same result.

Lambda(parameter_types, function, *[, ret_type])

Build a shared staging lambda from explicit types and a Python callable.

constexpr(value)

Mark host control syntax or a JIT specialization annotation.

dtype(value)

Construct a tvm_ffi.dtype-valued constant for an ordinary operation argument.

dynamic(name[, dtype, loc])

Create a fresh primitive symbolic variable, independently of builder scope.

meta_var(value)

Return a Python metadata value without binding, naming or relocating it.

module_attrs(attrs[, allow_overwrite])

Specify the attrs of the ir_module frame.

module_get_attr(attr_key)

Get the specified attr of the ir_module frame.

module_global_infos(global_infos)

Specify the global infos of the ir_module frame.

module_set_attr(attr_key, attr_value[, ...])

Set the specified attr of the ir_module frame.

decl_function(func_name, func_signature)

Register a function signature or a completed function in the active module.

ir_module()

Start a ir_module frame.

module_member_(name, value)

Register a concrete function member or retain ordinary class setup.

resolve_global_info_(content)

Resolve a named global-info selector in the current module context.

Alias

Canonical API

make_node

tvm_tirx.ir.make_node

Namespaces#