tvm_tirx.tirx.script

tvm_tirx.tirx.script#

Public canonical TVMScript dialect namespace.

Classes#

Optional

LetAnnotation([type_spec])

Marker for an immutable Bind, created by T.let or T.let[type].

Alias

Canonical API

Bind

tvm_tirx.ir.Bind

Call

tvm_tirx.ir.Call

DataTypeImm

tvm_tirx.ir.DataTypeImm

FuncType

tvm_tirx.ir.FuncType

GenericConst

tvm_tirx.ir.GenericConst

MissingType

tvm_tirx.ir.MissingType

Op

tvm_tirx.ir.Op

PrimType

tvm_tirx.ir.PrimType

Range

tvm_tirx.ir.Range

StringImm

tvm_tirx.ir.StringImm

StringType

tvm_tirx.ir.StringType

TensorRegion

tvm_tirx.ir.TensorRegion

TensorRegionType

tvm_tirx.ir.TensorRegionType

Type

tvm_tirx.ir.Type

Var

tvm_tirx.ir.Var

AlreadyEmitted

tvm_tirx.script.ir_builder.AlreadyEmitted

IRBuilder

tvm_tirx.script.ir_builder.IRBuilder

IRModuleFrame

tvm_tirx.script.ir_builder.IRModuleFrame

Missing

tvm_tirx.ir.MissingType

NoneType

tvm_tirx.ir.NoneType

Any

tvm_tirx.ir.AnyType

Opaque

tvm_tirx.ir.OpaqueType

Prim

tvm_tirx.ir.PrimType

String

tvm_tirx.ir.StringType

Ptr

tvm_tirx.ir.PtrType

Func

tvm_tirx.ir.FuncType

FloatImm

tvm_tirx.ir.FloatImm

IntImm

tvm_tirx.ir.IntImm

TensorLoad

tvm_tirx.ir.TensorLoad

MemoryScope

tvm_tirx.runtime.MemoryScope

Axis

tvm_tirx.tirx.layout.Axis

ComposeLayout

tvm_tirx.tirx.ComposeLayout

Iter

tvm_tirx.tirx.layout.Iter

Layout

tvm_tirx.tirx.Layout

TileLayout

tvm_tirx.tirx.TileLayout

ThreadScope

tvm_tirx.tirx.ThreadScope

TensorMap

tvm_tirx.tirx.TensorMapType

Tensor

tvm_tirx.tirx.TensorType

CallEffectKind

tvm_tirx.ir.CallEffectKind

Broadcast

tvm_tirx.ir.prim.Broadcast

Ramp

tvm_tirx.ir.prim.Ramp

Shuffle

tvm_tirx.ir.prim.Shuffle

EQ

tvm_tirx.ir.prim.EQ

GE

tvm_tirx.ir.prim.GE

GT

tvm_tirx.ir.prim.GT

LE

tvm_tirx.ir.prim.LE

LT

tvm_tirx.ir.prim.LT

NE

tvm_tirx.ir.prim.NE

Add

tvm_tirx.ir.prim.Add

And

tvm_tirx.ir.prim.And

BitwiseAnd

tvm_tirx.ir.prim.BitwiseAnd

BitwiseNot

tvm_tirx.ir.prim.BitwiseNot

BitwiseOr

tvm_tirx.ir.prim.BitwiseOr

BitwiseXor

tvm_tirx.ir.prim.BitwiseXor

Cast

tvm_tirx.ir.prim.Cast

Div

tvm_tirx.ir.prim.Div

FloorDiv

tvm_tirx.ir.prim.FloorDiv

FloorMod

tvm_tirx.ir.prim.FloorMod

LShift

tvm_tirx.ir.prim.LShift

Max

tvm_tirx.ir.prim.Max

Min

tvm_tirx.ir.prim.Min

Mod

tvm_tirx.ir.prim.Mod

Mul

tvm_tirx.ir.prim.Mul

Not

tvm_tirx.ir.prim.Not

Or

tvm_tirx.ir.prim.Or

RShift

tvm_tirx.ir.prim.RShift

Select

tvm_tirx.ir.prim.Select

Sub

tvm_tirx.ir.prim.Sub

CallFFIKernelAttr

tvm_tirx.tirx.CallFFIKernelAttr

broadcast

tvm_tirx.ir.prim.Broadcast

ramp

tvm_tirx.ir.prim.Ramp

Functions#

