0

I've viewed some discussion about MCTS and GPU. It's said there's no advantage using GPU, as it doesn't have many matrix-multiply. But it does have a drawback using CPU, as the data transfering between devices really takes time. Here I mean the nodes and tree should be on GPU. Then they may process the data on GPU, without copying the the data from CPU. If I just create class node and tree, they will let their methods work on CPU. So I wonder whether I can move the searching part to GPU. Is there any example?

MarkIc
  • 13
  • 3
  • What do you mean by 'data' in this case? You'd be building up the nodes of the trees in each iteration, so I'm not sure what 'data' would be stored on GPU in the first case. Knowing nothing about your specific problem, it might make sense to run the Simulation (and possibly the backprop) steps of MCTS directly on GPU using prior data that's already allocated (e.g. parameters of a policy network). In any case, you could implement all of MCTS on the GPU using pytorch code (no native CUDA needed). To do so you can sample directly on GPU: https://discuss.pytorch.org/t/random-number-on-gpu/9649/2 – hdkrgr Feb 17 '20 at 16:25
  • @hdkrgr I mean nodes and tree. Policy network can easily work on GPU, but what about these? I know it may be less efficient to do it on GPU, but the transfer between devices also takes time. – MarkIc Feb 19 '20 at 09:08

0 Answers0