首页 > 解决方案 > TensorFlow 构建失败,GPU '__NV_EXTRA_INITIALIZATION' 未在此范围内声明

问题描述

这是我第一次在 GPU 上工作。我遵循了 Tensorflow 安装指南https://www.tensorflow.org/install/gpu并尝试使用 bezel 构建它。但我收到以下错误

INFO: From Compiling external/nccl_archive/src/collectives/device/min_all_reduce.cu.cc:
ptxas warning : Too big maxrregcount value specified 96, will be ignored
INFO: From Compiling external/nccl_archive/src/collectives/device/max_all_reduce.cu.cc:
ptxas warning : Too big maxrregcount value specified 96, will be ignored
ERROR: /home/ubuntu/.cache/bazel/_bazel_ubuntu/3be25c7517fcab2b83999fe3669ecd1f/external/nccl_archive/BUILD.bazel:139:1: C++ compilation of rule '@nccl_archive//:device_code' failed (Exit 1)
bazel-out/k8-opt/bin/external/nccl_archive/device_code.cc:19:2: warning: #warning "crt/link.stub is an internal header file and must not be used directly.  Please use cuda_runtime_api.h or cuda_runtime.h instead." [-Wcpp]
 #warning "crt/link.stub is an internal header file and must not be used directly.  Please use cuda_runtime_api.h or cuda_runtime.h instead."
  ^
bazel-out/k8-opt/bin/external/nccl_archive/device_code.cc: In function 'void __cudaRegisterLinkedBinary(const __fatBinC_Wrapper_t*, void (*)(void**), void*)':
bazel-out/k8-opt/bin/external/nccl_archive/device_code.cc:140:5: error: '__NV_EXTRA_INITIALIZATION' was not declared in this scope
     __NV_EXTRA_INITIALIZATION
     ^
bazel-out/k8-opt/bin/external/nccl_archive/device_code.cc:144:5: error: '__NV_EXTRA_FINALIZATION' was not declared in this scope
     __NV_EXTRA_FINALIZATION
     ^
bazel-out/k8-opt/bin/external/nccl_archive/device_code.cc:145:23: warning: statement has no effect [-Wunused-value]
     for (__i = 0; __i < NUM_PRELINKED_OBJECTS; ++__i) {
                       ^
bazel-out/k8-opt/bin/external/nccl_archive/device_code.cc:145:53: error: expected ';' before ')' token
     for (__i = 0; __i < NUM_PRELINKED_OBJECTS; ++__i) {

附加信息:
Cuda 版本 10.0.130
CuDNN 7.3
Ubuntu 16.04.5 LTS
GPU:
00:03.0 VGA 兼容控制器 [0300]:NVIDIA Corporation GK104GL [GRID K520] [10de:118a] (rev a1) 子系统:NVIDIA Corporation GK104GL [GRID K520] [10de:1014] 正在使用的内核驱动程序:nvidia 内核模块:nvidia_410_drm、nvidia_410

标签: tensorflow

解决方案


推荐阅读