DDPG code is really slow on linux machine with 12 threads, the speed of training 1 epoch (10000 steps) is 56 seconds which is same as just use one thread on my mac. The cpu is Intel(R) Core(TM) i7-3740QM CPU @ 2.70GHz for my mac, and Intel(R) Core(TM) i7-6800K CPU @ 3.40GHz for my desktop linux machine.
According to https://github.com/Khrylx/PyTorch-RL, solution seems to be export OMP_NUM_THREADS=1, this will limit to just use one thread on linux machine, which is about same speed as mac with just one thread.
DDPG code is really slow on linux machine with 12 threads, the speed of training 1 epoch (10000 steps) is 56 seconds which is same as just use one thread on my mac. The cpu is Intel(R) Core(TM) i7-3740QM CPU @ 2.70GHz for my mac, and Intel(R) Core(TM) i7-6800K CPU @ 3.40GHz for my desktop linux machine.
According to https://github.com/Khrylx/PyTorch-RL, solution seems to be
export OMP_NUM_THREADS=1
, this will limit to just use one thread on linux machine, which is about same speed as mac with just one thread.