Q:

What is Bazel in TensorFlow? When do I need to build again?

I'm new to Bazel. I'm not sure how this thing works. On the TF website, there's this section on "Create the pip package and install".
$ bazel build -c opt //tensorflow/tools/pip_package:build_pip_package

# To build with GPU support: 
$ bazel build -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package

$ bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg

# The name of the .whl file will depend on your platform. 
$ pip install /tmp/tensorflow_pkg/tensorflow-0.5.0-cp27-none-linux_x86_64.whl

Here's the situation:

There's a new commit on the master branch of TensorFlow and I merge it into my fork.
I need to rebuild the wheel and do a pip install of the new wheel (correct me if I am wrong).
I ./configure first, then bazel build, then bazel-bin, then pip install.

Is this the correct way to properly update changes from master? The bazel build step takes a really long time.

A:

Bazel is a build tool just like other build tools like cmake and make. The steps you listed is the correct way to get updates from master. The build step could take long the first time you build TensorFlow. Later builds, after updates from master, should be faster, as Bazel, just like any other build tool, doesn't re-build targets whose dependencies have not been modified.

