[Apache TVM Discuss] [Questions] [MultiThread][ThreadPool] Performance degradation when running relay module in multiple threads

2021-07-05 Thread Minmin Sun via Apache TVM Discuss
I found out that it might the problem of python thread.Thread instead of TVM. --- [Visit Topic](https://discuss.tvm.apache.org/t/multithread-threadpool-performance-degradation-when-running-relay-module-in-multiple-threads/10374/10) to respond. You are receiving this because you enabled ma

[Apache TVM Discuss] [Questions] [MultiThread][ThreadPool] Performance degradation when running relay module in multiple threads

2021-07-02 Thread Minmin Sun via Apache TVM Discuss
By "multi-prcocess" I mean run the python script two times simutaniously, while "multi-thread" is implemented by threading.Thread in python script. --- [Visit Topic](https://discuss.tvm.apache.org/t/multithread-threadpool-performance-degradation-when-running-relay-module-in-multiple-thread

[Apache TVM Discuss] [Questions] [MultiThread][ThreadPool] Performance degradation when running relay module in multiple threads

2021-07-02 Thread Minmin Sun via Apache TVM Discuss
Yes, it also has the same problem running on omp as threading backend. We didn't see much difference between TVM ThreadPool and OMP in such cases. --- [Visit Topic](https://discuss.tvm.apache.org/t/multithread-threadpool-performance-degradation-when-running-relay-module-in-multiple-threads

[Apache TVM Discuss] [Questions] [MultiThread][ThreadPool] Performance degradation when running relay module in multiple threads

2021-07-02 Thread Minmin Sun via Apache TVM Discuss
Add an addtional info: in multi-processed run, the performace of module.run() in each process does not drop. --- [Visit Topic](https://discuss.tvm.apache.org/t/multithread-threadpool-performance-degradation-when-running-relay-module-in-multiple-threads/10374/5) to respond. You are receiv

[Apache TVM Discuss] [Questions] [MultiThread][ThreadPool] Performance degradation when running relay module in multiple threads

2021-07-02 Thread Minmin Sun via Apache TVM Discuss
Thanks. It doesn't improve. Performace in both single-threaded run and multi-threaded run drop 10-20%, and CPU utilization drops from nearly 100% to nearly 50% with TVM_THREAD_POOL_SPIN_COUNT=0, which I think is reasonable. --- [Visit Topic](https://discuss.tvm.apache.org/t/multithread-th

[Apache TVM Discuss] [Questions] [MultiThread][ThreadPool] Performance degradation when running relay module in multiple threads

2021-07-02 Thread Minmin Sun via Apache TVM Discuss
* Device: Skylake 8163 with 48 pysical cores * Env Setting: TVM_BIND_THREADS=0 TVM_NUM_THREADS=4 * Code Snippet: ``` module = graph_executor.GraphModule(lib["default"](ctx)) def thread_run: for i in range(repeats): module.run() threads = [] for i in range(num_threads): t