add-jit-kernel

Add a lightweight CUDA kernel to SGLang's jit_kernel module with validation and Python wrapper.

1|Updated May 8, 2026
One-click install
npx skills add https://github.com/dyyoungg/sglang-dev --skill add-jit-kernel-dyyoungg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-jit-kernel
Source: https://github.com/dyyoungg/sglang-dev/tree/main/.claude/skills/add-jit-kernel
Command: npx skills add https://github.com/dyyoungg/sglang-dev --skill add-jit-kernel-dyyoungg

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a comprehensive, step-by-step guide to adding a new lightweight JIT CUDA kernel to SGLang's jit_kernel module, including validation, launcher usage, and a Python wrapper, enabling rapid experimentation and integration.

Core Features & Use Cases

  • Step-by-step guide to implement a new lightweight JIT CUDA kernel following the SGLang abstractions
  • Validation and safety using TensorMatcher, SymbolicSize/Device, and LaunchKernel
  • End-to-end flow from CUDA kernel in csrc to Python wrapper and tests
  • Optional performance considerations (PDL, fast math) and a test/benchmark workflow
  • Reusable patterns for vectorized memory (AlignedVector) and runtime helpers

Quick Start

Follow the tutorial to implement a new element-wise JIT CUDA kernel, wire it into the Python wrapper, and run the unit tests.

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?

Adding a JIT CUDA kernel to SGLang involves writing the kernel in csrc, validating inputs with TensorMatcher, wrapping with a Python API, and adding tests and benchmarks for end-to-end reliability.

How does TensorMatcher validate inputs for a CUDA kernel?

TensorMatcher validates kernel inputs by enforcing constraints like SymbolicSize and Device, ensuring safety and portability before the kernel launches through the SGLang runtime utility suite.

What is the best way to ensure performance when adding a CUDA kernel wrapper?

To ensure performance, use project abstractions like LaunchKernel and AlignedVector for vectorized memory, and consider optional features like PDL and fast math during kernel implementation.

Do I need to write tests and benchmarks for an element-wise CUDA kernel?

Yes, adding tests and benchmarks is a required step in the workflow to achieve end-to-end reliability and measure the performance of your new element-wise JIT CUDA kernel.

Can I use SGLang abstractions to port existing CUDA kernels?

Yes, you can port existing kernels by enforcing SGLang abstractions such as LaunchKernel, AlignedVector, and the runtime utility suite to ensure safety, portability, and performance within the jit_kernel module.