Windows 10上的Cuda Bazel构建错误,如何解决?

如何解决Windows 10上的Cuda Bazel构建错误,如何解决?

我正在尝试通过Bazel在Windows 10 64bit上编译具有CUDA支持的Tensorflow内核(我需要GeForce3090 cc 8.6),方法是:https://www.tensorflow.org/install/source_windows

我使用以下构建字符串: bazel build --config = opt --config = cuda --define = no_tensorflow_py_deps = true // tensorflow / tools / pip_package:build_pip_package

我收到错误,就像下面这样:

我该如何解决?

感谢。

  > D:\Python\tensorflow>bazel build --config=opt --config=cuda
    > --define=no_tensorflow_py_deps=true //tensorflow/tools/pip_package:build_pip_package Extracting Bazel
    > installation... WARNING: Ignoring JAVA_HOME,because it must point to
    > a JDK,not a JRE. Starting local Bazel server and connecting to it...
    > WARNING: The following configs were expanded more than once: [cuda,> using_cuda]. For repeatable flags,repeats are counted twice and may
    > lead to unexpected behavior. INFO: Options provided by the client:  
    > Inherited 'common' options: --isatty=1 --terminal_columns=237 INFO:
    > Reading rc options for 'build' from d:\python\tensorflow\.bazelrc:  
    > Inherited 'common' options: --experimental_repo_remote_exec INFO:
    > Options provided by the client:   'build' options:
    > --python_path=C:/Program Files/Python37/python.exe INFO: Reading rc options for 'build' from d:\python\tensorflow\.bazelrc:   'build'
    > options: --apple_platform_type=macos --define
    > framework_shared_object=true --define open_source_build=true
    > --java_toolchain=//third_party/toolchains/java:tf_java_toolchain --host_java_toolchain=//third_party/toolchains/java:tf_java_toolchain --define=tensorflow_enable_mlir_generated_gpu_kernels=0 --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --spawn_strategy=standalone -c opt --announce_rc --define=grpc_no_ares=true --noincompatible_remove_legacy_whole_archive --noincompatible_prohibit_aapt1 --enable_platform_specific_config --config=short_logs --config=v2 INFO: Reading rc options for 'build' from d:\python\tensorflow\.tf_configure.bazelrc:   'build' options:
    > --action_env PYTHON_BIN_PATH=C:/Program Files/Python37/python.exe --action_env PYTHON_LIB_PATH=C:/Program Files/Python37/lib/site-packages --python_path=C:/Program
    > Files/Python37/python.exe --config=xla --action_env
    > CUDA_TOOLKIT_PATH=C:/Program Files/NVIDIA GPU Computing
    > Toolkit/CUDA/v11.1 --action_env TF_CUDA_COMPUTE_CAPABILITIES=5.2,8.6
    > --config=cuda --action_env TF_CONFIGURE_IOS=0 INFO: Found applicable config definition build:short_logs in file
    > d:\python\tensorflow\.bazelrc: --output_filter=DONT_MATCH_ANYTHING
    > INFO: Found applicable config definition build:v2 in file
    > d:\python\tensorflow\.bazelrc: --define=tf_api_version=2
    > --action_env=TF2_BEHAVIOR=1 INFO: Found applicable config definition build:xla in file d:\python\tensorflow\.bazelrc:
    > --define=with_xla_support=true INFO: Found applicable config definition build:cuda in file d:\python\tensorflow\.bazelrc:
    > --config=using_cuda --define=using_cuda_nvcc=true INFO: Found applicable config definition build:using_cuda in file
    > d:\python\tensorflow\.bazelrc: --define=using_cuda=true --action_env
    > TF_NEED_CUDA=1 --crosstool_top=@local_config_cuda//crosstool:toolchain
    > --define=tensorflow_enable_mlir_generated_gpu_kernels=1 INFO: Found applicable config definition build:opt in file
    > d:\python\tensorflow\.tf_configure.bazelrc: --copt=/arch:SSE4.2
    > --define with_default_optimizations=true INFO: Found applicable config definition build:cuda in file d:\python\tensorflow\.bazelrc:
    > --config=using_cuda --define=using_cuda_nvcc=true INFO: Found applicable config definition build:using_cuda in file
    > d:\python\tensorflow\.bazelrc: --define=using_cuda=true --action_env
    > TF_NEED_CUDA=1 --crosstool_top=@local_config_cuda//crosstool:toolchain
    > --define=tensorflow_enable_mlir_generated_gpu_kernels=1 INFO: Found applicable config definition build:windows in file
    > d:\python\tensorflow\.bazelrc: --copt=/W0 --copt=/D_USE_MATH_DEFINES
    > --host_copt=/D_USE_MATH_DEFINES --cxxopt=/std:c++14 --host_cxxopt=/std:c++14 --config=monolithic --copt=-DWIN32_LEAN_AND_MEAN --host_copt=-DWIN32_LEAN_AND_MEAN --copt=-DNOGDI --host_copt=-DNOGDI --copt=/experimental:preprocessor --host_copt=/experimental:preprocessor --linkopt=/DEBUG --host_linkopt=/DEBUG --linkopt=/OPT:REF --host_linkopt=/OPT:REF --linkopt=/OPT:ICF --host_linkopt=/OPT:ICF --experimental_strict_action_env=true --verbose_failures --distinct_host_configuration=false INFO: Found applicable config definition build:monolithic in file d:\python\tensorflow\.bazelrc:
    > --define framework_shared_object=false DEBUG: Rule 'io_bazel_rules_go' indicated that a canonical reproducible form can be obtained by
    > modifying arguments shallow_since = "1557349968 -0400" DEBUG:
    > Repository io_bazel_rules_go instantiated at:   no stack
    > (--record_rule_instantiation_callstack not enabled) Repository rule
    > git_repository defined at:  
    > C:/users/vladimir/_bazel_vladimir/sd7zocps/external/bazel_tools/tools/build_defs/repo/git.bzl:195:33:
    > in <toplevel> INFO: Repository local_config_cuda instantiated at:   no
    > stack (--record_rule_instantiation_callstack not enabled) Repository
    > rule cuda_configure defined at:  
    > D:/python/tensorflow/third_party/gpus/cuda_configure.bzl:1418:33: in
    > <toplevel> 

