【问题标题】:how does one fix when torch can't find cuda, error: version libcublasLt.so.11 not defined in file libcublasLt.so.11 with link time reference?当torch找不到cuda时如何解决,错误:版本libcublasLt.so.11未在文件libcublasLt.so.11中定义链接时间参考?
【发布时间】:2022-11-11 04:00:55
【问题描述】:

我通过 pytorch 导入 python -c "import torch" 收到此错误:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/afs/cs.stanford.edu/u/brando9/ultimate-utils/ultimate-utils-proj-src/uutils/__init__.py", line 13, in <module>
    import torch
  File "/dfs/scratch0/brando9/miniconda/envs/metalearning_gpu/lib/python3.9/site-packages/torch/__init__.py", line 191, in <module>
    _load_global_deps()
  File "/dfs/scratch0/brando9/miniconda/envs/metalearning_gpu/lib/python3.9/site-packages/torch/__init__.py", line 153, in _load_global_deps
    ctypes.CDLL(lib_path, mode=ctypes.RTLD_GLOBAL)
  File "/dfs/scratch0/brando9/miniconda/envs/metalearning_gpu/lib/python3.9/ctypes/__init__.py", line 382, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /dfs/scratch0/brando9/miniconda/envs/metalearning_gpu/lib/python3.9/site-packages/torch/lib/../../nvidia/cublas/lib/libcublas.so.11: symbol cublasLtHSHMatmulAlgoInit, version libcublasLt.so.11 not defined in file libcublasLt.so.11 with link time reference

如何解决它?

有关的:

【问题讨论】:

    标签: pytorch cuda


    【解决方案1】:

    我不知道为什么这有效,但这对我有用:

    source cuda11.1
    # To see Cuda version in use
    nvcc -V
    pip3 install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html
    

    但是如果您查看 git 问题,这些也可能有效:

    conda install -y -c pytorch -c conda-forge cudatoolkit=11.1 pytorch torchvision torchaudio
    
    pip3 install torch+cu111 torchvision torchaudio -f https://download.pytorch.org/whl/torch_stable.html
    

    我认为 conda 看起来是最强大的,因为您可以准确指定所需的 cudatoolkit,所以我推荐那个。

    【讨论】:

      猜你喜欢
      • 2022-11-14
      • 1970-01-01
      • 1970-01-01
      • 2023-03-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-13
      相关资源
      最近更新 更多