28 #ifndef TVM_RUNTIME_C_BACKEND_API_H_
29 #define TVM_RUNTIME_C_BACKEND_API_H_
50 TVMValue* out_ret_value,
int* out_ret_tcode,
51 void* resource_handle);
89 int dtype_code_hint,
int dtype_bits_hint);
void * TVMBackendAllocWorkspace(int device_type, int device_id, uint64_t nbytes, int dtype_code_hint, int dtype_bits_hint)
Backend function to allocate temporal workspace.
int TVMBackendRegisterSystemLibSymbol(const char *name, void *ptr)
Backend function to register system-wide library symbol.
int TVMBackendRegisterEnvCAPI(const char *name, void *ptr)
Backend function to register execution environment(e.g. python) specific C APIs.
int TVMBackendParallelBarrier(int task_id, TVMParallelGroupEnv *penv)
BSP barrrier between parallel threads.
int TVMBackendFreeWorkspace(int device_type, int device_id, void *ptr)
Backend function to free temporal workspace.
int TVMBackendGetFuncFromEnv(void *mod_node, const char *func_name, TVMFunctionHandle *out)
Backend function for modules to get function from its environment mod_node (its imports and global fu...
int(* TVMBackendPackedCFunc)(TVMValue *args, int *type_codes, int num_args, TVMValue *out_ret_value, int *out_ret_tcode, void *resource_handle)
Signature for backend functions exported as DLL.
Definition: c_backend_api.h:49
int TVMBackendParallelLaunch(FTVMParallelLambda flambda, void *cdata, int num_task)
Backend function for running parallel jobs.
int(* FTVMParallelLambda)(int task_id, TVMParallelGroupEnv *penv, void *cdata)
The callback function to execute a parallel lambda.
Definition: c_backend_api.h:134
int TVMBackendRunOnce(void **handle, int(*f)(void *), void *cdata, int nbytes)
Simple static initialization function. Run f once and set handle to be not null. This function is mai...
void * TVMFunctionHandle
Handle to packed function handle.
Definition: c_runtime_api.h:231
constexpr const char * device_id
The allocation device for global malloc in host.
Definition: stmt.h:1420
constexpr const char * device_type
The device type.
Definition: stmt.h:1422
Environment for TVM parallel task.
Definition: c_backend_api.h:119
void * sync_handle
Auxiliary used for synchronization.
Definition: c_backend_api.h:123
int32_t num_task
total amount of task
Definition: c_backend_api.h:125
Union type of values being passed through API and function calls.
Definition: c_runtime_api.h:210