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

编程入门 行业动态 更新时间:2024-10-25 08:15:36
本文介绍了TensorFlow 中的 Bazel 是什么?我什么时候需要重新构建?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我是 Bazel 的新手.我不确定这件事是如何运作的.在 TF 网站上,有关于创建 pip打包并安装".

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

情况如下:

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

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

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

推荐答案

Bazel 是一个构建工具,就像其他构建工具一样像 cmake 和 制作.您列出的步骤是从 master 获取更新的正确方法.第一次构建 TensorFlow 时,构建步骤可能需要很长时间.从 master 更新后的后续构建应该更快,因为 Bazel 就像任何其他构建工具一样,不会重新构建依赖项未修改的目标.

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.

这篇关于TensorFlow 中的 Bazel 是什么?我什么时候需要重新构建?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-05-01 04:06:22,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1403897.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:什么时候   TensorFlow   Bazel

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!