Troubleshooting
Common issues and solutions for CUDA Kernel Academy.
Compilation Errors
nvcc: command not found
bash
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATHGCC Version Mismatch
| CUDA Version | Supported GCC |
|---|---|
| CUDA 11.x | GCC ≤ 10 |
| CUDA 12.0-12.2 | GCC ≤ 12 |
| CUDA 12.3+ | GCC ≤ 13 |
bash
cmake .. -DCMAKE_CUDA_HOST_COMPILER=/usr/bin/g++-11GPU Architecture Mismatch
bash
nvidia-smi --query-gpu=compute_cap --format=csv
cmake .. -DCMAKE_CUDA_ARCHITECTURES=86Runtime Errors
CUDA error: out of memory
bash
nvidia-smi # Check GPU memory usageCUDA error: illegal memory access
bash
compute-sanitizer --tool memcheck ./your_programModule-Specific Issues
03-hpc-advanced build fails
Requires CUDA 12.0+ and C++20 support.
bash
nvcc --version04-inference-engine link errors
Depends on tensorcraft-core.
bash
cmake .. -DBUILD_TENSORCRAFT=ONDebugging Tools
| Tool | Purpose | Command |
|---|---|---|
| compute-sanitizer | Memory check | compute-sanitizer ./program |
| nsys | System profiling | nsys profile ./program |
| ncu | Kernel profiling | ncu ./program |