Tuple(*fields)

Construct a tuple type for a TIRx function or binding annotation.

resolve_global_info_(content)

Implements tvm_tirx.script.ir_builder.parser_protocol.resolve_global_info_().

alloc_tensor([placement, attrs, ...])

Allocate the tensor described by one explicit Tensor type argument.

decl_tensor(data, *, ty_args[, attrs, loc, ty])

Declare a pointer-backed tensor with one explicit Tensor type argument.

alloc_shared(shape[, dtype, data, scope, ...])

Emit a tensor allocation and return its bound variable in a receipt.

alloc_local(shape[, dtype, data, scope, ...])

Emit a tensor allocation and return its bound variable in a receipt.

tmem(shape[, dtype, data, scope, align, ...])

Emit a tensor allocation and return its bound variable in a receipt.

alloc_scalar([dtype, scope, annotations])

Allocate a zero-dimensional tensor (scalar), with optional allocation annotations.

decl_scalar(dtype, data, scope[, layout])

Declare a zero-dimensional tensor (scalar) from a pointer.

shared_scalar([dtype, annotations])

Allocate a zero-dimensional tensor in shared memory.

local_scalar([dtype, init, name, annotations])

Allocate scalar local storage, optionally naming and initializing it.

assign(dst, value)

Store a value into scalar storage and return its emission receipt.

static_assert(x[, message])

int8x2

A primitive scalar or vector data type, including the void sentinel.

int16x2

A primitive scalar or vector data type, including the void sentinel.

int32x2

A primitive scalar or vector data type, including the void sentinel.

int64x2

A primitive scalar or vector data type, including the void sentinel.

int8x4

A primitive scalar or vector data type, including the void sentinel.

int16x4

A primitive scalar or vector data type, including the void sentinel.

int32x4

A primitive scalar or vector data type, including the void sentinel.

int64x4

A primitive scalar or vector data type, including the void sentinel.

int8x8

A primitive scalar or vector data type, including the void sentinel.

int16x8

A primitive scalar or vector data type, including the void sentinel.

int32x8

A primitive scalar or vector data type, including the void sentinel.

int64x8

A primitive scalar or vector data type, including the void sentinel.

int8x16

A primitive scalar or vector data type, including the void sentinel.

int16x16

A primitive scalar or vector data type, including the void sentinel.

int32x16

A primitive scalar or vector data type, including the void sentinel.

int64x16

A primitive scalar or vector data type, including the void sentinel.

int8x32

A primitive scalar or vector data type, including the void sentinel.

int16x32

A primitive scalar or vector data type, including the void sentinel.

int32x32

A primitive scalar or vector data type, including the void sentinel.

int64x32

A primitive scalar or vector data type, including the void sentinel.

int8x64

A primitive scalar or vector data type, including the void sentinel.

int16x64

A primitive scalar or vector data type, including the void sentinel.

int32x64

A primitive scalar or vector data type, including the void sentinel.

int64x64

A primitive scalar or vector data type, including the void sentinel.

uint8x2

A primitive scalar or vector data type, including the void sentinel.

uint16x2

A primitive scalar or vector data type, including the void sentinel.

uint32x2

A primitive scalar or vector data type, including the void sentinel.

uint64x2

A primitive scalar or vector data type, including the void sentinel.

uint8x4

A primitive scalar or vector data type, including the void sentinel.

uint16x4

A primitive scalar or vector data type, including the void sentinel.

uint32x4

A primitive scalar or vector data type, including the void sentinel.

uint64x4

A primitive scalar or vector data type, including the void sentinel.

uint8x8

A primitive scalar or vector data type, including the void sentinel.

uint16x8

A primitive scalar or vector data type, including the void sentinel.

uint32x8

A primitive scalar or vector data type, including the void sentinel.

uint64x8

A primitive scalar or vector data type, including the void sentinel.

uint8x16

A primitive scalar or vector data type, including the void sentinel.

uint16x16

A primitive scalar or vector data type, including the void sentinel.

uint32x16

A primitive scalar or vector data type, including the void sentinel.

uint64x16

A primitive scalar or vector data type, including the void sentinel.

uint8x32

A primitive scalar or vector data type, including the void sentinel.

uint16x32

A primitive scalar or vector data type, including the void sentinel.

uint32x32

A primitive scalar or vector data type, including the void sentinel.

uint64x32

A primitive scalar or vector data type, including the void sentinel.

