【问题标题】:A question about "Ignoring visible gpu device and Adding visible gpu device"关于“忽略可见 gpu 设备和添加可见 gpu 设备”的问题
【发布时间】:2020-07-16 08:45:47
【问题描述】:

我以两种方式运行 tf。

首先,我使用python3.5和tf 1.12.0,当我运行tf.Session()时,python3.5的输出是这样的:

2020-07-16 16:40:36.993973: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2020-07-16 16:40:37.191067: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1432] Found device 0 with properties: 
name: Tesla K80 major: 3 minor: 7 memoryClockRate(GHz): 0.8235
pciBusID: 0000:07:00.0
totalMemory: 11.92GiB freeMemory: 11.85GiB
2020-07-16 16:40:37.191124: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1511] Adding visible gpu devices: 0
2020-07-16 16:40:37.606605: I tensorflow/core/common_runtime/gpu/gpu_device.cc:982] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-07-16 16:40:37.606665: I tensorflow/core/common_runtime/gpu/gpu_device.cc:988]      0 
2020-07-16 16:40:37.606676: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1001] 0:   N 
2020-07-16 16:40:37.607545: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 11489 MB memory) -> physical GPU (device: 0, name: Tesla K80, pci bus id: 0000:07:00.0, compute capability: 3.7)
*********************************************************************************************************

然后,我使用带有 tf 1.12.0 的 C_API,以及 libtensorflow.so 和 libtensorflow_frame.soas copy form python3.5 packages. When I runTF_SessionRun()`,输出为:

TF VERSION:1.12.0
2020-07-16 15:49:22.423989: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
2020-07-16 15:49:22.631974: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1432] Found device 0 with properties: 
name: Tesla K80 major: 3 minor: 7 memoryClockRate(GHz): 0.8235
pciBusID: 0000:07:00.0
totalMemory: 11.92GiB freeMemory: 11.85GiB
2020-07-16 15:49:22.632046: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1482] Ignoring visible gpu device (device: 0, name: Tesla K80, pci bus id: 0000:07:00.0, compute capability: 3.7) with Cuda compute capability 3.7. The minimum required Cuda capability is 6.0.
2020-07-16 15:49:22.632067: I tensorflow/core/common_runtime/gpu/gpu_device.cc:982] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-07-16 15:49:22.632082: I tensorflow/core/common_runtime/gpu/gpu_device.cc:988]      0 
2020-07-16 15:49:22.632095: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1001] 0:   N 

为什么tf-gpu 1.12.0的python3.5可以用k80 gpu,而tf-gpu 1.12.0的c_api不能用k80?

【问题讨论】:

    标签: python c++ tensorflow


    【解决方案1】:

    您可以在错误消息中看到您需要具有6.0 计算能力的 GPU。你的 GPU 的计算能力是3.7

    Ignoring visible GPU device (device: 0, name: Tesla K80, pci bus id: 0000:07:00.0, compute capability: 3.7) with Cuda compute capability 3.7. The minimum required Cuda capability is 6.0.

    作为link 中的解决方案,有人建议降级到1.11.0,这解决了他的问题。

    【讨论】:

    • 对不起,我的问题是:为什么带有python3.5的tf1.12.0可以找到k80 gpu并可以使用它来运行,但是带有tf1.12.0的c_api给我一个警告,c_api可以找到k80但k80计算能力低于 tf1.12.0 要求。
    猜你喜欢
    • 2019-06-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-12-21
    • 2021-03-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多