tvm_tirx

Module runtime

Source
Expand description

The runtime objects the IR refers to.

A MemoryScope, such as the scope of a PtrType, is an enum object that python/tvm_tirx/runtime/memory_scope.py defines. The runtime functions the Python package wraps are here too: tensor allocation and views, device attributes and runtime queries.

Structs§

Functions§

  • A view of the storage of source, relative_byte_offset bytes past its data, with another shape and data type (runtime.TensorCreateView).
  • An uninitialized tensor on device, in the memory scope mem_scope or the global one (runtime.TensorAllocWithScope).
  • Whether the runtime of the device or target kind target ("cpu", "cuda", "llvm"…) is enabled (runtime.RuntimeEnabled).
  • The number of CUDA devices (runtime.GetCudaDeviceCount).
  • The free and total memory of the current CUDA device, as a message (runtime.GetCudaFreeMemory).
  • The attribute name of device, such as exist or max_threads_per_block; None when the device does not report it (runtime.GetDeviceAttr).
  • The number of threads the runtime thread pool uses (runtime.NumThreads).