add-cuda-kernel
Step-by-step tutorial for adding new CUDA kernels to FlashInfer
Security Assessment
About add-cuda-kernel
The 'add-cuda-kernel' skill provides a comprehensive step-by-step tutorial on how to integrate new CUDA kernels into the FlashInfer framework. This skill addresses the need for developers to efficiently add custom operations to FlashInfer, specifically demonstrating the implementation of an element-wise scale operation. By allowing users to scale each element of a tensor by a scalar factor, this skill enhances the functionality of FlashInfer, making it adaptable to a variety of computational tasks in machine learning and data processing contexts.
FAQ
What does the scale operation do?
The scale operation multiplies each element of a tensor by a specified scalar factor.
What data types are supported by the scale operation?
The scale operation supports multiple data types including FP16, BF16, and FP32.
What are the requirements for using this skill?
Users need to have a CUDA-capable device and the necessary CUDA development environment set up.
Can the scale operation be used with any tensor type?
The scale operation can be used with tensors as long as they meet the compatibility checks defined in the tutorial.
How are errors handled in the implementation?
Errors are handled using TVM-FFI exceptions, which propagate errors back to Python, providing descriptive messages for troubleshooting.
Install add-cuda-kernel
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
flashinfer-ai/flashinfer