add-jit-kernel

Add a JIT CUDA kernel to SGLang's jit_kernel module with Python wrapper and tests.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide provides a practical, end-to-end workflow to add a lightweight JIT CUDA kernel to SGLang's jit_kernel module, accelerating development and testing of GPU kernels.

Core Features & Use Cases

  • End-to-end kernel development: create CUDA code under jit_kernel/csrc, expose a Python wrapper, and integrate with the testing/benchmark framework.
  • Validated integration: relies on TensorMatcher for input validation and LaunchKernel for safe, robust launches.
  • Performance-oriented workflow: includes vectorization decisions, optional PDL usage, and unit/benchmark tests to measure throughput.

Quick Start

Create a new CUDA kernel, wrap it in Python, and run the included tests and benchmarks.

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 custom CUDA kernel to SGLang for tensor operations?

To add a custom CUDA kernel to SGLang, you create the CUDA code under the jit_kernel/csrc directory, expose it through a Python wrapper, and integrate it with the testing and benchmark framework to measure throughput.

What is the best way to validate inputs and safely launch a JIT CUDA kernel?

The best way to validate inputs and safely launch a JIT CUDA kernel is to use TensorMatcher for input validation and LaunchKernel for robust kernel launches within your Python wrapper integration.

Does SGLang support JIT compilation for performance-focused GPU kernels?

Yes, SGLang supports JIT compilation for performance-focused GPU kernels, enabling lightweight development and testing of elementwise computations and tensor operations directly within the jit_kernel module.

How do I benchmark a newly integrated CUDA kernel in SGLang?

You benchmark a newly integrated CUDA kernel in SGLang by utilizing the included unit and benchmark test scaffolding, which helps measure throughput and evaluate vectorization decisions and optional PDL usage.

Can I use SGLang's jit_kernel module for elementwise computations and vectorization?

Yes, you can use SGLang's jit_kernel module for elementwise computations, applying vectorization decisions and optional PDL usage to optimize performance for GPU-based tensor operations.