add-jit-kernel

Automate adding, validating, and benchmarking JIT CUDA kernels for SGLang.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides developers to add a new lightweight JIT CUDA kernel to SGLang's jit_kernel module, streamlining integration and iterative testing.

Core Features & Use Cases

  • Step-by-step kernel implementation, Python wrapper, unit tests, and benchmarks for rapid validation.
  • Provides guidance on CUDA kernel organization, vectorization, and runtime launching patterns.
  • Real-world use: extend SGLang with a custom kernel for tensor operations with safe validation and performance checks.

Quick Start

Create a minimal CUDA kernel under jit_kernel/csrc, wrap it with a Python launcher, and run the tests to confirm correctness.

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 JIT CUDA kernel to SGLang?

To add a JIT CUDA kernel to SGLang, create a CUDA file under jit_kernel/csrc, wrap it with a Python launcher, and use LaunchKernel for safe GPU launches. This streamlines integration and iterative testing for custom tensor operations.

What is the best way to validate custom CUDA kernels during development?

The best way to validate custom CUDA kernels is by enforcing tensor validation via TensorMatcher and integrating unit tests. This ensures safe GPU launches and confirms computational correctness before deploying kernels.

How does SGLang handle GPU kernel launches and advanced scheduling?

SGLang handles GPU kernel launches safely using the LaunchKernel wrapper and supports Programmatic Dependent Launch (PDL) for advanced scheduling. This provides structured runtime launching patterns for custom CUDA operations.

How do I benchmark a new CUDA kernel for CI integration?

You can benchmark a new CUDA kernel by using provided scaffolding to integrate performance checks alongside unit tests for CI. This automates performance validation and ensures the custom kernel meets required efficiency standards.

Can I use this approach to extend SGLang with vectorized tensor operations?

Yes, you can extend SGLang with vectorized tensor operations by following guidance on CUDA kernel organization and vectorization. This allows rapid validation of custom tensor operations through Python wrappers and tests.