Provides guidance for writing and benchmarking optimized CUDA kernels for NVIDIA GPUs (H100, A100, T4) targeting HuggingFace diffusers and transformers libraries. Kernels must be kernel-builder/ABI3-compliant: no pybind11, no setup.py, TORCH_LIBRARY_EXPAND bindings only. Supports models like LTX-Video, Stable Diffusion, LLaMA, Mistral, and Qwen. Includes integration with HuggingFace Kernels Hub (get_kernel) for loading pre-compiled kernels. Includes benchmarking scripts to compare kernel performance against baseline implementations.
$npx -y skills add huggingface/kernels --skill cuda-kernelsInstalls into the current project.
Run `npx skills use "https://github.com/huggingface/kernels" --skill "huggingface/kernels/cuda-kernels"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.
Use the skills in "https://github.com/huggingface/kernels" that are relevant to the current task. Run `npx skills add "https://github.com/huggingface/kernels"` and select the relevant skills, then follow their instructions.