What problem does it solve?
Index and coordinate diffusion kernel development across CUDA, Triton, and CuTe DSL, providing a structured, end-to-end reference for building, testing, and profiling high-performance diffusion kernels within SGLang Diffusion.
Core Features & Use Cases
- Comprehensive kernel templates: Reusable CUDA/Triton/CuTe patterns for common diffusion operations (RMSNorm, AdaLN, RoPE, GEGLU, SiLU gate) with ready-to-adapt templates.
- Integration & testing guidance: Step-by-step instructions to wrap kernels with JIT loaders, patch diffusion models before torch.compile, and validate correctness with unit tests.
- Performance & profiling workflows: Detailed guidance for benchmarking, Nsight Compute profiling, and occupancy/throughput analysis to drive kernel optimization.
- Use Case: A developer adds a new CUDA kernel, wraps it with the Python JIT, validates against PyTorch baselines, and iterates with profiling to maximize end-to-end denoise throughput.
Quick Start
Author a CUDA kernel using the provided templates, wrap it with the Python launcher, and patch it into the Denoising stage before torch.compile.