bazel

tensorflow bazel building fails

匿名 (未验证) 提交于 2019-12-03 01:39:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: building tf (following this ) ./configure && bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package fails: root@commandor:/opt/tf/sc/tensorflow# bazel build --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0" --config=opt //tensorflow/tools/pip_package:build_pip_package WARNING: /home/ertosns/.cache/bazel/_bazel_root/502c46fd2b7f9ff136e0381cc7e075fe/external/protobuf_archive/WORKSPACE:1: Workspace name in /home/ertosns/.cache/bazel/_bazel_root/502c46fd2b7f9ff136e0381cc7e075fe/external/protobuf_archive/WORKSPACE (@com_google_protobuf)

How to upgrade bazel?

匿名 (未验证) 提交于 2019-12-03 01:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I built bazel-0.4.0 successfully. Then I tried upgrading it to the latest version bazel-0.5.1 using $ ./compile.sh compile ../bazel-0.4.0/output/bazel.exe It's giving me an error, bazel-0.5.0 , bazel-0.4.5 gave me same error ERROR LOG: bazel-0.4.4 gave me different error ERROR LOG: 回答1: If you already have bazel installed, you can upgrade by running bazel build //src:bazel on a fresh clone of the git repository . Or just download distribution archive and run ./compile . Details: https://bazel.build/versions/master/docs/install-compile-source

C++ project with Bazel and GTest

