add-sgl-kernel

Integrate AOT CUDA/C++ kernels into sgl-kernel with CMake and tests.

4|2|Updated Feb 19, 2026
One-click install
npx skills add https://github.com/drunkcoding/AgentSkillsArxiv --skill add-sgl-kernel-drunkcoding
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-sgl-kernel
Source: https://github.com/drunkcoding/AgentSkillsArxiv/tree/main/skills/sglang/add-sgl-kernel
Command: npx skills add https://github.com/drunkcoding/AgentSkillsArxiv --skill add-sgl-kernel-drunkcoding

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a guided, end-to-end workflow to add a heavyweight AOT CUDA/C++ kernel to sgl-kernel, including tests and benchmarks, so developers can extend the kernel ecosystem without boilerplate errors.

Core Features & Use Cases

  • End-to-end kernel integration: csrc implementation, include declarations, and torch extension wiring.
  • Build and test automation: CMake integration, unit tests, and benchmarking harness to compare against PyTorch baselines.
  • Reusable workflow: applies to similar kernel development tasks requiring CMake, op registration, and Python bindings.

Quick Start

Follow the end-to-end process to implement and integrate a heavyweight AOT CUDA/C++ kernel into sgl-kernel, including tests and benchmarks.

Frequently Asked Questions about add-sgl-kernel

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a custom CUDA kernel to sgl-kernel?

Adding a custom CUDA kernel to sgl-kernel requires placing the C++ source files, wiring CMake, registering the op, creating Python bindings, and implementing standardized tests and benchmarks against PyTorch baselines.

What is the process for integrating AOT C++ kernels into the sgl-kernel ecosystem?

Integrating AOT C++ kernels into the sgl-kernel ecosystem involves a guided end-to-end workflow that automates csrc implementation, include declarations, torch extension wiring, and build validation to prevent boilerplate errors.

How do I set up benchmarks to compare my GPU kernel against PyTorch baselines?

Setting up GPU kernel benchmarks against PyTorch baselines is achieved through the standardized benchmarking harness included in the kernel integration workflow, which automates performance validation for new CUDA kernels.

Does this workflow handle CMake wiring and torch extension registration automatically?

Yes, the workflow handles CMake wiring and torch extension registration automatically, enforcing the required steps for op registration and Python bindings to ensure the GPU kernel integrates correctly into the sgl-kernel ecosystem.

Can I use this for lightweight CUDA kernels or is it only for heavyweight AOT kernels?

This workflow is specifically designed for heavyweight AOT CUDA/C++ kernel integration into sgl-kernel. It manages complex end-to-end tasks like CMake wiring, op registration, and benchmark harnessing required for substantial kernel development.