------------------------------------------------------------------------
**ERROR: An error occurred during the fetch of repository
    > 'local_config_cuda':**    Traceback (most recent call last):
    >         File "D:/python/tensorflow/third_party/gpus/cuda_configure.bzl",line 1388
    >                 _create_local_cuda_repository(<1 more arguments>)
    >         File "D:/python/tensorflow/third_party/gpus/cuda_configure.bzl",line 1064,> in _create_local_cuda_repository
    >                 _find_libs(repository_ctx,<2 more arguments>)
    >         File "D:/python/tensorflow/third_party/gpus/cuda_configure.bzl",line 599,> in _find_libs
    >                 _check_cuda_libs(repository_ctx,line 501,> in _check_cuda_libs
    >                 execute(repository_ctx,<1 more arguments>)***
    >         File "D:/python/tensorflow/third_party/remote_config/common.bzl",line 217,> in execute
    >                 fail(<1 more arguments>) Repository command failed "C:/Program" is not an internal or external command,executable
    > program,or batch file. 

---------------------------------------------------------------------------

ERROR: Skipping
    > '//tensorflow/tools/pip_package:build_pip_package': no such package
    > '@local_config_cuda//cuda': Traceback (most recent call last):
    >         File "D:/python/tensorflow/third_party/gpus/cuda_configure.bzl",<1 more arguments>)
    >         File "D:/python/tensorflow/third_party/remote_config/common.bzl",or batch file. WARNING: Target pattern parsing failed. ERROR:
    > no such package '@local_config_cuda//cuda': Traceback (most recent
    > call last):
    >         File "D:/python/tensorflow/third_party/gpus/cuda_configure.bzl",or batch file. INFO: Elapsed time: 47.934s INFO: 0 processes.
    > FAILED: Build did NOT complete successfully (0 packages loaded)
    >     currently loading: tensorflow/tools/pip_package

解决方法

摘要: 通过以下步骤解决了这个问题:

  1. 将Python从C:\ Program Files \ Python ...移至C:\ Python ... 然后我们需要在PATH变量中更改对应字符串 2)检查并删除另一个bash安装,例如msys64,检查:PATH变量中是否存在passway C:\ msys64 \ usr \ bin mast

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


依赖报错 idea导入项目后依赖报错,解决方案:https://blog.csdn.net/weixin_42420249/article/details/81191861 依赖版本报错:更换其他版本 无法下载依赖可参考:https://blog.csdn.net/weixin_42628809/a
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下 2021-12-03 13:33:33.927 ERROR 7228 [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPL
错误1:gradle项目控制台输出为乱码 # 解决方案:https://blog.csdn.net/weixin_43501566/article/details/112482302 # 在gradle-wrapper.properties 添加以下内容 org.gradle.jvmargs=-Df
错误还原:在查询的过程中,传入的workType为0时,该条件不起作用 &lt;select id=&quot;xxx&quot;&gt; SELECT di.id, di.name, di.work_type, di.updated... &lt;where&gt; &lt;if test=&qu
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct redisServer’没有名为‘server_cpulist’的成员 redisSetCpuAffinity(server.server_cpulist); ^ server.c: 在函数‘hasActiveC
解决方案1 1、改项目中.idea/workspace.xml配置文件,增加dynamic.classpath参数 2、搜索PropertiesComponent,添加如下 &lt;property name=&quot;dynamic.classpath&quot; value=&quot;tru
删除根组件app.vue中的默认代码后报错:Module Error (from ./node_modules/eslint-loader/index.js): 解决方案:关闭ESlint代码检测,在项目根目录创建vue.config.js,在文件中添加 module.exports = { lin
查看spark默认的python版本 [root@master day27]# pyspark /home/software/spark-2.3.4-bin-hadoop2.7/conf/spark-env.sh: line 2: /usr/local/hadoop/bin/hadoop: No s
使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -&gt; systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping(&quot;/hires&quot;) public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate&lt;String
使用vite构建项目报错 C:\Users\ychen\work&gt;npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-