日本免费高清视频-国产福利视频导航-黄色在线播放国产-天天操天天操天天操天天操|www.shdianci.com

學(xué)無(wú)先后,達(dá)者為師

網(wǎng)站首頁(yè) 編程語(yǔ)言 正文

當(dāng)pytorch找不到 CUDA 時(shí),如何修復(fù)錯(cuò)誤:版本 libcublasLt.so.11 未在帶有鏈接時(shí)間引用的文件 libcublasLt.so.11 中定義?

作者:別出BUG求求了 更新時(shí)間: 2023-11-16 編程語(yǔ)言

在import torch 時(shí)報(bào)出以下錯(cuò)誤:

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

解決辦法:

這個(gè)問(wèn)題的根本原因是,pytorch版本和cuda對(duì)不上,因此需要安裝一個(gè)符合版本的pytorch

  1. 查看版本
nvcc -V

在這里插入圖片描述
可以得知cuda版本為11.1

  1. 查看torch官網(wǎng)后重新安裝即可:

找到對(duì)應(yīng)的上cuda版本的即可
在這里插入圖片描述

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

原文鏈接:https://blog.csdn.net/weixin_39589455/article/details/128161343

  • 上一篇:沒(méi)有了
  • 下一篇:沒(méi)有了
欄目分類
最近更新