uint8x64

A primitive scalar or vector data type, including the void sentinel.

uint16x64

A primitive scalar or vector data type, including the void sentinel.

uint32x64

A primitive scalar or vector data type, including the void sentinel.

uint64x64

A primitive scalar or vector data type, including the void sentinel.

float16x2

A primitive scalar or vector data type, including the void sentinel.

float32x2

A primitive scalar or vector data type, including the void sentinel.

float64x2

A primitive scalar or vector data type, including the void sentinel.

float16x4

A primitive scalar or vector data type, including the void sentinel.

float32x4

A primitive scalar or vector data type, including the void sentinel.

float64x4

A primitive scalar or vector data type, including the void sentinel.

float16x8

A primitive scalar or vector data type, including the void sentinel.

float32x8

A primitive scalar or vector data type, including the void sentinel.

float64x8

A primitive scalar or vector data type, including the void sentinel.

float16x16

A primitive scalar or vector data type, including the void sentinel.

float32x16

A primitive scalar or vector data type, including the void sentinel.

float64x16

A primitive scalar or vector data type, including the void sentinel.

float16x32

A primitive scalar or vector data type, including the void sentinel.

float32x32

A primitive scalar or vector data type, including the void sentinel.

float64x32

A primitive scalar or vector data type, including the void sentinel.

float16x64

A primitive scalar or vector data type, including the void sentinel.

float32x64

A primitive scalar or vector data type, including the void sentinel.

float64x64

A primitive scalar or vector data type, including the void sentinel.

float8_e3m4

A primitive scalar or vector data type, including the void sentinel.

float8_e3m4x2

A primitive scalar or vector data type, including the void sentinel.

float8_e3m4x4

A primitive scalar or vector data type, including the void sentinel.

float8_e3m4x8

A primitive scalar or vector data type, including the void sentinel.

float8_e3m4x16

A primitive scalar or vector data type, including the void sentinel.

float8_e3m4x32

A primitive scalar or vector data type, including the void sentinel.

float8_e3m4x64

A primitive scalar or vector data type, including the void sentinel.

float8_e4m3

A primitive scalar or vector data type, including the void sentinel.

float8_e4m3x2

A primitive scalar or vector data type, including the void sentinel.

float8_e4m3x4

A primitive scalar or vector data type, including the void sentinel.

float8_e4m3x8

A primitive scalar or vector data type, including the void sentinel.

float8_e4m3x16

A primitive scalar or vector data type, including the void sentinel.

float8_e4m3x32

A primitive scalar or vector data type, including the void sentinel.

float8_e4m3x64

A primitive scalar or vector data type, including the void sentinel.

float8_e4m3b11fnuz

A primitive scalar or vector data type, including the void sentinel.

float8_e4m3b11fnuzx2

A primitive scalar or vector data type, including the void sentinel.

float8_e4m3b11fnuzx4

A primitive scalar or vector data type, including the void sentinel.

float8_e4m3b11fnuzx8

A primitive scalar or vector data type, including the void sentinel.

float8_e4m3b11fnuzx16

A primitive scalar or vector data type, including the void sentinel.

float8_e4m3b11fnuzx32

A primitive scalar or vector data type, including the void sentinel.

float8_e4m3b11fnuzx64

A primitive scalar or vector data type, including the void sentinel.

float8_e4m3fn

A primitive scalar or vector data type, including the void sentinel.

float8_e4m3fnx2

A primitive scalar or vector data type, including the void sentinel.

float8_e4m3fnx4

A primitive scalar or vector data type, including the void sentinel.

float8_e4m3fnx8

A primitive scalar or vector data type, including the void sentinel.

float8_e4m3fnx16

A primitive scalar or vector data type, including the void sentinel.

float8_e4m3fnx32

A primitive scalar or vector data type, including the void sentinel.

float8_e4m3fnx64

A primitive scalar or vector data type, including the void sentinel.

float8_e4m3fnuz

A primitive scalar or vector data type, including the void sentinel.

float8_e4m3fnuzx2

A primitive scalar or vector data type, including the void sentinel.

float8_e4m3fnuzx4

A primitive scalar or vector data type, including the void sentinel.

float8_e4m3fnuzx8

A primitive scalar or vector data type, including the void sentinel.

float8_e4m3fnuzx16

A primitive scalar or vector data type, including the void sentinel.

