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§
- Opaque: parent ‘ffi.Enum’ is opaque (no-mirror). Fields are read through the C ABI getters.
Functions§
- A view of the storage of
source,relative_byte_offsetbytes past its data, with another shape and data type (runtime.TensorCreateView). - An uninitialized tensor on
device, in the memory scopemem_scopeor 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
nameofdevice, such asexistormax_threads_per_block;Nonewhen the device does not report it (runtime.GetDeviceAttr). - The number of threads the runtime thread pool uses (
runtime.NumThreads).