How to tune CNN networks with multiple gpu devices?


#1

Hi, I noticed that the context is always set to gpu 0 in this tutorial like below:

ctx = tvm.context(str(target), 0)

How can I use all gpus availiable to accelerate the tuning process?


#2

You have to use RPC tracker and RPC server mode.

You can register one server for one GPU, something like

CUDA_VISIBLE_DEVICES=0 python3 -m tvm.exec.rpc_server --key titanx --tracker ...
CUDA_VISIBLE_DEVICES=1 python3 -m tvm.exec.rpc_server --key titanx --tracker ...