add-jit-kernel

Add validated JIT CUDA kernels to SGLang's jit_kernel module.

556|81|Updated May 19, 2026
One-click install
npx skills add https://github.com/FutureMLS-Lab/OSCAR --skill add-jit-kernel-futuremls-lab
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-jit-kernel
Source: https://github.com/FutureMLS-Lab/OSCAR/tree/main/sglang-research/.claude/skills/add-jit-kernel
Command: npx skills add https://github.com/FutureMLS-Lab/OSCAR --skill add-jit-kernel-futuremls-lab

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a complete, repeatable workflow for adding lightweight JIT CUDA kernels to SGLang without overlooking tensor validation, Python integration, testing, benchmarking, or CI registration.

Core Features & Use Cases

  • CUDA Kernel Implementation: Create efficient element-wise kernels using SGLang's TensorMatcher, LaunchKernel, vectorized memory access, and device abstractions.
  • Python Integration: Build thin, cached JIT wrappers with dtype specialization, CUDA validation, and optional output handling.
  • Testing and Benchmarking: Add correctness tests, edge-case coverage, CI registrations, and performance comparisons against PyTorch.
  • Use Case: Use this Skill when contributing a new lightweight CUDA operation to SGLang's jit_kernel module and you need implementation guidance that aligns with project conventions.

Quick Start

Use the add-jit-kernel skill to create a new SGLang JIT CUDA kernel with its Python wrapper, tests, benchmark, and CI registrations.

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 with Python integration and testing?

To add a JIT CUDA kernel to SGLang, implement the kernel using TensorMatcher and LaunchKernel, create a cached Python wrapper with dtype specialization, and register correctness tests and benchmarks in CI. This workflow ensures tensor validation, vectorized memory access, and CUDA error handling conventions are met.

What is the process for validating tensors and handling errors in SGLang CUDA kernels?

Tensor validation and error handling in SGLang CUDA kernels use TensorMatcher for shape and dtype checks, and LaunchKernel for safe execution. Cached JIT compilation manages device abstractions, while supported dtypes and vectorized memory access optimize performance without large AOT dependencies.

Can I benchmark SGLang JIT CUDA kernels against PyTorch?

Yes, you can benchmark SGLang JIT CUDA kernels against PyTorch. The integration workflow includes adding performance comparisons and edge-case coverage to the test suite. CI registration ensures benchmarks run automatically, validating vectorized memory access and dtype specialization.

Does the SGLang jit_kernel module support element-wise operations without large AOT dependencies?

Yes, the SGLang jit_kernel module supports lightweight element-wise operations without large AOT dependencies. It uses cached JIT compilation, TensorMatcher validation, and vectorized memory access to implement and execute kernels efficiently across supported dtypes.

Why do my SGLang CUDA kernel tests fail during CI test-suite discovery?

SGLang CUDA kernel tests may fail during CI discovery if project conventions for test-suite registration are not followed. Ensure your implementation includes TensorMatcher validation, LaunchKernel execution, supported dtypes, vectorized memory access, and CUDA error handling to pass correctness and edge-case tests.

What's the best way to structure a cached JIT compilation wrapper for SGLang CUDA kernels?

The best way to structure a cached JIT compilation wrapper for SGLang CUDA kernels is to build a thin Python integration layer with dtype specialization, CUDA validation, and optional output handling. This aligns with SGLang conventions for TensorMatcher and LaunchKernel execution.