当前位置:网站首页>AttributeError: module ‘torch._ C‘ has no attribute ‘_ cuda_ setDevice‘
AttributeError: module ‘torch._ C‘ has no attribute ‘_ cuda_ setDevice‘
2022-07-07 04:58:00 【Said the shepherdess】
stay Jetson Run on one PyTorch Reasoning program , After installing the basic environment , according to CUDA Version installed PyTorch.
CUDA Version is 11.4:

And then through PyTorch Official website Get installation command line :

After successful installation , When running the inference program, there is Error:

test CUDA, Found not available :

At first I suspected PyTorch Of CUDA Version of the problem , So we upgraded to 11.6, The problem remains .
The later positioning process :
(1) JetPack And PyTorch Compatibility problem , Reference link PyTorch for Jetson - version 1.11 now available - Jetson Nano - NVIDIA Developer Forums
I tried to download the following file , But the prompt during installation is similar to Platform Mismatch .
torch-1.12.0a0+2c916ef.nv22.3-cp38-cp38-linux_aarch64.whl
(2) Python Version of the problem : All materials mentioned that at present Jetson Only supported on Python3.6, And what we pretend is Python3.8. However, this step has not been verified , Later, it was located in the (3) After three reasons, the problem was solved directly .
(3) Ultimate solution
Finally, I found the web page :PyTorch for Jetson Platform
This page gives JetPack Version and PyTorch Version correspondence :

our JetPack It uses 5.0.1, Follow the table above , You should use 1.13 Of PyTorch edition , What we have been installing before is 1.12.
adopt This link Found a suitable for Jetson Of PyTorch1.13 Version download address :https://developer.download.nvidia.cn/compute/redist/jp/v50/pytorch/

Download the required version and install , then , The problem was solved !
边栏推荐
- 当 Knative 遇见 WebAssembly
- Thesis landing strategy | how to get started quickly in academic thesis writing
- Common methods of list and map
- Flask project uses flask socketio exception: typeerror: function() argument 1 must be code, not str
- STM32封装ESP8266一键配置函数:实现实现AP模式和STA模式切换、服务器与客户端创建
- 程序员上班摸鱼,这么玩才高端!
- Thread和Runnable创建线程的方式对比
- 什么是Web3
- Flask项目使用flask-socketio异常:TypeError: function() argument 1 must be code, not str
- STM32F103实现IAP在线升级应用程序
猜你喜欢

指针与数组在函数中输入实现逆序输出

Gavin teacher's perception of transformer live class - rasa project actual combat e-commerce retail customer service intelligent business dialogue robot microservice code analysis and dialogue experim

【线段树实战】最近的请求次数 + 区域和检索 - 数组可修改+我的日程安排表Ⅰ/Ⅲ

Decorator basic learning 02

Ansible报错:“msg“: “Invalid/incorrect password: Permission denied, please try again.“

How to open win11 remote desktop connection? Five methods of win11 Remote Desktop Connection

C语言中函数指针与指针函数

MySQL forgot how to change the password

Depth first traversal template principle of tree and graph

Function pointer and pointer function in C language
随机推荐
5G VoNR+之IMS Data Channel概念
01 machine learning related regulations
A picture to understand! Why did the school teach you coding but still not
Ansible中的inventory主机清单(预祝你我有数不尽的鲜花和浪漫)
Servicemesh mainly solves three pain points
PLC模拟量输出 模拟量输出FB analog2NDA(三菱FX3U)
Operand of null-aware operation ‘!‘ has type ‘SchedulerBinding‘ which excludes null.
How to package the parsed Excel data into objects and write this object set into the database?
计数排序基础思路
JDBC link Oracle reference code
How does vscade use the built-in browser?
Terms used in the Web3 community
Kivy tutorial of setting the size and background of the form (tutorial includes source code)
U++ 元数据说明符 学习笔记
The worse the AI performance, the higher the bonus? Doctor of New York University offered a reward for the task of making the big model perform poorly
Introduction to the PureMVC series
如何设计 API 接口,实现统一格式返回?
STM32封装ESP8266一键配置函数:实现实现AP模式和STA模式切换、服务器与客户端创建
【数模】Matlab allcycles()函数的源代码(2021a之前版本没有)
ServiceMesh主要解决的三大痛点