How to use 8-kernel CPU to run TVM


#1

My computer has 8 CPU-kernels, when I use CPU to run resnet50 using TVM, I found only one cpu is running, is it possible to use all the 8 cpu-kernels at the same time?


#2

What machine is it? You may need to specify TVM_NUM_THREADS=8 at runtime.


#3

Note that in the case that your machine has 8 logical cores but only 4 physical cores, we typically set the number of threads to 4.


#4

I use following code to configure TVM_NUM_THREADS:

num_threads = 4
os.environ["TVM_NUM_THREADS"] = str(num_threads)

the result performance doesn’t change at all.

can you help me ?


#5

I am not sure how often TVM resets the number of threads used in the runtime if it is set dynamically in Python. To be sure, can you export TVM_NUM_THREADS=4 before running your script?