float8_e4m3fnuzx32

A primitive scalar or vector data type, including the void sentinel.

float8_e4m3fnuzx64

A primitive scalar or vector data type, including the void sentinel.

float8_e5m2

A primitive scalar or vector data type, including the void sentinel.

float8_e5m2x2

A primitive scalar or vector data type, including the void sentinel.

float8_e5m2x4

A primitive scalar or vector data type, including the void sentinel.

float8_e5m2x8

A primitive scalar or vector data type, including the void sentinel.

float8_e5m2x16

A primitive scalar or vector data type, including the void sentinel.

float8_e5m2x32

A primitive scalar or vector data type, including the void sentinel.

float8_e5m2x64

A primitive scalar or vector data type, including the void sentinel.

float8_e5m2fnuz

A primitive scalar or vector data type, including the void sentinel.

float8_e5m2fnuzx2

A primitive scalar or vector data type, including the void sentinel.

float8_e5m2fnuzx4

A primitive scalar or vector data type, including the void sentinel.

float8_e5m2fnuzx8

A primitive scalar or vector data type, including the void sentinel.

float8_e5m2fnuzx16

A primitive scalar or vector data type, including the void sentinel.

float8_e5m2fnuzx32

A primitive scalar or vector data type, including the void sentinel.

float8_e5m2fnuzx64

A primitive scalar or vector data type, including the void sentinel.

float8_e8m0fnu

A primitive scalar or vector data type, including the void sentinel.

float8_e8m0fnux2

A primitive scalar or vector data type, including the void sentinel.

float8_e8m0fnux4

A primitive scalar or vector data type, including the void sentinel.

float8_e8m0fnux8

A primitive scalar or vector data type, including the void sentinel.

float8_e8m0fnux16

A primitive scalar or vector data type, including the void sentinel.

float8_e8m0fnux32

A primitive scalar or vector data type, including the void sentinel.

float8_e8m0fnux64

A primitive scalar or vector data type, including the void sentinel.

float6_e2m3fn

A primitive scalar or vector data type, including the void sentinel.

float6_e2m3fnx2

A primitive scalar or vector data type, including the void sentinel.

float6_e2m3fnx4

A primitive scalar or vector data type, including the void sentinel.

float6_e2m3fnx8

A primitive scalar or vector data type, including the void sentinel.

float6_e2m3fnx16

A primitive scalar or vector data type, including the void sentinel.

float6_e2m3fnx32

A primitive scalar or vector data type, including the void sentinel.

float6_e2m3fnx64

A primitive scalar or vector data type, including the void sentinel.

float6_e3m2fn

A primitive scalar or vector data type, including the void sentinel.

float6_e3m2fnx2

A primitive scalar or vector data type, including the void sentinel.

float6_e3m2fnx4

A primitive scalar or vector data type, including the void sentinel.

float6_e3m2fnx8

A primitive scalar or vector data type, including the void sentinel.

float6_e3m2fnx16

A primitive scalar or vector data type, including the void sentinel.

float6_e3m2fnx32

A primitive scalar or vector data type, including the void sentinel.

float6_e3m2fnx64

A primitive scalar or vector data type, including the void sentinel.

float4_e2m1fn

A primitive scalar or vector data type, including the void sentinel.

float4_e2m1fnx2

A primitive scalar or vector data type, including the void sentinel.

float4_e2m1fnx4

A primitive scalar or vector data type, including the void sentinel.

float4_e2m1fnx8

A primitive scalar or vector data type, including the void sentinel.

float4_e2m1fnx16

A primitive scalar or vector data type, including the void sentinel.

float4_e2m1fnx32

A primitive scalar or vector data type, including the void sentinel.

float4_e2m1fnx64

A primitive scalar or vector data type, including the void sentinel.

f16

A primitive scalar or vector data type, including the void sentinel.

f32

A primitive scalar or vector data type, including the void sentinel.

f64

A primitive scalar or vector data type, including the void sentinel.

bf16

A primitive scalar or vector data type, including the void sentinel.

i8

A primitive scalar or vector data type, including the void sentinel.

i16

A primitive scalar or vector data type, including the void sentinel.

i32

A primitive scalar or vector data type, including the void sentinel.

i64

A primitive scalar or vector data type, including the void sentinel.

u8

A primitive scalar or vector data type, including the void sentinel.

u16

A primitive scalar or vector data type, including the void sentinel.

u32

