add-sgl-kernel

Implement AOT CUDA/C++ kernels in sgl-kernel with tests and benchmarks.

Updated May 30, 2026
One-click install
npx skills add https://github.com/QingHuan-6/SglangGen --skill add-sgl-kernel-qinghuan-6
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-sgl-kernel
Source: https://github.com/QingHuan-6/SglangGen/tree/main/.claude/skills/add-sgl-kernel
Command: npx skills add https://github.com/QingHuan-6/SglangGen --skill add-sgl-kernel-qinghuan-6

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Step-by-step guidance for implementing and integrating a heavyweight AOT CUDA/C++ kernel into the sgl-kernel project, including tests and benchmarks.

Core Features & Use Cases

  • End-to-end kernel integration: C++ kernel, Python extension, and build wiring.
  • Includes tests and benchmarks to validate correctness and performance.
  • Use Case: Add a new CUDA kernel to sgl-kernel and validate via unit tests and a benchmark suite.

Quick Start

Follow this workflow to implement a new heavyweight AOT CUDA/C++ kernel in sgl-kernel and verify it with tests and benchmarks.

Frequently Asked Questions about add-sgl-kernel

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new CUDA kernel to SGLang?

To add a CUDA kernel to SGLang, you implement the C++ kernel, wire the Python extension, configure the build, and validate it with tests and benchmarks. This provides end-to-end guidance for integrating AOT kernels into sgl-kernel.

How do I integrate a CUTLASS kernel into sgl-kernel?

Integrating a CUTLASS kernel into sgl-kernel involves implementing the C++ kernel, registering the Torch extension, and configuring the build system. This covers full integration from C++ implementation to Python binding and validation.

What is the workflow for adding an AOT CUDA C++ kernel to a Torch extension?

The workflow for adding an AOT CUDA C++ kernel to a Torch extension includes writing the C++ code, setting up Python bindings, and building the extension. It ensures kernel development and Torch extension registration are handled correctly.

Can I use sgl-kernel to add CUDA kernels that depend on large C++ projects?

Yes, sgl-kernel supports adding CUDA kernels that depend on large C++ projects like CUTLASS. The workflow specifically applies to adding new kernels with heavyweight dependencies and covers the required build wiring.

How do I validate a new CUDA kernel in SGLang?

You validate a new CUDA kernel in SGLang by running unit tests and a benchmark suite. This ensures the correctness and performance of the integrated kernel are comprehensively verified before deployment.