28 #ifndef TVM_RUNTIME_C_BACKEND_API_H_
29 #define TVM_RUNTIME_C_BACKEND_API_H_
48 TVMFFIObjectHandle* out);
65 int dtype_code_hint,
int dtype_bits_hint);
TVM_RUNTIME_DLL int TVMBackendParallelLaunch(FTVMParallelLambda flambda, void *cdata, int num_task)
Backend function for running parallel jobs.
TVM_RUNTIME_DLL int TVMBackendGetFuncFromEnv(void *mod_node, const char *func_name, TVMFFIObjectHandle *out)
Backend function for modules to get function from its environment mod_node (its imports and global fu...
TVM_RUNTIME_DLL int TVMBackendParallelBarrier(int task_id, TVMParallelGroupEnv *penv)
BSP barrrier between parallel threads.
int(* FTVMParallelLambda)(int task_id, TVMParallelGroupEnv *penv, void *cdata)
The callback function to execute a parallel lambda.
Definition: c_backend_api.h:97
TVM_RUNTIME_DLL 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.
TVM_RUNTIME_DLL 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...
TVM_RUNTIME_DLL int TVMBackendFreeWorkspace(int device_type, int device_id, void *ptr)
Backend function to free temporal workspace.
constexpr const char * device_id
The allocation device for global malloc in host.
Definition: stmt.h:1007
constexpr const char * device_type
The device type.
Definition: stmt.h:1011
#define TVM_RUNTIME_DLL
Definition: base.h:88
Environment for TVM parallel task.
Definition: c_backend_api.h:82
void * sync_handle
Auxiliary used for synchronization.
Definition: c_backend_api.h:86
int32_t num_task
total amount of task
Definition: c_backend_api.h:88