add-jit-kernel

Automate adding JIT CUDA kernels to sglang's jit_kernel module with TensorMatcher validation.

9|Updated Feb 21, 2026
One-click install
npx skills add https://github.com/Fridge003/sglang-dev-tools --skill add-jit-kernel-fridge003
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-jit-kernel
Source: https://github.com/Fridge003/sglang-dev-tools/tree/main/ai-wheels/.claude/skills/add-jit-kernel
Command: npx skills add https://github.com/Fridge003/sglang-dev-tools --skill add-jit-kernel-fridge003

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Step-by-step guidance for adding a lightweight JIT CUDA kernel to sglang's jit_kernel module, enabling rapid prototyping and safe integration.

Core Features & Use Cases

  • Guided kernel design: lightweight JIT kernels suitable for rapid iteration.
  • Tensor validation & launch: validation with TensorMatcher and deterministic launches via LaunchKernel.
  • Real-world workflow: extendable for element-wise operations with vectorized memory patterns and runtime checks.

Quick Start

Implement the kernel scaffolding and validate with the provided 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 JIT CUDA kernel for rapid prototyping in sglang?

To add a JIT CUDA kernel in sglang, you implement lightweight element-wise operations using provided scaffolding, validate tensors with TensorMatcher, and execute deterministic launches via LaunchKernel for safe integration.

What is the best way to validate tensors before launching a custom GPU kernel?

The best way to validate tensors before launching a custom GPU kernel is using TensorMatcher, which ensures input tensors meet the required conditions for safe, deterministic execution via LaunchKernel.

How do I perform 128-bit aligned memory operations in a CUDA kernel?

To perform 128-bit aligned memory operations in a CUDA kernel, you use AlignedVector within the JIT kernel scaffolding, ensuring efficient vectorized memory patterns for element-wise operations.

Can I use JIT CUDA kernels for simple element-wise operations with runtime checks?

Yes, you can use JIT CUDA kernels for simple element-wise operations by integrating runtime checks with TensorMatcher and utilizing LaunchKernel to ensure deterministic and safe execution.

Does sglang's jit_kernel module support deterministic kernel launches?

Yes, sglang's jit_kernel module supports deterministic kernel launches through the provided LaunchKernel utility, which automates safe execution for rapidly prototyped JIT CUDA kernels.

When should I not use a JIT CUDA kernel for GPU prototyping?

You should not use a JIT CUDA kernel when your task requires complex operations beyond simple element-wise calculations, or when tensor validation constraints provided by TensorMatcher cannot be satisfied.