add-sgl-kernel

Community

Extend sgl-kernel with custom CUDA kernels.

Authorguqiong96
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill provides a comprehensive guide to integrating custom, heavyweight CUDA/C++ kernels into the sgl-kernel library, ensuring they are properly tested and benchmarked.

Core Features & Use Cases

  • Kernel Implementation: Step-by-step instructions for writing CUDA kernels for element-wise operations.
  • Integration Workflow: Details on updating C++ declarations, Torch extension registration, CMake build files, and Python APIs.
  • Testing & Benchmarking: Guidance on creating robust unit tests and performance benchmarks using pytest and Triton.
  • Use Case: A developer needs to add a highly optimized custom matrix multiplication kernel to sgl-kernel to accelerate a specific model inference task.

Quick Start

Follow the tutorial to implement a new CUDA kernel, add its C++ declaration, register it in common_extension.cc, update CMakeLists.txt, expose a Python API, write tests in tests/, and add a benchmark in benchmark/.

Dependency Matrix

Required Modules

None required

Components

scriptsreferences

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: add-sgl-kernel
Download link: https://github.com/guqiong96/Lsglang/archive/main.zip#add-sgl-kernel

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.