A primitive scalar or vector data type, including the void sentinel.

u64

A primitive scalar or vector data type, including the void sentinel.

handle([dtype, storage_scope])

Create a TIR var that represents a pointer.

void

A primitive scalar or vector data type, including the void sentinel.

ptr(dtype[, storage_scope])

The pointer declaration function.

index_map(mapping, *[, inverse_index_map, ...])

Create a TIR Index mapping

target(target_config[, host])

Create a target

meta_class(cls)

Decorator for utility classes used inside @T.function.

bool

A primitive scalar or vector data type, including the void sentinel.

call_kernel(kernel, launch_args, *args, **kwargs)

Call an external kernel.

cast(value[, dtype, ty, loc])

Cast an expression to the requested data type.

Let(expr, where)

Create a Let expression binding

min(a, b[, loc])

Compute the minimum value of two expressions.

max(a, b[, loc])

Compute the maximum value of two expressions.

register_script_namespace(name, namespace)

Bind an explicit construction namespace to T and its builder aliases.

expose_script_op(name)

Select a completed Op and publish it to declared API destinations.

expose_script_type(type_key)

Select a completed Type and publish it to declared API destinations.

abs(x[, loc])

Get absolute value of the input element-wise.

acos(x, *[, ty, loc])

Take acos of input x.

acosh(x, *[, ty, loc])

Take acos of input x.

address_of(obj[, loc, ty])

Returns the address of a tensor element or addressable variable.

atomic_add(*args[, attrs, ty_args, loc, ty])

Construct a call to tirx.atomic_add.

call_spirv_pure_glsl450(*args[, attrs, ...])

Construct a call to tirx.call_spirv_pure_glsl450.

device_scope(*args[, attrs, ty_args, loc, ty])

Internal host/device splitting boundary.

prefetch(*args[, attrs, ty_args, loc, ty])

Construct a call to tirx.prefetch.

static_handle(*args[, attrs, ty_args, loc, ty])

Construct a call to tirx.static_handle.

asin(x, *[, ty, loc])

Take asin of input x.

asinh(x, *[, ty, loc])

Take asinh of input x.

atan(x, *[, ty, loc])

Take atan of input x.

atan2(x1, x2, *[, ty, loc])

Take arctan2(x1, x2).

atanh(x, *[, ty, loc])

Take atanh of input x.

bitwise_and(x, y[, loc])

Take bitwise and of two values

bitwise_not(x[, loc])

Take bitwise not of input value

bitwise_or(x, y[, loc])

Take bitwise or of two values

bitwise_xor(x, y[, loc])

Take bitwise xor of two values

ceil(*args[, attrs, ty_args, loc, ty])

Construct a call to prim.ceil.

clz(*args[, attrs, ty_args, loc, ty])

Construct a call to prim.clz.

copysign(x1, x2, *[, ty, loc])

Change the sign of x1 to that of x2, element-wise.

cos(x, *[, ty, loc])

Take cos of input x.

cosh(x, *[, ty, loc])

Take cosh of input x.

erf(x, *[, ty, loc])

Take gauss error function of the input x.

exp(x, *[, ty, loc])

Take exponential of input x.

exp2(x, *[, ty, loc])

Calculate 2**x

exp10(x, *[, ty, loc])

Calculate 10**x

gpu_thread_filter(var, pred, *[, loc, ty])

Thread-set filter escape hatch.

gpu_active_thread_selector(var, pred[, loc, ty])

Analysis-only active-thread selector.

floor(*args[, attrs, ty_args, loc, ty])

Construct a call to prim.floor.

ceildiv(lhs, rhs[, loc])

Generic ceildiv operator.

floordiv(a, b[, loc])

Compute the floordiv of two expressions.

floormod(a, b[, loc])

Compute the floormod of two expressions.

fmod(x, y, *[, ty, loc])

Return the remainder of x divided by y with the same sign as x.

fma(x, y, z, *[, ty, loc])

Take fused multiply-add of input x, y, z.

hypot(x1, x2, *[, ty, loc])

Equivalent to sqrt(x1**2 + x2**2), element-wise.

if_then_else(*args[, attrs, ty_args, loc, ty])

Construct a call to prim.if_then_else.

infinity(*, ty[, loc])

infinity value of ty

isfinite(x[, loc])

Check if input value is finite.

isinf(x[, loc])

Check if input value is infinite.

isnan(x[, loc, ty])

