tensorflow-xla - Tensorflow tfcompile:第 2 步失败
问题描述
我关注https://www.tensorflow.org/xla/tfcompile,但在第 2 步失败。
怎么了?
陈
~/git/tensorflow$ bazel build --config=opt //t1:test_graph_tfmatmul ... 信息:在文件 /home/cschen/git/tensorflow/.bazelrc 中找到适用的配置定义 build:download_clang:--crosstool_top=@local_config_download_clang //:工具链 --define=using_clang=true --action_env TF_DOWNLOAD_CLANG=1 信息:找到适用的配置定义构建:在文件 /home/cschen/git/tensorflow/.tf_configure.bazelrc 中选择:--copt=-march=native --copt=-Wno-sign-compare --host_copt=-march=native --define with_default_optimizations=true 信息:构建选项 --cpu 已更改,丢弃分析缓存。错误:目标 '//t1:test_graph_tfmatmul' 的分析失败;构建中止:没有这样的包'tools/target_cpu':在包路径上找不到BUILD文件......
我从第 2 步复制到t1/BUILD,如下所示,
~/git/tensorflow$ cat t1/BUILD load("//tensorflow/compiler/aot:tfcompile.bzl", "tf_library") ...
预期的结果是生成头文件test_graph_tfmatmul.h
。
解决方案
我不知道您使用的是哪个版本,但是在 TF1.14 上,如果您使用git grep tools/target_cpu
,您将在文件中看到一个结果tensorflow/compiler/aot/tfcompile.bzl
。
在目录tools
中,没有任何让人联想到的东西target_cpu
,所以我想这一定是个bug tfcompile.bzl
。当我注释掉引用工具/target_cpu 的行时,问题就消失了。
推荐阅读
- html - 如何格式化 datetime-local 以读取超过三毫秒数字的日期
- python - TypeError:在 OPENCV 中迭代 0 维数组
- go - 使用 x/time/rate.Limiter 确定 N 个事件在几秒钟内发生
- database - 自动编号在添加记录之前创建新 ID
- asp.net - IIS 临时文件“错误方法令牌”
- swift - 如何帮助 Vapor 成功地与我的 PostgreSQL 服务器进行 SSL 握手?
- vue.js - Vue:Vuex 操作中的第二个状态未按预期触发
- mongodb - 如何在 mongodb 上实现聚合方法(管道)?
- arrays - 从多维数组中创建一个列表
- batch-file - 如何制作随机数/字母生成器?