models icon indicating copy to clipboard operation
models copied to clipboard

Multiple GPUs speed up training time for Faster R-CNN?

Open a819721810 opened this issue 8 years ago • 14 comments

System information

  • What is the top-level directory of the model you are using:object_detection
  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow):
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04):Ubuntu 16.04
  • TensorFlow installed from (source or binary):binary
  • TensorFlow version (use command below):tensorflow-gpu-1.7.0
  • Bazel version (if compiling from source):
  • CUDA/cuDNN version:9.0/7.0.5
  • GPU model and memory:3*1080Ti and 11GB
  • Exact command to reproduce:

Describe the problem

I used to see https://www.tensorflow.org/performance/benchmarks,and i did test at my own computer,its speed ratio is the same as the above said. When i tried to use multiple to train real data by Faster R-CNN, How can I discriminate the acceleration multiplier?By time of loss convergence? I did test of "faster_rcnn_inception_resnet_v2_atrous_coco.config" .when i added multiple GPUs ,i also added batch_size.There are my two 1080ti GPUs training parameters: image

This is my two 1080ti GPUs training result:

image

This is my one 1080ti GPU training result: image

The GPU utilization will be about 70%, and one GPU utilization rate is higher than multiple GPUs utilization . One GPU about 80%, multiple GPUs about:60%~70% image

Then, i did other config "faster_rcnn_resnet50_coco.config" training: This is my three 1080ti GPUs training result: image

This is my one 1080ti GPU training result:

image

Multiple GPUs train Faster R-CNN that i cannot see big difference ,except it's a little smoother.How should I confirm its acceleration? Multiple GPUs also didn't increase sec/step.  I am sure that CPU,RAM,I/O don't be bottleneck for my training.
Looking forward to your reply,thanks.

a819721810 avatar May 17 '18 08:05 a819721810

one more question:2 GPUs for Faster R-CNN can use 4 bitch size?

a819721810 avatar May 17 '18 10:05 a819721810

In other words, Faster R-CNN can deal with different image size. If training set have different image size,bitch size can double or more?And One GPU , 2 bitch size,it will slow down sec/step and increase capacity that Faster R-CNN handle image, so it is will accelerate or decelerate.What is the difference between worker_replicas and num_clone?

a819721810 avatar May 18 '18 01:05 a819721810

I have the same problem,waiting you solution

RealDzik avatar May 28 '18 15:05 RealDzik

I use multiple bitch size for Faster R-CNN @RealDzik .And because i addressed pictures to same size.Then i can get result quickly and precisely.

a819721810 avatar Jun 06 '18 11:06 a819721810

How did you add multiple GPUs ?I have set "expoert CUDA_VISIBLE_DEVICES=1,2",but it always run on one GPU..

MXLHELLO avatar Jan 08 '19 13:01 MXLHELLO

@MXLHELLO you have two GPUs or four GPUs, if two, you should use expoert CUDA_VISIBLE_DEVICES=0,1

a819721810 avatar Jan 08 '19 13:01 a819721810

Hi~ Thank you for your reply! I have 4 GPUs. I have set export CUDA_VISIBLE_DEVICES=0,1. but it's still the GPU0 alone is running . The GPU1 isn't be used at _all.

image

MXLHELLO avatar Jan 13 '19 06:01 MXLHELLO

did you try export CUDA_VISIBLE_DEVICES=0,1,2,3? and how many GPUs run? @MXLHELLO

a819721810 avatar Jan 13 '19 06:01 a819721810

did you try export CUDA_VISIBLE_DEVICES=0,1,2,3? and how many GPUs run? @MXLHELLO

Similar to the figure above, 4 GPUs are all occupied, but only GPU0 has power consumption.

MXLHELLO avatar Jan 13 '19 06:01 MXLHELLO

did you try export CUDA_VISIBLE_DEVICES=0,1,2,3? and how many GPUs run? @MXLHELLO

Similar to the figure above, 4 GPUs are all occupied, but only GPU0 has power consumption.

Does your program not support multi-concurrency? just normal program

a819721810 avatar Jan 13 '19 06:01 a819721810

Does your program not support multi-concurrency? just normal program

This one: Faster R-CNN tf version: https://github.com/smallcorgi/Faster-RCNN_TF I just want to run this on multi GPUs but I lose……

MXLHELLO avatar Jan 13 '19 06:01 MXLHELLO

Does your program not support multi-concurrency? just normal program

This one: Faster R-CNN tf version: https://github.com/smallcorgi/Faster-RCNN_TF I just want to run this on multi GPUs but I lose……

i think that their program don't support multi-concurrency,so you can only use one GPU.

a819721810 avatar Jan 13 '19 06:01 a819721810

My implementation of Faster/Mask R-CNN uses multiple GPUs when available and have 80~90% scaling efficiency: https://github.com/tensorpack/tensorpack/tree/master/examples/FasterRCNN

ppwwyyxx avatar Jan 13 '19 06:01 ppwwyyxx

Hi There, We are checking to see if you still need help on this, as this seems to be considerably old issue. Please update this issue with the latest information, code snippet to reproduce your issue and error you are seeing. If we don't hear from you in the next 7 days, this issue will be closed automatically. If you don't need help on this issue any more, please consider closing this.

tensorflowbutler avatar Jan 29 '20 23:01 tensorflowbutler