匿名 (未验证) 提交于 2019-12-03 01:33:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to create a Bazel C++ project with gtest for unit tests. What is the minimal setup? (I only have Bazel installed on my computer and I am running under Linux) 回答1: The project structure is: Files related to Bazel+GTest WORKSPACE There you download gtest from github: new_git_repository( name = "googletest", build_file = "gmock.BUILD", remote = "https://github.com/google/googletest", tag = "release-1.8.0", ) You define a gmock BUILD file defined below: gmock.BUILD This BUILD file is in charge of compiling gtest/gmock: cc_library( name =

Xcode version must be specified to use an Apple CROSSTOOL

匿名 (未验证) 提交于 2019-12-03 01:14:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I try to build tensorflow-serving using bazel but I've encountered some errors during the building ERROR:/private/var/tmp/_bazel_Kakadu/3f0c35881c95d2c43f04614911c03a57/external/local_config_cc/BUILD:49:5: in apple_cc_toolchain rule @local_config_cc//:cc-compiler-darwin_x86_64: Xcode version must be specified to use an Apple CROSSTOOL. ERROR: Analysis of target '//tensorflow_serving/sources/storage_path:file_system_storage_path_source_proto' failed; build aborted. I've already tried to use bazel clean and bazel clean --expunge but it didn't

Build Tensorflow on RPi3 with Bazel: C++ compilation of rule '@boringssl//:crypto' failed

匿名 (未验证) 提交于 2019-12-03 01:07:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Trying to run tensorflow on Raspberry PI 3B. Following the Guide on: https://github.com/samjabrahams/tensorflow-on-raspberry-pi/blob/master/GUIDE.md#3-build-bazel Everything goes fine until the following step: pi@raspberrypi:~/tf/tensorflow $ bazel build -c opt --jobs 1 --copt="-mfpu=neon-vfpv4" --copt="-funsafe-math-optimizations" --copt="-ftree-vectorize" --copt="-fomit-frame-pointer" --local_resources 1024,1.0,1.0 --verbose_failures tensorflow/tools/pip_package:build_pip_package gcc is 4.8, bazel is 5.4 Raspbian 9 (Stretch) ERROR: /home

Using Bazel to generate coverage report

匿名 (未验证) 提交于 2019-12-03 00:59:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using genhtml command to generate html coverage report from Bazel generated coverage.dat file: genhtml bazel-testlogs/path/to/TestTarget/coverage.dat --output-directory coverage The problem with using genhtml is that I have to provide the paths to the coverage.dat files (which are generated in bazel-testlogs/..) Is it possible to fetch those coverage.dat files as an output from another rule? I would like to not have to call genthml command directly, but have Bazel handle everything. 回答1: I was not able to find a way to get coverage.dat

What are the differences between Bazel and Gradle?

China☆狼群 提交于 2019-12-03 00:25:40
问题 Google just open-sourced its build tool Bazel. What are the differences between this tool and Gradle? What can it do that Gradle cannot, what does it do better, and what does Gradle do better? 回答1: Disclaimer: I work on Bazel and I'm not intimately familiar with Gradle. However, one of my coworkers wrote up a comparison of the two systems, which I will paraphrase here: Bazel and Gradle emphasize different aspects of the build experience. To some extent, their priorities are incompatible -

tensorflow模型量化压缩

匿名 (未验证) 提交于 2019-12-03 00:22:01
在使用tensorflow这个功能时候需要先下载tensorflow的源代码: git clone https: //github.com/tensorflow/tensorflow.git 进入tensorflow根目录,这里使用tools文件下的两个工具进行量化压缩:graph_transforms、quantization。 安装bazel进行tensorflow工具包的编译。 这里需要注意的是,bazel最好使用最新的,这样编译tensorflow就不会报接口未部署的一些错误。 Linux安装bazel: https://github.com/bazelbuild/bazel/release 找到bazel-x.x.x-installer-linux-x86_64.sh下载到本地并安装。可以按照git的安装方法进行安装。 安装完毕后开始进行编译tensorflow: bazel build tensorflow/tools/graph_transforms:transform_graph bazel build tensorflow/tools/quantization:quantize_graph 编译需要占据很多内存以及cpu资源,建议在性能好点的机器上编译。 编译完成后使用: bazel - bin/tensorflow/tools/graph_transforms

Tensorflow-lite环境安装

匿名 (未验证) 提交于 2019-12-02 23:57:01
编写此文主要为了介绍在Ubuntu16.04上搭建Tensorflow-lite编译环境,涉及目标硬件为Armv7架构,8核Cortex-A7。 1、开发环境介绍: OS:Ubuntu16.04 64位 目标平台:Armv7 交叉工具链:gcc-linaro-arm-linux-gnueabihf-4.9-2014.9_linux Tensorflow版本:2.0.0 2、下载Tensorflow git clone https://github.com/tensorflow/tensorlfow.git 3、安装Bazel 打开网页,使用第一种方法:Use the binary installer https://docs.bazel.build/versions/master/install-ubuntu.html 1) sudo apt-get install pkg-config zip g++ zlib1g-dev unzip python3 2)打开链接: https://github.com/bazelbuild/bazel/releases ,下载最新sh文件: bazel-0.29.0-installer-linux-x86_64.sh 3)运行Bazel:chmod +x bazel-0.29.0-installer-linux-x86_64.sh .

Ubuntu16.04, CUDA8 CUDNN6 下安装 Tensorflow-gpu, Keras, Pytorch, fastai

匿名 (未验证) 提交于 2019-12-02 23:49:02
tensorflow官方网站变为: https://tensorflow.google.cn/ CUDA: cat /usr/local/cuda/version.txt cuDNN: cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2 1. keras tensorflow 1.5 和 keras 2.1.4搭配 tensorflow 1.4 和 keras2.1.3搭配 tensorflow 1.3 和keras 2.1.2 搭配 tensorflow 1.2 和keras 2.1.1搭配 版本 Python 版本 编译器 编译工具 cuDNN CUDA tensorflow_gpu-2.0.0-alpha0 2.7、3.3-3.6 GCC 4.8 Bazel 0.19.2 7.4.1以及更高版本 CUDA 10.0 (需要 410.x 或更高版本) tensorflow_gpu-1.13.0 2.7、3.3-3.6 GCC 4.8 Bazel 0.19.2 7.4 10 tensorflow_gpu-1.12.0 2.7、3.3-3.6 GCC 4.8 Bazel 0.15.0 7 9 tensorflow_gpu-1.11.0 2.7、3.3-3.6 GCC 4.8 Bazel 0.15.0 7 9