【问题标题】:Tensorflow tfcompile: fail at step 2Tensorflow tfcompile:第 2 步失败
【发布时间】:2019-08-07 03:22:49
【问题描述】:

我关注https://www.tensorflow.org/xla/tfcompile,但在第 2 步失败。

怎么了?

cschen

~/git/tensorflow$ bazel build --config=opt //t1:test_graph_tfmatmul ...信息:找到适用的配置定义构建:download_clang in 文件 /home/cschen/git/tensorflow/.bazelrc: --crosstool_top=@local_config_download_clang//:toolchain --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

【问题讨论】:

    标签: tensorflow-xla


    【解决方案1】:

    不知道你用的是哪个版本,但是在TF1.14上,如果你git grep tools/target_cpu,你会在文件tensorflow/compiler/aot/tfcompile.bzl看到一个结果。

    tools目录中,没有任何让人联想到target_cpu的东西,所以我认为这一定是tfcompile.bzl的一个bug。当我注释掉引用 tools/target_cpu 的行时,问题就消失了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-10-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-12-05
      • 1970-01-01
      • 2017-09-05
      相关资源
      最近更新 更多