cuda
Installation
SKILL.md
CUDA
Purpose
Guide agents through NVIDIA CUDA C/C++ development: kernel launch configuration, the memory hierarchy from registers through global memory, asynchronous execution with streams, nvcc compilation flags, Thrust library usage, and diagnosing common performance pitfalls like warp divergence and uncoalesced memory access.
When to Use
- Writing or optimizing a CUDA kernel for matrix multiply, reduction, or stencil operations
- Choosing block/grid dimensions and estimating occupancy
- Debugging slow kernels due to memory access patterns or low occupancy
- Setting up multi-stream pipelines with async
cudaMemcpyAsync - Compiling with nvcc and selecting architecture flags (
-gencode) - Using Thrust for parallel primitives instead of hand-written kernels