Hi,
I am using a Jetson Nano with the latest JetPack 4.6, which includes CUDA 10.2. It has come to my attention that PyTorch with GPU support for CUDA 10.2 is now outdated. Since the latest JetPack available is 4.6, it seems that I have no option left to utilize GPU with PyTorch on my Jetson Nano. I would greatly appreciate it if anyone could provide clarity or assistance regarding this matter.
ptrblck
December 16, 2024, 1:22pm
2
The latest JetPack is 6.1 supporting CUDA 12.6.
Hi @ptrblck , I had the chance to test the latest compatible PyTorch version on the latest JetPack 6.1. However, as I and a couple of others described in this topic, this combination seems to have a problem. Could you please look into the error and let us know if there are recommendations?
Hi, I’m also having the same problem on NVIDIA Jetson AGX Orin 64GB while using PyTorch 2.5.0a0+872d972e41.nv24.08 and JetPack 6.0 (but inside a JetPack 6.1-based docker container). My workload is related to some LLM/VLM application but the error is pretty much the same:
Process EmbeddingProcess-2:
Traceback (most recent call last):
File "/usr/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/opt/nvidia/myapp/process_base.py", line 188, in run
ite…
The same error is reproducible with the one line command described in this comment on GitHub:
opened 06:28AM - 20 Aug 24 UTC
closed 04:33PM - 20 Nov 24 UTC
triaged
### 🐛 Describe the bug
For given qkv with shape (1, 65536, 8, 128), I meet ``… `RuntimeError: CUDA error: invalid configuration argument for some input shape```:
```Python
import pickle
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
import time
def attention_pytorch_flash(qkv, dropout_p=0.0, causal=True):
"""
Arguments:
qkv: (batch_size, seqlen, 3, nheads, head_dim)
dropout_p: float
Output:
output: (batch_size, seqlen, nheads, head_dim)
"""
# batch_size, seqlen, _, nheads, d = qkv.shape
q, k, v = qkv.unbind(dim=2)
q = q.contiguous()
v = v.contiguous()
k = k.contiguous()
# with torch.backends.cuda.sdp_kernel(enable_flash=False, enable_math=False, enable_mem_efficient=True):
output = F.scaled_dot_product_attention(q, k, v)
return output.to(dtype=qkv.dtype)
qkv = torch.randn(1, 65536, 3, 8, 128).cuda().bfloat16()
for _ in range(100):
output = attention_pytorch_flash(qkv)
torch.cuda.synchronize()
start = time.time()
for _ in range(100):
output = attention_pytorch_flash(qkv)
torch.cuda.synchronize()
print("attention_pytorch_flash Time: ", (time.time()-start) / 100)
```
If I manually enable the math kernel, it works. If manually enable flash kernel, it reports similar error ```CUDA error (/opt/pytorch/pytorch/aten/src/ATen/native/transformers/cuda/flash_attn/fmha_fwd_launch_template.h:90): invalid configuration argument```.
If I change the seq_len ```65536``` to ```32768```, it works fine.
### Versions
Collecting environment information...
PyTorch version: 2.1.0a0+fe05266
Is debug build: False
CUDA used to build PyTorch: 12.1
ROCM used to build PyTorch: N/A
OS: Ubuntu 20.04.5 LTS (x86_64)
GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Clang version: Could not collect
CMake version: version 3.24.1
Libc version: glibc-2.31
Python version: 3.8.10 (default, Mar 13 2023, 10:26:41) [GCC 9.4.0] (64-bit runtime)
Python platform: Linux-5.4.0-139-generic-x86_64-with-glibc2.29
Is CUDA available: True
CUDA runtime version: 12.1.66
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration:
GPU 0: NVIDIA A100-SXM4-80GB
GPU 1: NVIDIA A100-SXM4-80GB
GPU 2: NVIDIA A100-SXM4-80GB
GPU 3: NVIDIA A100-SXM4-80GB
GPU 4: NVIDIA A100-SXM4-80GB
GPU 5: NVIDIA A100-SXM4-80GB
GPU 6: NVIDIA A100-SXM4-80GB
GPU 7: NVIDIA A100-SXM4-80GB
Nvidia driver version: 470.199.02
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.9.0
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.9.0
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.9.0
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.9.0
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.9.0
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.9.0
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.9.0
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
CPU:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
Address sizes: 46 bits physical, 57 bits virtual
CPU(s): 112
On-line CPU(s) list: 0-111
Thread(s) per core: 2
Core(s) per socket: 28
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 106
Model name: Intel(R) Xeon(R) Platinum 8350C CPU @ 2.60GHz
Stepping: 6
CPU MHz: 2593.902
BogoMIPS: 5187.80
Hypervisor vendor: KVM
Virtualization type: full
L1d cache: 2.6 MiB
L1i cache: 1.8 MiB
L2 cache: 70 MiB
L3 cache: 96 MiB
NUMA node0 CPU(s): 0-55
NUMA node1 CPU(s): 56-111
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown
Vulnerability Retbleed: Not affected
Vulnerability Spec store bypass: Vulnerable
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Vulnerable, IBPB: disabled, STIBP: disabled, PBRSB-eIBRS: Vulnerable
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves arat avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid md_clear arch_capabilities
Versions of relevant libraries:
[pip3] numpy==1.22.2
[pip3] onnx==1.13.1
[pip3] pytorch-quantization==2.1.2
[pip3] torch==2.1.0a0+fe05266
[pip3] torch-tensorrt==1.4.0.dev0
[pip3] torchtext==0.13.0a0+fae8e8c
[pip3] torchvision==0.15.0a0
[pip3] triton==2.0.0
[conda] Could not collect
cc @jbschlosser @bhosmer @cpuhrsch @erichan1 @drisspg @mikaylagawarecki
ptrblck
December 16, 2024, 5:59pm
4
The linked posts unfortunately do not provide any information about the use case and also don’t provide code snippets to reproduce the issue, so it’s unclear which part of the code fails.
From what I’ve read the issues are only raised if multiprocessing is used, so I assume other workloads are fine.
Hi,
I meant the latest jetpack version for “JETSON NANO DEVELOPER KIT” is 4.6 series is what I noticed in the NVIDIA website.