Skip to main content

Crate tvm_ffi

Crate tvm_ffi 

Source

Re-exports§

pub use crate::any::Any;
pub use crate::any::AnyView;
pub use crate::collections::array::Array;
pub use crate::collections::map::Map;
pub use crate::collections::shape::Shape;
pub use crate::collections::tensor::CPUNDAlloc;
pub use crate::collections::tensor::NDAllocator;
pub use crate::collections::tensor::Tensor;
pub use crate::device::current_stream;
pub use crate::device::with_stream;
pub use crate::dtype::DLDataTypeExt;
pub use crate::error::Error;
pub use crate::error::ErrorKind;
pub use crate::error::Result;
pub use crate::error::ATTRIBUTE_ERROR;
pub use crate::error::INDEX_ERROR;
pub use crate::error::KEY_ERROR;
pub use crate::error::RUNTIME_ERROR;
pub use crate::error::TYPE_ERROR;
pub use crate::error::VALUE_ERROR;
pub use crate::extra::module::Module;
pub use crate::function::Function;
pub use crate::object::ObjectRefCast;
pub use crate::object::Object;
pub use crate::object::ObjectArc;
pub use crate::object::ObjectCore;
pub use crate::object::ObjectCoreWithExtraItems;
pub use crate::object::ObjectRefCore;
pub use crate::optional::Optional;
pub use crate::string::Bytes;
pub use crate::string::String;
pub use crate::type_traits::AnyCompatible;
pub use tvm_ffi_sys;

Modules§

any
collections
derive
device
dtype
error
extra
function
function_internal
macros
object
optional
In-place mirror of C++ ffi::Optional<T> (include/tvm/ffi/optional.h).
string
type_traits

Macros§

attach_context
Attach a context to a result if it is error
bail
Create a new error with file/line info attached
cached_global_func
Resolves a registered global Function by name and caches it for the lifetime of the process (lock-free after the first lookup). Each call site gets its own cache and the macro evaluates to a &'static Function. Panics — naming the function — if it is not registered.
check_safe_call
Check the return code of the safe call
ensure
Create a new error with file/line info attached
function_name
Macro gto get the name of the function
impl_arg_into_ref
Macro to implement ArgIntoRef for a list of types
impl_into_arg_holder_default
Macro to implement IntoArgHolder for a list of types
impl_try_from_any
Macro to implement TryFrom<AnyView> and TryFrom<Any> for a list of types
impl_try_from_any_for_parametric
Macro to implement TryFrom<AnyView> and TryFrom<Any> for generic types like Option<T>
into_typed_fn

match_any
Match object-backed values carried by an Any-compatible scrutinee.
tvm_ffi_dll_export_typed_func
Macro to export a typed function as a C symbol that follows the tvm-ffi ABI

Structs§

DLDataType
DLPack data type struct
DLDevice
TVMFFIAny
TVM FFI Any value - a union type that can hold various data types
TVMFFIObject

Enums§

DLDataTypeCode
DLPack data type code enum
DLDeviceType
TypeIndex
The index type of the FFI objects

Type Aliases§

TVMFFIStreamHandle
The type of the stream handle.