🧪 新しいチュートリアルを公開中 — ロボットアームからセンサーまで
コンテンツへスキップ
この製品を購入公式ストア公式サイト

Jetson Orin での PyTorch 非互換問題

発生しうる問題1: GPUが使用できない

jetson 版の pytorch をインストールします チュートリアル:https://docs.nvidia.com/deeplearning/frameworks/install-pytorch-jetson-platform/index.html

バージョンは自分で選べます:https://developer.download.nvidia.com/compute/redist/jp/

私が使用したバージョン: torch-2.5.0a0+872d972e41.nv24.08.17622132-cp310-cp310-linux_aarch64.whl

ダウンロード後、実行:

Plain
export TORCH_INSTALL=torch-2.5.0a0+872d972e41.nv24.08.17622132-cp310-cp310-linux_aarch64.whl
pip install --no-cache $TORCH_INSTALL

テスト:

Python
import torch
Python
torch.cuda.is_available()

発生しうる問題2: ImportError: libcusparseLt.so.0: cannot open shared object file: No such file or directory

解決方法: Jetson Orin プラットフォーム対応のcuSPARSELt ライブラリと一致する CUDA バージョン をインストールします

ダウンロードリンク:

https://developer.nvidia.com/cuda-12-6-0-download-archive?target_os=Linux&target_arch=aarch64-jetson&Compilation=Native&Distribution=Ubuntu&target_version=22.04&target_type=deb_local

https://developer.nvidia.com/cusparselt-downloads

発生しうる問題3: torchvision が利用できない

解決方法: 対応する vision バージョンを手動でインストールします。torch 2.5 -> torchvision 0.20.0

Python
git clone --branch v0.20.0 https://github.com/pytorch/vision.git

ダウンロード後、コンパイル:

Plain
export BUILD_VERSION=0.20.0
python3 setup.py install --user

参考リンク:https://zhuanlan.zhihu.com/p/1933164131969659101