I guess the parallel actually works on modules.
```
int TVMBackendParallelLaunch(
    FTVMParallelLambda flambda,
    void* cdata,
    int num_task) {
#if !TVM_THREADPOOL_USE_OPENMP
  int res = tvm::runtime::ThreadPool::ThreadLocal()->Launch(
      flambda, cdata, num_task, 1);
  return res;
#else
  int num_workers = tvm::runtime::threading::MaxConcurrency();
  if (num_task == 0) num_task = num_workers;
  omp_set_num_threads(num_workers);
  #pragma omp parallel num_threads(num_workers)
  {
    TVMParallelGroupEnv env;
    env.num_task = num_task;
    (*flambda)(omp_get_thread_num(), &env, cdata);
  }
  return 0;
#endif
}
```
This function launches the thread. And it is invoked by module building 
process. Graph runtime may have nothing to do with paralelism.





---
[Visit 
Topic](https://discuss.tvm.ai/t/execution-order-of-operators-at-runtime-in-tvm/6572/6)
 to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click 
here](https://discuss.tvm.ai/email/unsubscribe/9642d0c1515d9cf8dd6a35c8cff6c90d3fb305017fb0f43434e6a12c62c4101c).

Reply via email to