【发布时间】:2019-07-17 19:04:06
【问题描述】:
我正在尝试使用启用了 LTCG(链接时间代码生成)的 VS 2017 在 Windows 上构建 Tensorflow 1.14。我在构建过程中遇到了这个崩溃:
external/bazel_tools/tools/def_parser/def_parser.exe bazel-out/x64_windows-opt/bin/tensorflow/contrib/layers/python/ops/_sparse_feature_cross_op.so.gen.def _sparse_feature_cross_op.so @bazel-out/x64_windows-opt/bin/tensorflow/contrib/layers/python/ops/_sparse_feature_cross_op.so.gen.def-0.params
ERROR: E:/tensorflow/tensorflow/contrib/layers/BUILD:22:1: DefParser tensorflow/contrib/layers/python/ops/_sparse_feature_cross_op.so.gen.def failed (Exit -1073741819): def_parser.exe failed: error executing command
我的环境是:
Tensorflow 版本:1.14(无源代码编辑)。取自 https://github.com/tensorflow/tensorflow.git,分支 r1.14
Visual Studio 版本:VS 2017
Bazel 版本:0.25.2
步骤:
set BAZEL_VC=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC
set BAZEL_VC_FULL_VERSION=14.16.27023
set BAZEL_VS=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise
python .\configure.py
<Use all of the defaults>
bazel build -s --config=opt --copt=/GL --linkopt=/LTCG //tensorflow/tools/pip_package:build_pip_package
我尝试了各种版本的 bazel(0.21、0.26、0.27、0.28),并在更改 BAZEL_* 环境变量时尝试了 VS 2019,但我仍然遇到同样的错误。我在本地运行了external/bazel_tools/tools/def_parser/def_parser.exe bazel-out/x64_windows-opt/bin/tensorflow/contrib/layers/python/ops/_sparse_feature_cross_op.so.gen.def _sparse_feature_cross_op.so @bazel-out/x64_windows-opt/bin/tensorflow/contrib/layers/python/ops/_sparse_feature_cross_op.so.gen.def-0.params 命令,它确实崩溃并显示-1073741819 错误代码。
有没有人有使用 LTCG 构建 Tensorflow 或使用 Bazel 和 LTCG 的经验?
【问题讨论】:
标签: windows tensorflow bazel