Check if input value is Nan.

isnullptr(x[, loc, ty])

Check if input value is nullptr.

ldexp(x1, x2, *[, ty, loc])

Returns x1 * (2 ** x2).

likely(*args[, attrs, ty_args, loc, ty])

Construct a call to prim.likely.

log(x, *[, ty, loc])

Take log of input x.

log1p(x, *[, ty, loc])

Take log(x + 1) with respect to input x.

log2(x, *[, ty, loc])

Take log2 of input x.

log10(x, *[, ty, loc])

Take log10 of input x.

max_value(*, ty[, loc])

maximum value of ty

min_value(*, ty[, loc])

minimum value of ty

nearbyint(*args[, attrs, ty_args, loc, ty])

Construct a call to prim.nearbyint.

nextafter(x1, x2, *[, ty, loc])

Return the next floating-point value after x1 towards x2.

popcount(x, *[, ty, loc])

Count the number of set bits in input x.

pow(*args[, attrs, ty_args, loc, ty])

Construct a call to prim.pow.

round(*args[, attrs, ty_args, loc, ty])

Construct a call to prim.round.

rsqrt(x, *[, ty, loc])

Take reciprocal of square root of input x.

shift_left(x, y[, loc])

Return the result of x left shifted by y bits.

shift_right(x, y[, loc])

Return the result of x right shifted by y bits.

sigmoid(x, *[, ty, loc])

Quick function to get sigmoid

sin(x, *[, ty, loc])

Take sin of input x.

sinh(x, *[, ty, loc])

Take sinh of input x.

sqrt(x, *[, ty, loc])

Take square root of input x.

tan(x, *[, ty, loc])

Take tan of input x.

tanh(x, *[, ty, loc])

Take hyperbolic tanh of input x.

gpu_thread_return(*[, ty, loc])

Return from the current GPU thread without a function value.

trunc(*args[, attrs, ty_args, loc, ty])

Construct a call to prim.trunc.

truncdiv(a, b[, loc])

Compute the truncdiv of two expressions.

truncmod(a, b[, loc])

Compute the truncmod of two expressions.

ptr_byte_offset(data, byte_offset, *, ty[, loc])

Return data + byte_offset with pointer type ty.

throw_last_error(*[, ty, loc])

Throw TVMGetLastError()

stack_alloca(dtype_str, num, *[, ty, loc])

Return new on stack dtype[num]

stack_make_shape(*args[, ty, loc])

Allocate a shape tuple on stack, return the handle

stack_make_dltensor(data, shape, strides, ...)

Allocate a Tensor(DLTensor) on stack, return the handle

call_packed(*args[, loc, ty])

Build expression by call an external packed function.

call_ffi_kernel(*args[, launch])

Call a kernel with a CUDA LaunchConfig, or read a printed low-level call.

call_cpacked(*args[, loc, ty])

Build expression by call an external packed function.

call_packed_lowered(*args[, loc, ty])

Lowered version of call packed.

call_cpacked_lowered(*args[, loc, ty])

Lowered version of call c-packed.

tensor_data_ptr(tensor, *[, ty, loc])

Project a tensor variable's physical pointer.

handle_add_byte_offset(handle, offset, *[, ...])

Add offset to handle

abi_field_set(arr, index, field, value, *[, ...])

Set value in struct field in array

abi_field_get(*args[, attrs, ty_args, loc, ty])

Construct a call to tirx.abi_field_get.

gpu_thread_invariant(cond, *[, ty, loc])

Mark condition as thread invariant.

gpu_thread_allreduce(combine, identity, ...)

Perform an all-reduce inside a thread block.

gpu_load_matrix_sync(fragment, m, n, k, ...)

TVM intrinsic for tensor core load operators

gpu_mma_sync(fragment_d, index_d, ...[, ty, loc])

TVM intrinsic for tensor core mma_sync operators

gpu_fill_fragment(fragment, m, n, k, index, ...)

TVM intrinsic for tensor core fill_fragment operators

gpu_store_matrix_sync(fragment, m, n, k, ...)

TVM intrinsic for tensor core store operators

gpu_storage_sync(storage_scope, *[, ty, loc])

Synchronize accesses in the specified storage scope.

cpu_parallel_barrier(*[, ty, loc])

Synchronize all workers in the current CPU parallel launch.

kernel_replace_point(*[, ty, loc])

