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);
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 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 TVMBackendParallelLaunch(FTVMParallelLambda flambda, void *cdata, int num_task)
Backend function for running parallel jobs.
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...
int(* FTVMParallelLambda)(int task_id, TVMParallelGroupEnv *penv, void *cdata)
The callback function to execute a parallel lambda.
Definition: c_backend_api.h:97
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...
constexpr const char * device_id
The allocation device for global malloc in host.
Definition: stmt.h:1090
constexpr const char * device_type
The device type.
Definition: stmt.h:1092
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