3

Reading the tensorflow text summarization model it states "The results described below are based on model trained on multi-gpu and multi-machine settings. It has been simplified to run on only one machine for open source purpose."

Further in the guide this command is invoked :

bazel build -c opt --config=cuda textsum/...

Does this command not relate to cuda/gpu? Why is this command truncated?

mrry
  • 125,488
  • 26
  • 399
  • 400
blue-sky
  • 51,962
  • 152
  • 427
  • 752

1 Answers1

2

This is a bazel command: --config=cuda means "use the CUDA build configuration (and generate GPU-compatible code)", and textsum/... means "all targets under the directory textsum" (i.e. the command isn't truncated and you should type the literal ... when entering the command).

mrry
  • 125,488
  • 26
  • 399
  • 400
  • the generated code is GPU-compatible but will not run on a CPU? In other words does this model require a different machine architecture to other tensorflow models such as word2vec ? – blue-sky Aug 26 '16 at 21:26
  • 1
    In general, you should be able to replace `--config=cuda` with `--config=opt`, and generate optimized code for CPU instead. I'm not sure about the details of the text summarization model, but this should work in general for most TensorFlow programs. – mrry Aug 26 '16 at 21:27
  • Is it ok that bazel outputs this warning? "Config values are not defined in any .rc file: cuda" – Pavel Surmenok Sep 22 '16 at 05:23
  • @mrry any idea why I get this error? `jalal@klein:~/computer_vision/tensorflow/models$ bazel build -c opt --config=cuda textsum/... The 'build' command is only supported from within a workspace.` – Mona Jalal Oct 03 '16 at 23:33
  • @MonaJalal, I think [this answer](http://stackoverflow.com/a/39184573/3574081) covers the steps you need to take. – mrry Oct 03 '16 at 23:52