Mark where a transform should replace generated kernel initialization.

gpu_warp_shuffle(mask, value, warp_id, ...)

Exchange value between threads inside a warp.

gpu_warp_shuffle_up(mask, value, offset, ...)

Copy value from a lane with lower (by offset) index relative to caller.

gpu_warp_shuffle_down(mask, value, offset, ...)

Copy value from a lane with higher (by offset) index relative to caller.

gpu_warp_shuffle_xor(mask, value, lane_mask, ...)

Copy value from a lane with index computed by src_lane_idx ^ lane_mask.

gpu_warp_activemask(*[, ty, loc])

Return a 32-bit mask indicates currently active threads in a calling warp.

assume([cond, ty, loc])

Provide a true statement that can be used for simplifications

assume_aligned(tensor, alignment_bytes, *[, ...])

Assume the tensor's base address is aligned to alignment_bytes.

assume_always(predicate, *[, ty, loc])

Guarantee a predicate throughout its containing scope, including mutations.

undef(*[, ty, loc])

Returns an initialized but arbitrary value

alloc_workspace(device_type, device_id, ...)

Backend function to allocate temporal workspace

free_workspace(device_type, device_id, ptr, *)

Backend function to free temporal workspace.

vscale(*[, ty, loc])

Get the target's vscale value.

ignore_loop_partition(predicate, *[, ty, loc])

Annotate a predicate not be considered as target condition of loop partition.

reinterpret(*args[, attrs, ty_args, loc, ty])

Construct a call to tirx.reinterpret.

call_extern(*args[, attrs, ty_args, loc, ty])

Construct a call to tirx.call_extern.

call_intrin(func_name, *args, ty[, attrs, loc])

Call an intrinsic with an explicit result type.

call_llvm_intrin(name, *args, ty[, loc])

Build expression by calling a llvm intrinsic function

call_llvm_pure_intrin(name, *args, ty[, loc])

Build expression by calling a pure llvm intrinsic function

call_pure_extern(*args[, attrs, ty_args, ...])

Construct a call to tirx.call_pure_extern.

vector_low(*args[, attrs, ty_args, loc, ty])

Construct a call to tirx.vector_low.

vector_high(*args[, attrs, ty_args, loc, ty])

Construct a call to tirx.vector_high.

vector_combine(*args[, attrs, ty_args, loc, ty])

Construct a call to tirx.vector_combine.

get_active_lane_mask(*args[, attrs, ...])

Construct a call to tirx.get_active_lane_mask.

masked_load(tensor, index, *args[, ty, loc])

Load vector lanes selected by a predicate mask.

masked_store(tensor, value, index, *args[, ...])

Store vector lanes selected by a predicate mask.

gpu_dp4a(vec1, vec2[, acc])

Dot product of two int8x4 vectors and add an optional accumulator

fabs(*args[, attrs, ty_args, loc, ty])

Construct a call to prim.fabs.

logical_and(*values)

Construct scalar or vector conjunction from eager operands.

logical_or(*values)

Construct scalar or vector disjunction from eager operands.

logical_not(value)

Negate a host or IR value.

select(condition, true_value, false_value)

Construct a scalar conditional or select a host value.

if_then_else_(condition, true_value, false_value)

Implements tvm_tirx.script.ir_builder.parser_protocol.if_then_else_().

and_(*values)

Implements tvm_tirx.script.ir_builder.parser_protocol.and_().

or_(*values)

Implements tvm_tirx.script.ir_builder.parser_protocol.or_().

not_(value)

Implements tvm_tirx.script.ir_builder.parser_protocol.not_().

lt_(lhs, rhs, *[, loc])

Implements tvm_tirx.script.ir_builder.parser_protocol.lt_().

le_(lhs, rhs, *[, loc])

Implements tvm_tirx.script.ir_builder.parser_protocol.le_().

gt_(lhs, rhs, *[, loc])

Implements tvm_tirx.script.ir_builder.parser_protocol.gt_().

ge_(lhs, rhs, *[, loc])

Implements tvm_tirx.script.ir_builder.parser_protocol.ge_().

eq_(lhs, rhs, *[, loc])

Implements tvm_tirx.script.ir_builder.parser_protocol.eq_().

ne_(lhs, rhs, *[, loc])

Implements tvm_tirx.script.ir_builder.parser_protocol.ne_().

add_to_parent(stmt)

Add a statement to the parent frame.

