This error typically occurs when there is a mismatch between the versions of CUDA used to build PyTorch and the CUDA version installed on your system.

To resolve this issue, you can try the following steps:

  1. Make sure you have the correct version of CUDA installed on your system. You can check the version by running the following command:

    nvcc --version
    

    If the CUDA version doesn't match the one required by PyTorch, you may need to install the correct version.

  2. If you have multiple versions of CUDA installed, make sure that the correct version is being used by PyTorch. You can set the CUDA_HOME environment variable to the path of the correct CUDA installation. For example, if CUDA is installed in /usr/local/cuda-11.0, you can run:

    export CUDA_HOME=/usr/local/cuda-11.0
    
  3. If you have recently upgraded CUDA or PyTorch, try reinstalling PyTorch to ensure that it is built against the correct CUDA version. You can uninstall PyTorch using pip and then reinstall it using the appropriate command for your system. For example, if you want to install PyTorch with CUDA 11.0 support, you can run:

    pip uninstall torch
    pip install torch==1.9.0+cu110 -f https://download.pytorch.org/whl/torch_stable.html
    

    Make sure to replace 1.9.0+cu110 with the version of PyTorch that you want to install.

  4. If none of the above steps work, you may need to rebuild PyTorch from source using the correct CUDA version. Refer to the PyTorch documentation for instructions on how to build from source.

By following these steps, you should be able to resolve the ImportError related to cudaGraphDebugDotPrint and libcudart.so.11.0

ImportError usrlocallibpython38dist-packagestorchliblibtorch_cudaso undefined symbol cudaGraphDebugDotPrint version libcudartso110

原文地址: https://www.cveoy.top/t/topic/icw6 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录