bazel

Tensorflow build quantization tool - bazel build error

谁都会走 提交于 2019-12-05 14:14:29
I am trying to compile the quantization script as described in Pete Warden's blog . However I get the following error message after running the following bazel build: bazel build tensorflow/contrib/quantization/tools:quantize_graph ERROR: no such package 'tensorflow/contrib/quantization/tools': BUILD file not found on package path. INFO: Elapsed time: 0.277s I think what happened is that this quantization tool got moved out of contrib and into TensorFlow core. You should be able to use that instead: bazel build tensorflow/tools/quantization:quantize_graph 来源: https://stackoverflow.com

How to resolve bazel “undeclared inclusion(s)” error?

跟風遠走 提交于 2019-12-05 10:20:25
I'm new to bazel, and I'm getting a failure to build my C++ package with ERROR: /path/to/package/BUILD:linenumber:1 undeclared inclusion(s) in rule '//path/to/package:name': this rule is missing dependency declarations for the following files included by 'path/to/package/source_file.cpp' ...followed by a list of header files in a different directory. These files are not part of the package that is being built, but are being pulled in from elsewhere. My question is how to properly add the declaration to the BUILD file to resolve the error? According to the online Bazel docu here I should add

How to run a shell command at analysis time in bazel?

≡放荡痞女 提交于 2019-12-05 06:56:04
问题 I'm trying to bake the mercurial version into my Bazel file, so that I can get something like this: # These I set manually, since they're "semantic" MAJOR_VERSION = 2 MINOR_VERSION = 3 BUGFIX_VERSION = 1 # This should be the result of `hg id -n` BUILD_VERSION = ? apple_bundle_version( name = "my_version", build_version = "{}.{}.{}.{}".format(MAJOR_VERSION, MINOR_VERSION, BUGFIX_VERSION, BUILD_VERSION), short_version_string = "{}.{}.{}".format(MAJOR_VERSION, MINOR_VERSION, BUGFIX_VERSION), )

Tensorflow not showing “Successfully opened so & so CUDA libraries locally”

大憨熊 提交于 2019-12-05 05:28:54
问题 I configured tensorflow to work with CUDA support on my GPU (GeForce 840M) but the programs are running quite slow in compare to what my CPU used to earlier. Also, I do not get any kind of message that the so and so CUDA library was successfully opened when I run the program. Instead, this is what I get in logs when I run any tensorflow program: python Neuralnet.py Successfully downloaded train-images-idx3-ubyte.gz 9912422 bytes. Extracting /tmp/data/train-images-idx3-ubyte.gz Successfully

TensorFlow Bazel build failing

寵の児 提交于 2019-12-04 23:22:10
问题 I'm building TensorFlow with Bazel using bazel build -c opt --config=cuda //tensorflow/cc:tutorials_example_trainer as instructed to by the TensorFlow 'installing from sources' instructions. I get the following error: ERROR: /home/ubuntu/tensorflow/tensorflow/stream_executor/BUILD:5:1: C++ compilation of rule '//tensorflow/stream_executor:stream_e xecutor' failed: crosstool_wrapper_driver_is_not_gcc failed: error executing command third_party/gpus/crosstool/clang/bin/crosstool _wrapper_driver

ONOS安装

心不动则不痛 提交于 2019-12-04 17:56:28
本机安装教程(ubuntu) https://wiki.onosproject.org/display/ONOS/Developer+Quick+Start 安装bazel: https://docs.bazel.build/versions/master/install-ubuntu.html 其他依赖: git zip curl unzip python # 2.7 required by some development scripts python3 # Required by Bazel bzip2 # Needed by legacy GUI build 安装onos git clone https://gerrit.onosproject.org/onos cd onos bazel build onos onos编译安装报错解决办法 https://blog.csdn.net/daihanglai7622/article/details/88642998?tdsourcetag=s_pctim_aiomsg 运行onos bazel run onos-local -- clean debug # 'clean' to delete all previous running status # 'debug' to enable remote debugging

Tensorflow “undefined symbol” when loading custom GPU op

对着背影说爱祢 提交于 2019-12-04 16:11:33
I am using Tensorflow 1.9rc0 compiled from sources using bazel version 0.15.0. I'm using cuda support with cuda version 9.2 and cudnn version 7. I am trying to build a custom op which executes a cuda kernel. I've followed the doumentation regarding that matter and checked a few implemented ops in order to develop it. I ended up with the following code: kernel_example.h: #ifndef KERNEL_EXAMPLE_H_ #define KERNEL_EXAMPLE_H_ #include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor" #include "tensorflow/core/framework/tensor_types.h" #include "tensorflow/core/framework/register_types.h" #include

How can I make bazel use external storage when building?

 ̄綄美尐妖づ 提交于 2019-12-04 11:45:18
When building certain code with bazel I'm running out of storage space. I'd like bazel to store it's things on a USB drive instead of in my ~/.cache folder. How can I tell bazel to do this? Use the --output_user_root flag. Example: bazel --output_user_root=/path/to/directory build //foo:bar You can change the outputRoot directory by changing the $TEST_TMPDIR variable. export TEST_TMPDIR=/path/to/directory From the bazel docs : The outputRoot directory is ~/.cache/bazel . (Unless $TEST_TMPDIR is set, as in a test of bazel itself, in which case this directory is used instead.) 来源: https:/

TensorFlow fails to compile

不想你离开。 提交于 2019-12-04 10:25:10
Getting the following errors which trying to compile TensorFlow from source. Any thoughts would be helpful. bazel-out/host/bin/_solib_local/_U_S_Stensorflow_Spython_Cgen_Unn_Uops_Upy_Uwrappers_Ucc___Utensorflow/libtensorflow_framework.so: undefined reference to `cublasGemmEx@libcublas.so.9.0' bazel-out/host/bin/_solib_local/_U_S_Stensorflow_Spython_Cgen_Unn_Uops_Upy_Uwrappers_Ucc___Utensorflow/libtensorflow_framework.so: undefined reference to `cublasZhpmv_v2@libcublas.so.9.0' bazel-out/host/bin/_solib_local/_U_S_Stensorflow_Spython_Cgen_Unn_Uops_Upy_Uwrappers_Ucc___Utensorflow/libtensorflow

Importing Bazel Project fails in CLion on macOS

ⅰ亾dé卋堺 提交于 2019-12-04 09:50:52
I installed Bazel plugin on my CLion and am trying to import a new Bazel C++ project and I keep hitting into these errors- tensorflow_gpu-1.8.0lft1-cp27-cp27mu-linux_x86_64.whl is not a supported wheel on this platform. ERROR: error loading package '': Encountered error while reading extension file 'requirements.bzl': no such package '@my_deps//': Traceback (most recent call last): File "/private/var/tmp/_bazel_pmanjunath/0f9184e7a61c3740275307da0cc42014/external/io_bazel_rules_python/python/pip.bzl", line 39 _pip_import_impl(repository_ctx, "python") File "/private/var/tmp/_bazel_pmanjunath