assert_(condition[, message, loc])

Implements tvm_tirx.script.ir_builder.parser_protocol.assert_().

break_(*[, loc])

Implements tvm_tirx.script.ir_builder.parser_protocol.break_().

continue_(*[, loc])

Implements tvm_tirx.script.ir_builder.parser_protocol.continue_().

else_(*[, loc])

Implements tvm_tirx.script.ir_builder.parser_protocol.else_().

evaluate(value)

Emit an expression, or pass through a call or statement emission receipt.

grid(*extents[, dtype])

The grid For statement.

if_(condition, *[, loc])

Implements tvm_tirx.script.ir_builder.parser_protocol.if_().

region(op, args[, body_params, attrs])

Construct a result-free region with operation-defined body parameters.

return_([value, loc])

Implements tvm_tirx.script.ir_builder.parser_protocol.return_().

then_(*[, loc])

Implements tvm_tirx.script.ir_builder.parser_protocol.then_().

unpack_(value)

Implements tvm_tirx.script.ir_builder.parser_protocol.unpack_().

while_(condition, *[, loc])

Implements tvm_tirx.script.ir_builder.parser_protocol.while_().

function([function])

Parse a Python function into a function of the selected IR language variant.

function.builder(**options)

Build a TIRx function with Python body semantics.

function_(*[, private, persistent, decl, loc])

Implements tvm_tirx.script.ir_builder.parser_protocol.function_().

arg_(name, annotation, *[, loc])

Implements tvm_tirx.script.ir_builder.parser_protocol.arg_().

func_name_(name)

Implements tvm_tirx.script.ir_builder.parser_protocol.func_name_().

func_attr(attrs)

The Function annotation statement.

check_well_formed_(function)

Validate a completed TIRx function.

call_global_var_(function, args)

Implements tvm_tirx.script.ir_builder.parser_protocol.call_global_var_().

bind_([value, ty, name, loc, value_loc, ...])

Implements tvm_tirx.script.ir_builder.parser_protocol.bind_().

decl_mutable_cell_([value, ty, name, loc, ...])

Implements tvm_tirx.script.ir_builder.parser_protocol.decl_mutable_cell_().

set_mutable_cell_(target, value, *[, loc])

Implements tvm_tirx.script.ir_builder.parser_protocol.set_mutable_cell_().

setitem_(target, key, value, *[, loc])

Implements tvm_tirx.script.ir_builder.parser_protocol.setitem_().

setattr_(target, name, value, *[, loc])

Implements tvm_tirx.script.ir_builder.parser_protocol.setattr_().

tensor_store(dest, indices, value)

Emit a tensor store and return a receipt for the stored statement.

for_(iterable, *[, names, loc])

Implements tvm_tirx.script.ir_builder.parser_protocol.for_().

range_(*args[, annotations])

Implements tvm_tirx.script.ir_builder.parser_protocol.range_().

serial(start[, stop, annotations, step, ...])

The serial For statement.

parallel(start[, stop, annotations, step, dtype])

The parallel For statement.

vectorized(start[, stop, annotations, step, ...])

The vectorized For statement.

unroll(start[, stop, annotations, step, dtype])

The unrolled For statement.

device_entry(*launch_values[, launch, ...])

Enter a device kernel with independent CUDA launch and compile settings.

device_context(device_type, device_id, *[, ...])

Supply lexical device context for allocation and packed-call lowering.

compute_scope(name, *[, attrs, body_params])

Outline the body as a named CPU compute helper.

parallel_launch(*[, attrs, body_params])

Launch a CPU worker team around parallel loops and team barriers.

launch_thread(thread_tag, extent, *[, ...])

Launch a hardware or virtual thread with a fresh lexical variable.

func_ret(annotation, *[, loc])

Implements tvm_tirx.script.ir_builder.parser_protocol.func_ret_type_().

emit(value, *[, loc])

Implements tvm_tirx.script.ir_builder.parser_protocol.emit_().

frame_scope(frames)

Enter multiple IRBuilder frames without deep nesting.

tensor_indices(tensor, index)

Translate logical flat or multidimensional indices for a concrete tensor.

inline([function])

Decorate a helper that constructs IR in its caller's active frames.

macro([function])

Decorate a helper that constructs IR in its caller's active frames.

jit([func, private, check_well_formed, ...])

Decorator: capture the kernel and defer parsing until .specialize().

Namespaces#