add-cuda-kernel

Add CUDA kernels to FlashInfer with JIT and TVM-FFI bindings.

Updated Feb 10, 2026
One-click install
npx skills add https://github.com/jwu1980-test/flashinfer --skill add-cuda-kernel-jwu1980-test
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-cuda-kernel
Source: https://github.com/jwu1980-test/flashinfer/tree/main/.claude/skills/add-cuda-kernel
Command: npx skills add https://github.com/jwu1980-test/flashinfer --skill add-cuda-kernel-jwu1980-test

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enables custom CUDA kernels to be added to FlashInfer, expanding the library with user-defined GPU operations and custom workloads.

Core Features & Use Cases

  • Step-by-step guidance to implement a minimal CUDA kernel, register it with the FlashInfer runtime, and validate correctness on CUDA devices.
  • Demonstrates integration with the existing csrc and jit binding layers, ensuring proper data flow, error handling, and build configuration.
  • Use case: add a simple element-wise kernel or small neural operation to accelerate specific workloads.

Quick Start

Follow this instruction to implement a basic CUDA kernel and wire it into FlashInfer.

Frequently Asked Questions about add-cuda-kernel

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

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

To add a custom CUDA kernel to FlashInfer, you place code under include/flashinfer, csrc, and flashinfer/jit, then wire it through the JIT and TVM-FFI bindings for runtime execution.

How does FlashInfer JIT compilation integrate with TVM-FFI bindings for GPU operations?

FlashInfer JIT compilation integrates with TVM-FFI bindings by wiring custom CUDA kernels through the csrc and jit binding layers, ensuring proper data flow and runtime execution.

Can I implement custom GPU operations for production workloads using FlashInfer?

Yes, you can implement custom GPU operations for production workloads in FlashInfer by adding a CUDA kernel and exposing it through the Python API with robust input validation and error reporting.

What is the best way to wire a CUDA launcher and Python API in FlashInfer?

The best way to wire a CUDA launcher and Python API in FlashInfer is to implement the launcher within the jit and csrc layers, applying robust input validation and error reporting for production workloads.

When do I need to configure the build system for a CUDA kernel in FlashInfer?

You need to configure the build system for a CUDA kernel in FlashInfer when adding custom GPU operations, ensuring proper integration with the existing csrc and jit binding layers for runtime execution.