我有三个显卡,当我使用命令 -gpu all时会出错,而使用-gpu 0,2时能正常运行,但是在log输出力我看到了
I0119 09:22:49.801615 8412 parallel.cpp:245] GPU 2 does not have p2p access to GPU 0
这个信息,意思是不是有问题?源码是parallel.cpp里的
Parallelism: the -gpu flag to the caffe tool can take a comma separated list of IDs to run on multiple GPUs. A solver and net will be instantiated for each GPU so the batch size is effectively multiplied by the number of GPUs. To reproduce single GPU training, reduce the batch size in the network definition accordingly.
# 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
8 个回复
ruirui_ICT - 听大大们说,要“左手代码,右手公式”,喵~
赞同来自: 徐国智_受限的玻尔兹曼 、xinmiao 、李扬 、一依晨阳 、shuimulinxi 、月光骑士 、深度学习思考者更多 »
实际使用的时候基本不用设置,和原来一样编译好就可以用了。命令就是在-gpu 后面对多个GPU号用逗号隔开,比如-gpu 1,2,3,4 就是同时使用1-4共4个GPU,GPU编号可以不连续,或者直接用-gpu all,就是使用所有的GPU。
官方的github里是这样写的
正好我也在用顺手截图
可以看到输出的log里提示了使用了两个GPU
xinmiao
赞同来自: 徐国智_受限的玻尔兹曼 、Solomon 、月光骑士
在命令的后面加上 -gpu all
一些分支版本已支持多机多卡。
HelloDL - 如:80后IT男...
赞同来自: sydney72380
I0119 09:22:49.801615 8412 parallel.cpp:245] GPU 2 does not have p2p access to GPU 0
这个信息,意思是不是有问题?源码是parallel.cpp里的
zeakey - please visit my homepage: zhaok.xyz
赞同来自:
欢迎大神打脸并指导caffe多卡。
徐国智_受限的玻尔兹曼
赞同来自:
Parallelism: the -gpu flag to the caffe tool can take a comma separated list of IDs to run on multiple GPUs. A solver and net will be instantiated for each GPU so the batch size is effectively multiplied by the number of GPUs. To reproduce single GPU training, reduce the batch size in the network definition accordingly.
但是matcaffe和pycaffe用法有待摸索,训练的时候command line就够了
shuokay
赞同来自:
guoqiang
赞同来自:
z1272162491 - 90后IT男
赞同来自: