Kylin v10操作系统+ARM处理器+nvidia T4显卡编译GPU版本pytorch

本文详细介绍了如何在Kylin v10操作系统搭载ARM处理器的环境下,结合NVIDIA T4显卡,成功编译并运行GPU版本的PyTorch。通过这个过程,读者将了解到针对ARM架构的PyTorch优化技巧以及NVIDIA CUDA和cuDNN的配置方法。
import torch   #交互模式出现如下错误
OSError: libcurand.so.10: cannot open shared object file: No such file or directory

解决方法:
apt-get update && apt-get install -y --no-install-recommends gnupg2 ca-certificates

apt-key add /tmp/jetson.key   #jetson.key需下载

echo "deb https://repo.download.nvidia.com/jetson/common r32.4 main" >> /etc/apt/sources.list

apt-get update
apt-get install cuda-toolkit-10-2   #最后安装这个包解决
import torch  #交互模式运行代码出现以下错误
OSError: /usr/lib/aarch64-linux-gnu/libcudnn.so.8: file too short
解决方案:

apt-get install libcudnn8
#交互模式运行以下代码
import torch
torch.cuda.is_available()
>>True
torch.zeros((1,2,3,4), device=0)  #运行此行代码出现以下错误
RuntimeError: CUDA error: no kernel image is available for execution on the device
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值