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/boxed_primitive.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 <optional>
#include <string>
#include <tuple>
#include <type_traits>
#include <utility>
#include <vector>
Go to the source code of this file.
Namespaces | |
tvm | |
runtime implementation for LibTorch/TorchScript. | |
tvm::runtime | |
Macros | |
#define | TVM_RUNTIME_HEADER_ONLY 0 |
#define | TVM_LOG_INCORRECT_TYPE_CODE(CODE, T) "expected " << ArgTypeCode2Str(T) << " but got " << ArgTypeCode2Str(CODE) |
#define | TVM_CHECK_TYPE_CODE(CODE, T) ICHECK_EQ(CODE, T) << TVM_LOG_INCORRECT_TYPE_CODE(CODE, T) |
#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_END_WITH_DEFAULT(MemFunc) |
#define | TVM_MODULE_VTABLE_ENTRY(Name, MemFunc) |
#define | TVM_MODULE_VTABLE_ENTRY_PACKED(Name, MemFunc) |
#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) << TVM_LOG_INCORRECT_TYPE_CODE(CODE, T) |
#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_LOG_INCORRECT_TYPE_CODE | ( | CODE, | |
T | |||
) | "expected " << ArgTypeCode2Str(T) << " but got " << ArgTypeCode2Str(CODE) |
#define TVM_MODULE_VTABLE_BEGIN | ( | TypeKey | ) |
#define TVM_MODULE_VTABLE_END | ( | ) |
#define TVM_MODULE_VTABLE_END_WITH_DEFAULT | ( | MemFunc | ) |
#define TVM_MODULE_VTABLE_ENTRY | ( | Name, | |
MemFunc | |||
) |
#define TVM_MODULE_VTABLE_ENTRY_PACKED | ( | Name, | |
MemFunc | |||
) |
#define TVM_RUNTIME_HEADER_ONLY 0 |