add-jit-kernel

Add and validate lightweight CUDA JIT kernels in SGLang's jit_kernel module.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a complete workflow for adding lightweight CUDA kernels to SGLang's JIT kernel module without requiring a full ahead-of-time kernel build.

Core Features & Use Cases

  • Kernel Implementation: Create CUDA kernels using SGLang's TensorMatcher, LaunchKernel, vectorized memory access, type traits, and device utilities.
  • Python Integration: Add thin, cached Python wrappers with dtype validation and runtime argument handling.
  • Testing and Benchmarking: Register correctness tests and performance benchmarks with SGLang's CI suite conventions.
  • Use Case: Use this Skill to add a new element-wise, normalization, quantization, or other lightweight CUDA operation with compilation, validation, test coverage, and benchmark integration.

Quick Start

Use the add-jit-kernel skill to implement, test, and benchmark a new lightweight CUDA operation in SGLang's jit_kernel module.

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 CUDA kernel to SGLang without ahead-of-time compilation?

You can add a CUDA kernel without ahead-of-time compilation by implementing it in SGLang's jit_kernel module. This workflow uses TensorMatcher, LaunchKernel, and device utilities to build lightweight GPU operations with runtime compilation.

What is the process for wrapping a JIT kernel in Python with dtype validation?

The process for wrapping a JIT kernel in Python involves creating a thin, cached Python wrapper that handles dtype validation and runtime argument management. This integrates the CUDA kernel with SGLang's Python execution environment.

How do I register correctness tests and performance benchmarks for a new GPU kernel?

To register correctness tests and performance benchmarks for a new GPU kernel, follow SGLang's CI suite conventions. This ensures your CUDA operation is validated for both accuracy and performance within the project's test suite.

Do I need specific GPU hardware to validate a lightweight CUDA operation in SGLang?

Yes, validating a lightweight CUDA operation in SGLang requires CUDA-capable hardware. The JIT kernel abstractions and benchmarking suite depend on actual GPU execution to test correctness and measure performance.

What types of lightweight operations are suitable for SGLang's JIT kernel module?

Operations suitable for SGLang's JIT kernel module include element-wise, normalization, and quantization tasks. These lightweight CUDA operations benefit from vectorized memory access and type traits without requiring full ahead-of-time builds.