1

Was following this link to compile TensorFlow library.

Using this code bazel build -c opt --copt=-mavx --copt=-mavx2 --copt=-mfma --copt=-mfpmath=both --copt=-msse4.2 --config=cuda -k //tensorflow/tools/pip_package:build_pip_package, however, got the following error.

WARNING: Config values are not defined in any .rc file: cuda
ERROR: Skipping '//tensorflow/tools/pip_package:build_pip_package': no such package 'tensorflow/tools/pip_package': BUILD file not found on package path
WARNING: Target pattern parsing failed.
INFO: Analysed 0 targets (0 packages loaded).
INFO: Found 0 targets...
ERROR: command succeeded, but there were errors parsing the target pattern
INFO: Elapsed time: 0.331s, Critical Path: 0.02s
FAILED: Build did NOT complete successfully

Is this because I installed TensorFlow using pip?

Any sugguest what to do next?

X. Zhang
  • 358
  • 3
  • 12

1 Answers1

1

You have to run ./configure. That will create a .bazelrc and .tf_configure.bazel file in your Tensorflow workspace.

The --config=cuda Bazel flag refers to entries in those two files (they are both text files). The entries typically look like this: build:cuda --some_bazel_flag.

László
  • 3,973
  • 1
  • 13
  • 26