tvm
Classes | Namespaces | Macros
generic_func.h File Reference

Generic function that can be specialzied on a per target basis. More...

#include <tvm/runtime/packed_func.h>
#include <tvm/support/with.h>
#include <tvm/target/target.h>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
Include dependency graph for generic_func.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  tvm::GenericFunc
 Generic function that can be specialized on a per-target basis. More...
 
class  tvm::GenericFuncNode
 Represents a generic function that can be specialized on a per-target basis. More...
 

Namespaces

 tvm
 runtime implementation for LibTorch/TorchScript.
 

Macros

#define TVM_GENERIC_FUNC_REG_VAR_DEF   static TVM_ATTRIBUTE_UNUSED ::tvm::GenericFunc& __mk_##TVM
 
#define TVM_REGISTER_GENERIC_FUNC(name)    TVM_STR_CONCAT(TVM_GENERIC_FUNC_REG_VAR_DEF, __COUNTER__) = ::tvm::GenericFunc::Get(#name)
 Register a new generic function, or set a device-specific variant of the corresponding function. More...
 

Detailed Description

Generic function that can be specialzied on a per target basis.

Macro Definition Documentation

◆ TVM_GENERIC_FUNC_REG_VAR_DEF

#define TVM_GENERIC_FUNC_REG_VAR_DEF   static TVM_ATTRIBUTE_UNUSED ::tvm::GenericFunc& __mk_##TVM

◆ TVM_REGISTER_GENERIC_FUNC

#define TVM_REGISTER_GENERIC_FUNC (   name)     TVM_STR_CONCAT(TVM_GENERIC_FUNC_REG_VAR_DEF, __COUNTER__) = ::tvm::GenericFunc::Get(#name)

Register a new generic function, or set a device-specific variant of the corresponding function.

Parameters
nameThe name of the function