tvm_tirx.runtime

Contents

tvm_tirx.runtime#

Runtime tensors, devices, executable modules, and thread information.

Classes#

DataTypeCode(*values)

DLDataTypeCode code in DLTensor.

Device

TVM device strucure.

MemoryScope(*args, **kwargs)

A registered memory-space identity.

Tensor

Lightweight Tensor class of TVM runtime.

Functions#

load_module(path[, keep_module_alive])

Load module from file.

tensor(arr[, device, mem_scope])

Create an tensor from source arr.

empty(shape[, dtype, device, mem_scope])

Create an empty array given shape and device

cpu([dev_id])

Construct a CPU device

cuda([dev_id])

Construct a CUDA GPU device

opencl([dev_id])

Construct a OpenCL device

vulkan([dev_id])

Construct a Vulkan device

metal([dev_id])

Construct a metal device

vpi([dev_id])

Construct a VPI simulated device

rocm([dev_id])

Construct a ROCM device

ext_dev([dev_id])

Construct a extension device

hexagon([dev_id])

Construct a Hexagon device

enabled(target)

Whether module runtime is enabled for target

num_threads()

Get the number of threads in use by the TVM runtime.