You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[v0.2.4] Graceful Error Handling for Missing GPU Components #52
Never mention "CUDA Toolkit" in user-facing errors
CPU Fallback
Gracefully fall back to CPU mode when GPU unavailable
Log warning (not error) when falling back
Ensure all APIs work in CPU mode (NumPy backend)
Error Message Examples
No GPU Driver
PyGPUkit Error: NVIDIA GPU driver not found.
To use GPU features, install the NVIDIA GPU driver:
- Windows: https://www.nvidia.com/Download/index.aspx
- Linux: apt install nvidia-driver-535 (or your distro's package)
PyGPUkit will run in CPU-only mode.
Driver Too Old
PyGPUkit Error: NVIDIA driver version 470.xx is too old.
PyGPUkit requires driver version 520.xx or newer.
Please update your GPU driver:
- Windows: https://www.nvidia.com/Download/index.aspx
- Linux: apt install nvidia-driver-535
No NVIDIA GPU
PyGPUkit: No NVIDIA GPU detected.
PyGPUkit will run in CPU-only mode using NumPy.
For GPU acceleration, an NVIDIA GPU is required.
Never mention "CUDA Toolkit" in user-facing errors
CPU Fallback ✅
Gracefully fall back to CPU mode when GPU unavailable
Log warning (not error) when falling back
Ensure all APIs work in CPU mode (NumPy backend)
Example Error Messages
NVRTC not available:
NVRTC (NVIDIA Runtime Compiler) is not available.
JIT compilation of custom kernels requires NVRTC.
Pre-compiled GPU operations (matmul, add, mul) work without NVRTC.
To use custom JIT kernels, NVRTC can be obtained from:
https://developer.nvidia.com/cuda-downloads
Check availability: pygpukit.is_nvrtc_available()
Key principle: Users only need GPU drivers for pre-compiled ops. NVRTC is optional for JIT.
Activity
fix(ux): graceful error handling for missing GPU components (#52)
m96-chan commentedon Dec 14, 2025
Completed in PR #57
All tasks have been implemented:
Error Detection ✅
nvcuda.dll/libcuda.so)Error Messages ✅
CPU Fallback ✅
Example Error Messages
NVRTC not available:
Key principle: Users only need GPU drivers for pre-compiled ops. NVRTC is optional for JIT.
feat(v0.2.4): single-binary distribution with dynamic NVRTC loading (#57