首页 > 其他分享 >【异常错误】RTX 4090 nvcc fatal : Unsupported gpu architecture ‘compute_89‘

【异常错误】RTX 4090 nvcc fatal : Unsupported gpu architecture ‘compute_89‘

时间:2024-05-30 15:45:17浏览次数:30  
标签:nvcc 4090 compute 12.2 cuda local usr

https://mapengsen.blog.csdn.net/article/details/137865369?spm=1001.2101.3001.6650.3&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EYuanLiJiHua%7EPosition-3-137865369-blog-123348901.235%5Ev43%5Epc_blog_bottom_relevance_base8&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EYuanLiJiHua%7EPosition-3-137865369-blog-123348901.235%5Ev43%5Epc_blog_bottom_relevance_base8&utm_relevant_index=6

 

 

可能在你执行一些程序的时候(例如安装adan的时候):

FORCE_CUDA=1 python -m pip install git+https://github.com/sail-sg/Adan.git

可能会出现错误

nvcc fatal : Unsupported gpu architecture 'compute_89'

方法一:
vi ~/.bashrc

# 在配置文件中添加如下一行

export TORCH_CUDA_ARCH_LIST="8.0" # 因为是CUDA11.0,对应的算力为8.0

source ~/.bashrc

我是用这个方法成功安装的

安装好以后再将bashrc中的那行代码注释掉

【Bug解决】nvcc fatal : Unsupported gpu architecture ‘compute_86‘_nvcc fatal : unsupported gpu architecture 'compute-CSDN博客

方法二:
原因是conda环境下cuda编译器nvcc不支持compute_89导致安装失败,运行项目的requirement.txt安装环境往往会默认安装低版本的cuda环境。

通过 nvcc --list-gpu-arch 来查看支持的编译器

如果没有compute_89(nvcc --version版本是11.5或者以下),就需要重新安装cuda和nvcc

以ubuntu22.04为例,依次运行一下代码:

wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin
sudo mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/12.2.0/local_installers/cuda-repo-ubuntu2204-12-2-local_12.2.0-535.54.03-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu2204-12-2-local_12.2.0-535.54.03-1_amd64.deb
sudo cp /var/cuda-repo-ubuntu2204-12-2-local/cuda-*-keyring.gpg /usr/share/keyrings/
sudo apt-get update
sudo apt-get -y install cuda
安装完成后,可以查看cuda 12.2版本安装位置

sudo find / -name cuda-12.2
一般在/usr/local/cuda-12.2下

修改.bashrc

vim ~/.bashrc
增加新cuda环境变量

export CUDA_HOME=/usr/local/cuda-12.2
export PATH=/usr/local/cuda-12.2/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-12.2/lib64:$LD_LIBRARY_PATH
更新环境变量

source ~/.bashrc
再次查看nvcc --list-gpu-arch是否有compute_89

如果没有的话,可以用which nvcc查看nvcc目录

which nvcc
如果nvcc目录不是/usr/local/cuda-12.2 ,需要重新配置,先备份下原环境,然后重新配置

sudo mv /usr/bin/nvcc /usr/bin/nvcc.bak
sudo ln -s /usr/local/cuda-12.2/bin/nvcc /usr/bin/nvcc
这样就可以了。
————————————————

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。

原文链接:https://blog.csdn.net/weixin_43135178/article/details/137865369

标签:nvcc,4090,compute,12.2,cuda,local,usr
From: https://www.cnblogs.com/wcxia1985/p/18222517

相关文章

  • 使用 Unity Barracuda 和 Compute Shader,Yolov2 进行高效物体识别
    前言通过整合UnityBarracuda和TinyYOLOv2模型,开发者可以在Unity中实现高效的实时物体识别功能。这种技术不仅可以增强游戏和应用的交互性,还可以应用于虚拟现实(VR)和增强现实(AR)等创新项目中,为用户创造更加沉浸和动态的体验。TinyYOLOv2模型概述TinyYOLOv2是YOLO(You......
  • RPhy2025电阻与温度换算计算器Resistor and temperature computer 2025 download
    本计算器可以计算电阻当前值、20摄氏度时的标准值、当前温度、温度差值、电阻温度系数之间的计算。本计算器带一个常见的物质的电阻温度系数的选择表。本软件是x64的软件,支持Win平台。价格便宜,只要50人民币或15美元或者欧元即可长期合法使用。价格廉价,没人付不起。Thiscalcula......
  • Nsight compute权限访问受阻问题
    在非root或sudoer用户下进行ncu命令分析cuda程序时,会报错RR_NVGPUCTRPERMTheuserrunning<tool_name/application_name>doesnothavepermissiontoaccessNVIDIAGPUPerformanceCountersonthetargetdevice.此时可以选择申请root权限或在docker内进行性能分析,目前还......
  • Windows computer File share Settings
    1. Searchfor"Manageadvancedsharingsettings"intheWindowslowerleftcornerandclicktheresult.Asshownbelow①,② 2.Thenselectthetwoitemsinthepop-uppage,asshowninthefigure③ 3.Thensearchfor"TurnWindowsfeatu......
  • Windows Basics - Finding Files on Your Computer Back to Tutorial
     everything 推荐用这个工具搜索文件 FindingfilesonyourcomputerInthepreviouslesson,wetalkedabouthowfolderscanhelptokeepyourfilesorganized.However,theremaybetimeswhenyouhavetroublefindingacertainfile.Ifthishappenstoyou......
  • Windows Basics - Common Computer Tasks
    CommoncomputertasksLearninghowtouseacomputercanfeeloverwhelmingattimes.Fortunately,therearesomecommoncomputerskillsthatwillworkthesamewayinalmostanysituation.Onceyoulearnhowtousetheseskills,you'llbeabletouse......
  • Computer Basics - Top 10 keyboard shortcuts everyone should know
    REFhttps://www.computerhope.com/tips/tip79.htmTop10keyboardshortcuts(快捷键)everyoneshouldknowUsingkeyboardshortcutscangreatlyincreaseyourproductivity,reducerepetitivestrain,andhelpkeepyoufocused.Forexample,tocopytext,youcanhi......
  • Computer Basics 10 - Setting Up a Computer
     Settingupacomputer НастройкакомпьютераSoyouhavea newcomputer andyou'rereadytosetitup.Thismayseemlikeanoverwhelming/ˌəʊvəˈwelmɪŋ/andcomplicated /ˈkɒmplɪkeɪtɪd/task,butit'sactuallyaloteasier......
  • Computer Basics 05 - Inside a Computer
    InsideacomputerHaveyoueverlookedinsideacomputercase,orseenpicturesoftheinsideofone?Thesmallpartsmaylookcomplicated,buttheinsideofacomputercaseisn'treallyallthatmysterious.Thislessonwillhelpyoumastersomeoft......
  • Computer Basics 03 - Basic Parts of a Computer
     IntroductionThebasicpartsofadesktopcomputerarethecomputercase,monitor,keyboard,mouse,andpowercord.Eachpartplaysanimportantrolewheneveryouuseacomputer.Watchthevideobelowtolearnaboutthebasicpartsofacomputer.(Video......