Can we config the number of threads of remote devices during auto-tunning, or it is just the value determined by MaxConcurrency in tvm/src/runtime/threading_backend.cc
?
@merrymercy
2 Likes
There is a config function in
from python side, we can set this by
tracker = tvm.rpc.connect_tracker(args.host, args.port)
remote = tracker.request(args.rpc_key)
config_func = remote.get_function('runtime.config_threadpool')
config_func(1, 1) # use 1 big core
config_func(1, 2) # use 2 big cores
config_func(-1, 1) # use 1 small core
config_func(-1, 2) # use 2 small cores
For auto-tuning, there is no interface for this. Maybe you can add these code after this line.
3 Likes
I know this thread is old, but I have found another solution. Maybe it will help others. I have a setup with android device which runs rpc server(binary executable), and host machine. To specify number of threads in android runtime, I used env var: TVM_NUM_THREADS, example:
TVM_NUM_THREADS=1 LD_LIBRARY_PATH=. ./tvm_rpc server --host=10.70.225.253
Then tvmc run will print following output:
Configuration
-------------
Number of threads: 1
Executor: Graph
Execution time summary: