当前位置:网站首页>AttributeError: module ‘torch._C‘ has no attribute ‘_cuda_setDevice‘
AttributeError: module ‘torch._C‘ has no attribute ‘_cuda_setDevice‘
2022-07-06 22:15:00 【牧羊女说】
在Jetson上跑一个PyTorch推理程序,安装完基础环境之后,根据CUDA版本安装PyTorch。
CUDA版本为11.4:
然后通过PyTorch官网获取安装命令行:
安装成功后,运行推理程序时出现题目中的Error:
测试CUDA,发现不可用:
最开始怀疑PyTorch的CUDA版本问题,于是升级到11.6,该问题依然存在。
后来的定位经过:
(1) JetPack与PyTorch的兼容性问题,参考链接PyTorch for Jetson - version 1.11 now available - Jetson Nano - NVIDIA Developer Forums
尝试下载了如下文件,但安装时提示与Platform不匹配。
torch-1.12.0a0+2c916ef.nv22.3-cp38-cp38-linux_aarch64.whl
(2) Python版本问题:各项资料均提到目前Jetson上只能支持Python3.6,而我们装的是Python3.8。不过该步未验证,后来定位到了第(3)种原因后问题直接解决了。
(3) 终极方案
最后查找到该网页:PyTorch for Jetson Platform
该网页给出了JetPack版本和PyTorch版本的对应关系:
我们的JetPack使用的是5.0.1,按照上面表格,应该使用1.13的PyTorch版本,而我们之前一直安装的都是1.12。
通过该链接找到了适用于Jetson的PyTorch1.13版本下载地址:https://developer.download.nvidia.cn/compute/redist/jp/v50/pytorch/
下载需要的版本并安装,然后,问题就这样解决了!
边栏推荐
- jvm是什么?jvm调优有哪些目的?
- Wechat can play the trumpet. Pinduoduo was found guilty of infringement. The shipment of byte VR equipment ranks second in the world. Today, more big news is here
- 九章云极DataCanvas公司获评36氪「最受投资人关注的硬核科技企业」
- leetcode 53. Maximum subarray maximum subarray sum (medium)
- mpf2_ Linear programming_ CAPM_ sharpe_ Arbitrage Pricin_ Inversion Gauss Jordan_ Statsmodel_ Pulp_ pLU_ Cholesky_ QR_ Jacobi
- How to conduct website testing of software testing? Test strategy let's go!
- Complimentary tickets quick grab | industry bigwigs talk about the quality and efficiency of software qecon conference is coming
- 计数排序基础思路
- Field data acquisition and edge calculation scheme of CNC machine tools
- 掌握软件安全测试方法秘笈,安全测试报告信手捏来
猜你喜欢
acwing 843. n-皇后问题
Chapter 9 Yunji datacanvas was rated as 36 krypton "the hard core technology enterprise most concerned by investors"
DFS and BFS concepts and practices +acwing 842 arranged numbers (DFS) +acwing 844 Maze walking (BFS)
AI 落地新题型 RPA + AI =?
[team learning] [phase 34] Baidu PaddlePaddle AI talent Creation Camp
Chapter 9 Yunji datacanvas company won the highest honor of the "fifth digital finance innovation competition"!
acwing 843. N-queen problem
namespace基础介绍
这项15年前的「超前」技术设计,让CPU在AI推理中大放光彩
Vscode 如何使用内置浏览器?
随机推荐
Deeply cultivate the developer ecosystem, accelerate the innovation and development of AI industry, and Intel brings many partners together
How to solve the problem of adding RTSP device to easycvr cluster version and prompting server ID error?
Jetson nano配置pytorch深度学习环境//待完善
A picture to understand! Why did the school teach you coding but still not
R语言主成分pca、因子分析、聚类对地区经济研究分析重庆市经济指标
九章云极DataCanvas公司摘获「第五届数字金融创新大赛」最高荣誉!
Is there any way to bookmark the code in the visual studio project- Is there a way to bookmark code in a Visual Studio project?
In depth analysis of kubebuilder
Depth first traversal template principle of tree and graph
VM virtual machine operating system not found and NTLDR is missing
Data security -- 12 -- Analysis of privacy protection
一图看懂!为什么学校教了你Coding但还是不会的原因...
Chapter 9 Yunji datacanvas company has been ranked top 3 in China's machine learning platform market
A detailed explanation of head pose estimation [collect good articles]
leetcode 53. Maximum subarray maximum subarray sum (medium)
[team learning] [34 sessions] Alibaba cloud Tianchi online programming training camp
Kivy tutorial of setting the size and background of the form (tutorial includes source code)
Win11截图键无法使用怎么办?Win11截图键无法使用的解决方法
每人每年最高500万经费!选人不选项目,专注基础科研,科学家主导腾讯出资的「新基石」启动申报
The request request is encapsulated in uni app, which is easy to understand