Python API#
TVM FFI Python package.
Object#
Base class of all TVM FFI objects. |
Tensor#
Managed n-dimensional array compatible with DLPack. |
|
|
Import a foreign array that implements the DLPack producer protocol. |
|
Shape tuple that represents |
|
Lightweight data type in TVM FFI. |
A device descriptor used by TVM FFI and DLPack. |
|
|
Enumeration mirroring DLPack's DLDeviceType |
|
Construct a TVM FFI device with given device type and index. |
Function#
Callable wrapper around a TVM FFI function. |
Module#
|
Module container for dynamically loaded Module. |
|
Get system-wide library module singleton with functions prefixed by |
|
Load module from file. |
Containers#
Global Registry#
|
Register an error class so it can be recognized by the ffi error handler. |
|
Register object type. |
|
Register global function. |
|
Get a global function by name. |
|
Get metadata (including type schema) for a global function. |
|
Initialize register ffi api functions into a given module. |
|
Remove a global function by name. |
Stream Context#
|
Represent a stream context in the FFI system. |
|
Create an FFI stream context with a Torch stream or graph. |
|
Create an FFI stream context with the given device and stream handle. |
|
Get the current FFI stream of a given device. |
C++ Extension#
C++ integration helpers for building and loading inline modules.
|
Compile, build and load a C++/CUDA module from inline source code. |
|
Compile and build a C++/CUDA module from inline source code. |
|
Compile, build and load a C++/CUDA module from source files. |
|
Compile and build a C++/CUDA module from source files. |
Misc#
|
Load an object from a JSON graph string. |
|
Dump an object to a JSON graph string. |
|
Kinds of access steps in an access path. |
Access path container. |
|
|
Access step container. |
|
Convert a Python object into TVM FFI values. |
Base class for Python classes convertible to |