models icon indicating copy to clipboard operation
models copied to clipboard

Perspective Transformer Nets uses only %20 of GPU

Open mees opened this issue 9 years ago • 9 comments

System information

  • What is the top-level directory of the model you are using: Ptn directory
  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Yes, I commented out the visualization part.
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 14.04
  • TensorFlow installed from (source or binary): Source
  • TensorFlow version (use command below): ('v1.3.0-rc1-27-g2784b1c', '1.3.0-rc2')
  • Bazel version (if compiling from source): 0.5.2
  • CUDA/cuDNN version: 8.0/5.1
  • GPU model and memory: Titan X
  • Exact command to reproduce: CUDA_VISIBLE_DEVICES=0 bazel-bin/train_ptn '--checkpoint_dir=/home/meeso/models/ptn/my_models/no_finetune' '--inp_dir=/tmp/shapenet_tf/' '--visualize=False'

nvidia-smi -l

Describe the problem

When I turn off the visualization part, which is very time consuming as it runs on the CPU, the throughput I get while training between %20 and %25 GPU-Util in nvidia-smi, which seems way too low, specially using tfrecords. Besides the visualization, is there any other bottleneck that hinders using the GPU fully? I get around 0.220 sec/ global step and 4 global steps / second in tensorboard.

Source code / logs

I attach the nvidia-smi nvidia_smi.txt

mees avatar Aug 15 '17 14:08 mees

@xcyan, @arkanath is this normal?

mees avatar Aug 15 '17 14:08 mees

Did you follow the same configuration as did in torch? You might need to increase "batch_size" to 6.

xcyan avatar Aug 15 '17 17:08 xcyan

with batch_size 6, it increases to %63, how much was it for you guys?

mees avatar Aug 15 '17 18:08 mees

We used 6.

xcyan avatar Aug 15 '17 18:08 xcyan

I mean how much percent of the GPU were you using with batch_size 6?

mees avatar Aug 15 '17 18:08 mees

I didn't profile the GPU usage while developing this code. @arkanath do you have any comments?

xcyan avatar Aug 15 '17 18:08 xcyan

I didn't either, regardless, I am pretty sure we don't have any code to hinder GPU usage. We can close this issue.

arkanath avatar Aug 18 '17 02:08 arkanath

Well you might want to bump the default batch_size from 1 to 6, so people don't wonder about low GPU usage. It makes even more sense since apparently this is the batch_size needed to reproduce the paper results and the one you used.

mees avatar Aug 18 '17 09:08 mees

@mees @xcyan when I run the train_ptn.py, the GPU util=0,but Memory-Usage to High.

ZYCZH avatar Jan 08 '19 13:01 ZYCZH