add-jit-kernel

Automate creation of JIT CUDA kernels for SGLang with bindings and tests.

Updated Jun 4, 2026
One-click install
npx skills add https://github.com/annealing-inversion/sglang-kimi-deferral --skill add-jit-kernel-annealing-inversion
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: add-jit-kernel
Source: https://github.com/annealing-inversion/sglang-kimi-deferral/tree/main/.claude/skills/add-jit-kernel
Command: npx skills add https://github.com/annealing-inversion/sglang-kimi-deferral --skill add-jit-kernel-annealing-inversion

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This tutorial provides a complete, end-to-end workflow for adding a new lightweight JIT CUDA kernel to SGLang's jit_kernel module, including implementation, wrapping, testing, and benchmarking.

Core Features & Use Cases

  • Guided kernel implementation: from CUDA/C++ entry to integration with sgl_kernel abstractions like TensorMatcher and LaunchKernel.
  • Python bindings & testing: step-by-step creation of Python wrappers and unit tests to ensure correctness and safety.
  • Performance benchmarking: built-in guidance and patterns for measuring kernel throughput with optional PDL support.

Quick Start

Follow the four steps to implement, wrap, test, and benchmark a new JIT CUDA kernel.

Frequently Asked Questions about add-jit-kernel

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

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

To add a new JIT CUDA kernel to SGLang, follow the workflow covering C++/CUDA implementation, Python bindings, unit tests, and benchmarks using sgl_kernel abstractions like TensorMatcher and LaunchKernel.

What is the process for testing and benchmarking custom CUDA kernels in SGLang?▼

Testing and benchmarking custom CUDA kernels in SGLang involves creating Python wrappers and unit tests for correctness, followed by measuring kernel throughput with built-in benchmarking patterns and optional PDL support.

Does SGLang support programmatic dependent launch for custom kernel development?▼

Yes, SGLang supports optional PDL (Programmatic Dependent Launch) for custom JIT kernel development, allowing you to enhance kernel throughput and performance during the benchmarking phase.

Can I use TensorMatcher and LaunchKernel for CUDA kernel validation in SGLang?▼

Yes, you can use TensorMatcher for validation and LaunchKernel for execution to ensure safe integration of your custom CUDA kernels with the sgl_kernel abstractions in SGLang.

What are the limitations when integrating lightweight JIT kernels with sgl_kernel abstractions?▼

When integrating JIT kernels with sgl_kernel abstractions, you must satisfy requirements like using TensorMatcher for validation and LaunchKernel for execution to ensure safe integration within the project's framework.