TensorFlow 中的 Bazel 是什么?我什么时候需要重新构建?

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

我是 Bazel 的新手。我不确定这东西是如何工作的。在 TF website 上,"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

情况如下:

  1. TensorFlow 的 master 分支上有一个新提交,我将其合并到我的分支中。
  2. 我需要重建轮子并对新轮子进行 pip 安装(如果我错了请纠正我)。
  3. 我先./configure,然后是bazel build,然后是bazel-bin,然后是pip install。

这是从 master 正确更新更改的正确方法吗? bazel 构建步骤需要很长时间。

Bazel is a build tool just like other build tools like cmake and make。您列出的步骤是从 master 获取更新的正确方法。第一次构建 TensorFlow 时,构建步骤可能需要很长时间。在从 master 更新之后,以后的构建应该会更快,因为 Bazel 与任何其他构建工具一样,不会重新构建其依赖项未被修改的目标。