Caffe/pyCaffe: set all GPUs

风流意气都作罢 提交于 2019-12-07 07:04:49

问题


is possible to set all GPUs for Caffe (especially pyCaffe)?

Something like:

caffe train -solver examples/mnist/lenet_solver.prototxt -gpu all

回答1:


AFAIK Caffe is not supporting multi gpu training at the moment. It is planned for future release. See a discussion here.
It seems like NVIDIA's branch of caffe has this functionality. See the issue here.




回答2:


Both forks have supported multi-GPU for a while now.

  • BVLC/caffe got support for multi-GPU on 08/13/2015 (see commit, issue).
  • NVIDIA/caffe got support for multi-GPU on 06/19/2015 (see release note).

You may be interested to know that there is a pretty serious outstanding issue with multi-GPU and PythonLayers (see issue, temporary fix).




回答3:


It seems that Caffe now starts supporting training on multi-GPUs for C++ interface. See the docs on CommandLine interface.

# train on GPUs 0 & 1 (doubling the batch size)
caffe train -solver examples/mnist/lenet_solver.prototxt -gpu 0,1
# train on all GPUs (multiplying batch size by number of devices)
caffe train -solver examples/mnist/lenet_solver.prototxt -gpu all


来源:https://stackoverflow.com/questions/33726333/caffe-pycaffe-set-all-gpus

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!