add-sgl-kernel

Implement and integrate CUDA/C++ kernels into sgl-kernel for tensor operations.

12|2|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/scottgl9/sglang-spark-gb10-optimizations --skill add-sgl-kernel-scottgl9
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-sgl-kernel
Source: https://github.com/scottgl9/sglang-spark-gb10-optimizations/tree/main/.claude/skills/add-sgl-kernel
Command: npx skills add https://github.com/scottgl9/sglang-spark-gb10-optimizations --skill add-sgl-kernel-scottgl9

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a comprehensive tutorial on integrating new heavyweight CUDA/C++ kernels into the sgl-kernel framework, simplifying the development process for high-performance tensor operations.

Core Features & Use Cases

  • Step-by-step Implementation Guidance: Walks through creating, registering, and testing custom kernels compatible with PyTorch.
  • Workflow Integration: Demonstrates how to extend the library with new operations like elementwise scaling and register them for GPU execution.
  • Use Case: A developer wants to implement a custom scaling kernel for a deep learning model to optimize some layer computations and ensure efficient deployment.

Quick Start

Follow this tutorial to add a new custom kernel, compile it, run tests, and benchmark its performance within the sgl-kernel framework.

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 custom CUDA kernels to sgl-kernel for PyTorch extensions?

You add custom CUDA kernels to sgl-kernel by following a guided workflow for code creation, registration, and testing to integrate high-performance tensor operations as PyTorch extensions.

What is the process for registering a new C++ kernel for GPU programming in sgl-kernel?

Registering a new C++ kernel in sgl-kernel involves extending the library with your custom operation, such as elementwise scaling, and explicitly registering it for GPU execution to enable high-performance tensor computations.

Can I benchmark PyTorch extension performance when integrating CUDA kernels into sgl-kernel?

Yes, you can benchmark performance when integrating CUDA kernels into sgl-kernel, as the workflow specifically includes running benchmarks to validate and measure the efficiency of your custom GPU tensor operations.

When do I need custom CUDA kernel development for deep learning model optimization?

You need custom CUDA kernel development when optimizing specific deep learning model computations, allowing you to implement operations like elementwise scaling for efficient GPU execution and deployment.

What's the best way to test custom tensor operations added to the sgl-kernel framework?

The best way to test custom tensor operations in sgl-kernel is to use the framework's integrated testing phase, which validates your newly registered CUDA/C++ kernels for correct and efficient execution before deployment.