Hello, I have a machine with 40 cpu cores, and a process that runs a TVM 
application on 10 threads. I wish that each TVM thread will use 4 cpu cores so 
I set TVM_NUM_THREADS=4.
 
Then what happens is without cpu affinity (TVM_BIND_THREADS=0), the 10 threads 
will try to occupy cpus randomly, slowing down on each thread.
 
I thought cpu affinity could help if we can let each thread have a dedicated 
cpu to use. e.g. thread_0 will use cpu_0~cpu_3, thread_1 will use cpu_4~cpu_7, 
etc.
 
But I don't know how to accomplish that, as when I set TVM_BIND_THREADS=1, all 
threads will try to use cpu_0~cpu_3. I wonder if there is a way to manually 
control the CPU affinity in a multithreading scenario. Thanks!





---
[Visit 
Topic](https://discuss.tvm.apache.org/t/how-to-manually-controll-cpu-affinity-in-multithreading-scenario/10348/1)
 to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click 
here](https://discuss.tvm.apache.org/email/unsubscribe/833549bf418c57889aba17ecf48b24d0ac578fa067ba000c4cf8168ad2e7a41b).

Reply via email to