You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

TensorFlow GPU版无法启用求助:CUDA计算能力不兼容问题

Fixing TensorFlow GPU Fallback to CPU with Quadro K1000M (Compute Capability 3.0)

Hey there! Let's break down what's happening with your TensorFlow setup and get it working properly.

The Root Cause

Your Quadro K1000M has a CUDA compute capability of 3.0, but the TensorFlow GPU version you installed requires a minimum compute capability of 3.7. When TensorFlow detects your GPU doesn't meet this requirement, it automatically falls back to using the CPU (even if you didn't install the standalone CPU version—GPU packages include CPU support as a fallback). That's why you're seeing the warning and the "no known devices" message.

Step-by-Step Solutions

  • Downgrade TensorFlow to a version that supports compute capability 3.0
    TensorFlow versions up to 1.13.x still support GPUs with compute capability 3.0. Since you're using Python 3.5 and CUDA 9.0, the best compatible versions are TensorFlow 1.12.0 or 1.13.1. Here's how to install it:

    1. First, uninstall your current TensorFlow GPU version:
      pip uninstall tensorflow-gpu
      
      (Use pip3 instead if you're targeting Python 3 specifically.)
    2. Install the matching version:
      pip install tensorflow-gpu==1.12.0
      
  • Install the correct cuDNN version
    TensorFlow 1.12.0 requires cuDNN 7.1.x to work with CUDA 9.0. Download this specific cuDNN version, then copy its files into your CUDA 9.0 installation directory:

    • Copy files from the cuDNN bin folder to CUDA_PATH\bin
    • Copy files from the cuDNN include folder to CUDA_PATH\include
    • Copy files from the cuDNN lib\x64 folder to CUDA_PATH\lib\x64
  • Verify your setup
    Run this code to check if TensorFlow now recognizes your GPU:

    import tensorflow as tf
    sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
    sess.close()
    

    If successful, you'll see log messages confirming that TensorFlow has detected your Quadro K1000M GPU.

  • Double-check environment variables
    Make sure your system has the right CUDA environment variables configured:

    • For Windows: Set CUDA_PATH to point to your CUDA 9.0 folder, and add %CUDA_PATH%\bin to your PATH variable.
    • For Linux: Add these lines to your shell profile (like .bashrc or .zshrc):
      export CUDA_HOME=/usr/local/cuda-9.0
      export LD_LIBRARY_PATH=$CUDA_HOME/lib64:$LD_LIBRARY_PATH
      

内容的提问来源于stack exchange,提问作者alyaa mahdi

火山引擎 最新活动