Custom-built PyTorch with CUDA 12.6 and cuDNN 9.3 support, specifically compiled for NVIDIA Jetson Orin Nano devices running JetPack 6.2.
TL;DR: NVIDIA's official PyTorch wheels for Jetson are built with cuDNN 8, but JetPack 6.2 ships with cuDNN 9.3. This incompatibility causes the official wheels to fail on JetPack 6.2 systems.
- JetPack 6.2 includes cuDNN 9.3.0 (modern version)
- NVIDIA's official Jetson PyTorch wheels are compiled against cuDNN 8.x (older version)
This repository provides a custom-built PyTorch 2.3.0 compiled specifically for JetPack 6.2 with:
- β CUDA 12.6 support (matches JetPack 6.2)
- β cuDNN 9.3.0 support (matches JetPack 6.2)
- β Optimized for Jetson Orin architecture (SM 8.7)
- β Full PyTorch functionality verified
| Component | JetPack 6.2 | NVIDIA Official Wheels | This Custom Build |
|---|---|---|---|
| CUDA | 12.6 | 12.x | β 12.6 |
| cuDNN | 9.3.0 | 8.x β | β 9.3.0 |
| Python | 3.10 | 3.8-3.10 | β 3.10 |
| Architecture | ARM64 | ARM64 | β ARM64 (Orin optimized) |
- Hardware: NVIDIA Jetson Orin Nano (or Orin NX/AGX)
- OS: Ubuntu 22.04
- JetPack: 6.2 (R36.4.4 or later)
- Python: 3.10.x
- Storage: 2GB+ free disk space
# 1. Download the latest release
wget https://github.com/YeQiao/pytorch-jetson-orin-nano/releases/download/v2.3.0-jetson/pytorch-2.3.0-jetson-orin-nano.tar.gz
# 2. Extract
tar -xzf pytorch-2.3.0-jetson-orin-nano.tar.gz
cd pytorch-jetson-dist
# 3. Run automated installer
./install_pytorch.shThe installer will:
- β Check system requirements
- β Install Python dependencies
- β Fix library compatibility issues
- β Install PyTorch wheel
- β Verify the installation
- β Run tests (optional)
python3 -c "import torch; print(f'PyTorch {torch.__version__}'); print(f'CUDA available: {torch.cuda.is_available()}')"Expected output:
PyTorch 2.3.0a0+git97ff6cf
CUDA available: True
The distribution package contains:
pytorch-jetson-dist/
βββ torch-2.3.0a0+git97ff6cf-cp310-cp310-linux_aarch64.whl # PyTorch wheel (195 MB)
βββ install_pytorch.sh # Automated installer
βββ test_pytorch.py # Comprehensive test suite (8 tests)
βββ requirements.txt # Python dependencies
βββ README.md # Complete documentation
βββ QUICKSTART.md # Quick installation guide
βββ DISTRIBUTION_GUIDE.md # Deployment options
This wheel was built from PyTorch source with the following configuration:
- Base System: Jetson Orin Nano with JetPack 6.2
- CUDA: 12.6 (
/usr/local/cuda-12.6) - cuDNN: 9.3.0 (
/usr/lib/aarch64-linux-gnu) - Python: 3.10
- Compiler: GCC 11.2.0
USE_CUDA=1 # Enable CUDA support
USE_CUDNN=1 # Enable cuDNN acceleration
USE_NCCL=0 # NCCL not available on Jetson
USE_DISTRIBUTED=0 # Distributed training disabled
TORCH_CUDA_ARCH_LIST="8.7" # Orin GPU architecture
MAX_JOBS=2 # Prevent OOM during compilation- PyTorch: 2.3.0a0+git97ff6cf
- CUDA Runtime: 12.6
- cuDNN: 9.3.0
- Python: 3.10
- Platform: Linux ARM64 (aarch64)
- Build Date: October 2025
- Jetson Orin Nano (4GB or 8GB)
- JetPack 6.2 (R36.4.4)
- Python 3.10
- 2GB free disk space
- 1GB free RAM (for installation)
- Jetson Orin Nano 8GB
- Active cooling
- Swap space enabled (4GB+)
- Fast storage (NVMe SSD preferred)
- β Jetson Orin Nano (4GB/8GB)
- β Jetson Orin NX (8GB/16GB)
- β Jetson AGX Orin (32GB/64GB)
Note: All must be running JetPack 6.2 with cuDNN 9.3
Error:
ImportError: /lib/libstdc++.so.6: version 'GLIBCXX_3.4.30' not found
Solution:
cd $CONDA_PREFIX/lib # or your Python lib directory
mv libstdc++.so.6 libstdc++.so.6.backup
ln -sf /usr/lib/aarch64-linux-gnu/libstdc++.so.6 libstdc++.so.6Note: The automated installer handles this automatically.
Error: torch.cuda.is_available() returns False
Solution:
# Verify CUDA installation
ls -la /usr/local/cuda-12.6
# Check environment variables
export CUDA_HOME=/usr/local/cuda-12.6
export LD_LIBRARY_PATH=/usr/local/cuda-12.6/lib64:$LD_LIBRARY_PATH
export PATH=/usr/local/cuda-12.6/bin:$PATH
# Verify cuDNN
ldconfig -p | grep cudnnError: Symbol cuDNNGetXXX not found
Cause: You're trying to use an official wheel built for cuDNN 8
Solution: Use this custom build instead (built for cuDNN 9.3)
Error: Wheel is not compatible
Cause: This wheel requires Python 3.10
Solution:
# Check Python version
python3 --version # Should show 3.10.x
# If using conda
conda create -n pytorch python=3.10
conda activate pytorchSolution:
# Enable swap
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfileimport torch
# Create tensors
x = torch.randn(3, 3)
y = torch.randn(3, 3)
# Move to GPU
x = x.cuda()
y = y.cuda()
# Perform operations
z = torch.mm(x, y)
print(z)import torch
import torch.nn as nn
import torch.optim as optim
# Define model
class SimpleNet(nn.Module):
def __init__(self):
super().__init__()
self.fc1 = nn.Linear(784, 128)
self.fc2 = nn.Linear(128, 10)
def forward(self, x):
x = torch.relu(self.fc1(x))
x = self.fc2(x)
return x
# Create model and move to GPU
model = SimpleNet().cuda()
# Loss and optimizer
criterion = nn.CrossEntropyLoss()
optimizer = optim.Adam(model.parameters(), lr=0.001)
# Training loop
for epoch in range(10):
# Your training code here
outputs = model(inputs)
loss = criterion(outputs, labels)
optimizer.zero_grad()
loss.backward()
optimizer.step()import torch
import torch.nn as nn
# Download and use pre-trained model
# First install torchvision: pip install torchvision
from torchvision import models, transforms
from PIL import Image
# Load pre-trained ResNet
model = models.resnet18(pretrained=True).cuda()
model.eval()
# Prepare image
transform = transforms.Compose([
transforms.Resize(256),
transforms.CenterCrop(224),
transforms.ToTensor(),
transforms.Normalize(mean=[0.485, 0.456, 0.406],
std=[0.229, 0.224, 0.225])
])
# Inference
img = Image.open('image.jpg')
img_tensor = transform(img).unsqueeze(0).cuda()
with torch.no_grad():
output = model(img_tensor)
pred = output.argmax(dim=1)Run the included test suite to verify all functionality:
cd pytorch-jetson-dist
python3 test_pytorch.pyTest Coverage:
- β PyTorch Import
- β Version Information
- β CUDA Support Detection
- β Basic Tensor Operations
- β CUDA Tensor Operations
- β Neural Network Forward/Backward
- β Autograd Functionality
- β Training Loop
- TorchVision - Computer vision models
- TorchAudio - Audio processing
- Jetson Containers - Docker containers for Jetson
Found a problem? Please open an issue with:
- Your JetPack version (
cat /etc/nv_tegra_release) - Python version (
python3 --version) - Error message and stack trace
- Steps to reproduce
Have a suggestion? Open an issue describing:
- The feature you'd like
- Why it would be useful
- Example use case
This wheel is built from PyTorch source code, which is licensed under BSD-3-Clause.
- Original PyTorch: https://github.com/pytorch/pytorch
- PyTorch License: https://github.com/pytorch/pytorch/blob/main/LICENSE
This is an unofficial build created for compatibility with JetPack 6.2. For official NVIDIA Jetson PyTorch support, see:
- PyTorch Team - For the incredible deep learning framework
- NVIDIA - For Jetson platform and development tools
- Jetson Community - For feedback and testing
- Open Source Community - For making this possible
On Jetson Orin Nano 8GB:
- ResNet-18 Inference: ~30-40 FPS (224x224 images)
- MobileNetV2 Inference: ~60-80 FPS (224x224 images)
- Training Small Models: Feasible with batch size 8-16
- Memory Usage: ~500MB base + model size
- Use Mixed Precision:
torch.cuda.ampfor faster training - Optimize Batch Size: Start small and increase gradually
- Enable CUDA Graphs: For repetitive operations
- Use TensorRT: Convert models for production inference
- Monitor Temperature: Use active cooling for sustained workloads
- Release Date: October 2025
- PyTorch Version: 2.3.0a0+git97ff6cf
- Status: Stable, production-ready
- PyTorch 2.4+ when available
- TorchVision pre-built wheel
- TorchAudio support
- Performance benchmarks
- Docker container
Watch this repository for new releases and updates.
Q: Why not use NVIDIA's official wheels? A: NVIDIA's wheels are built for cuDNN 8, but JetPack 6.2 includes cuDNN 9.3, causing incompatibility.
Q: Is this stable for production? A: Yes, all core features have been tested. However, test thoroughly for your specific use case.
Q: Can I use this with TorchVision?
A: Yes! Install with pip install torchvision after installing this PyTorch build.
Q: Will this work on Jetson Xavier or Nano? A: No, this is specifically for Orin devices with JetPack 6.2. Xavier/Nano use different architectures.
Q: How do I upgrade? A: Download the new release and run the installer again. It will upgrade automatically.
Q: Can I build this myself? A: Yes! See the build configuration section. Build time is ~6-8 hours on Orin Nano.
Built with β€οΈ for the Jetson Community