Akasxh/gpucheck: pytest for GPU kernels
gpucheck is a pytest plugin designed for testing GPU kernels, simplifying the process of validating CUDA and Metal kernels. It offers features such as dtype-aware assertions, parametric testing, and memory leak detection. The plugin has been tested against various configurations, revealing several bugs and providing enhancements for Apple Silicon support.
- ▪gpucheck provides decorators and fixtures for easier GPU kernel testing.
- ▪The plugin has identified bugs in Triton tutorials and PyTorch CUDA operations.
- ▪New features in version 1.0 include an Apple Silicon MPS backend and HTML dashboard.
Opening excerpt (first ~120 words) tap to expand
gpucheck pytest for GPU kernels. GPU kernel testing is painful. You write a CUDA or Metal kernel, eyeball torch.allclose with magic tolerances, and pray it works on a different GPU architecture. gpucheck is a pytest plugin that gives you dtype-aware assertions, parametric testing across dtypes/shapes/devices, GPU-event benchmarking, shape and stride fuzzing, and memory leak detection -- all from decorators and fixtures you already know how to use. CUDA + Apple MPS are first-class.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at GitHub.