tvm
|
Type-erased function used across TVM API. More...
#include <tvm/runtime/c_runtime_api.h>
#include <tvm/runtime/container/array.h>
#include <tvm/runtime/container/map.h>
#include <tvm/runtime/container/variant.h>
#include <tvm/runtime/data_type.h>
#include <tvm/runtime/logging.h>
#include <tvm/runtime/module.h>
#include <tvm/runtime/ndarray.h>
#include <tvm/runtime/object.h>
#include <functional>
#include <limits>
#include <memory>
#include <string>
#include <tuple>
#include <type_traits>
#include <utility>
#include <vector>
Go to the source code of this file.
Classes | |
class | tvm::runtime::PackedFuncObj |
Object container class that backs PackedFunc. More... | |
struct | tvm::runtime::PackedFuncObj::Extractor< TPackedFuncSubObj > |
Internal struct for extracting the callable method from callable type. More... | |
class | tvm::runtime::PackedFuncSubObj< TCallable > |
Derived object class for constructing PackedFuncObj. More... | |
class | tvm::runtime::PackedFunc |
Packed function is a type-erased function. The arguments are passed by packed format. More... | |
class | tvm::runtime::TypedPackedFunc< R(Args...)> |
A PackedFunc wrapper to provide typed function signature. It is backed by a PackedFunc internally. More... | |
class | tvm::runtime::TVMArgs |
Arguments into TVM functions. More... | |
struct | tvm::runtime::ObjectTypeChecker< T > |
Type traits for runtime type check during FFI conversion. More... | |
struct | tvm::runtime::ObjectTypeChecker< Array< T > > |
struct | tvm::runtime::ObjectTypeChecker< Map< K, V > > |
class | tvm::runtime::TVMPODValue_ |
Internal base class to handle conversion to POD values. More... | |
class | tvm::runtime::TVMArgValue |
A single argument value to PackedFunc. Containing both type_code and TVMValue. More... | |
class | tvm::runtime::TVMMovableArgValue_ |
Internal auxiliary struct for TypedPackedFunc to indicate a movable argument. More... | |
class | tvm::runtime::TVMMovableArgValueWithContext_ |
Internal auxiliary struct for TypedPackedFunc to indicate a movable argument with additional context information (function name and argument index) for better error reporting. More... | |
class | tvm::runtime::TVMRetValue |
Return Value container, Unlike TVMArgValue, which only holds reference and do not delete the underlying container during destruction. More... | |
struct | tvm::runtime::PackedFuncValueConverter< TObjectRef > |
Type trait to specify special value conversion rules from TVMArgValue and TVMRetValue. More... | |
class | tvm::runtime::TVMArgsSetter |
struct | tvm::runtime::TVMArgsSetterApply< i, T > |
struct | tvm::runtime::PackedFuncValueConverter<::tvm::runtime::String > |
struct | tvm::runtime::PackedFuncValueConverter< Optional< T > > |
struct | tvm::runtime::PackedFuncValueConverter< Variant< VariantTypes... > > |
Namespaces | |
tvm | |
runtime implementation for LibTorch/TorchScript. | |
tvm::runtime | |
Macros | |
#define | TVM_RUNTIME_HEADER_ONLY 0 |
#define | TVM_CHECK_TYPE_CODE(CODE, T) ICHECK_EQ(CODE, T) << "expected " << ArgTypeCode2Str(T) << " but got " << ArgTypeCode2Str(CODE) |
#define | TVM_DLL_EXPORT_PACKED_FUNC(ExportName, Function) |
Export a function with the PackedFunc signature as a PackedFunc that can be loaded by LibraryModule. More... | |
#define | TVM_MODULE_VTABLE_BEGIN(TypeKey) |
#define | TVM_MODULE_VTABLE_END() |
#define | TVM_MODULE_VTABLE_ENTRY(Name, MemFunc) |
#define | TVM_MODULE_VTABLE_ENTRY_PACKED(Name, Func) |
#define | TVM_DLL_EXPORT_TYPED_FUNC(ExportName, Function) |
Export typed function as a PackedFunc that can be loaded by LibraryModule. More... | |
Typedefs | |
using | tvm::runtime::FSig = std::string() |
Using static function to output TypedPackedFunc signature. More... | |
Functions | |
const char * | tvm::runtime::ArgTypeCode2Str (int type_code) |
Convert argument type code to string. More... | |
std::ostream & | tvm::runtime::operator<< (std::ostream &os, DLDevice dev) |
const char * | tvm::runtime::DLDeviceType2Str (int type) |
The name of DLDeviceType. More... | |
template<typename... Args> | |
void TVM_ALWAYS_INLINE | tvm::runtime::PackArgs (TVMValue *values, int *type_codes, Args &&... args) |
Type-erased function used across TVM API.
#define TVM_CHECK_TYPE_CODE | ( | CODE, | |
T | |||
) | ICHECK_EQ(CODE, T) << "expected " << ArgTypeCode2Str(T) << " but got " << ArgTypeCode2Str(CODE) |
#define TVM_DLL_EXPORT_PACKED_FUNC | ( | ExportName, | |
Function | |||
) |
Export a function with the PackedFunc signature as a PackedFunc that can be loaded by LibraryModule.
ExportName | The symbol name to be exported. |
Function | The function with PackedFunc signature. |
#define TVM_DLL_EXPORT_TYPED_FUNC | ( | ExportName, | |
Function | |||
) |
Export typed function as a PackedFunc that can be loaded by LibraryModule.
ExportName | The symbol name to be exported. |
Function | The typed function. |
#define TVM_MODULE_VTABLE_BEGIN | ( | TypeKey | ) |
#define TVM_MODULE_VTABLE_END | ( | ) |
#define TVM_MODULE_VTABLE_ENTRY | ( | Name, | |
MemFunc | |||
) |
#define TVM_MODULE_VTABLE_ENTRY_PACKED | ( | Name, | |
Func | |||
) |
#define TVM_RUNTIME_HEADER_ONLY 0 |