add-cuda-kernel
Add CUDA Kernels to FlashInfer
Adding a FlashInfer kernel requires coordinated CUDA, TVM-FFI, Python, tracing, testing, AOT, and benchmark changes. This skill provides a complete implementation workflow with repository-specific examples.
Install with my Agent
Copy this request to your Agent. It includes the canonical Skill page and manifest.
Review the Skillstore skill "add-cuda-kernel" from https://skillstore.io/skills/flashinfer-ai-add-cuda-kernel.md and its manifest at https://skillstore.io/api/skills/flashinfer-ai-add-cuda-kernel/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.Your Agent should still show its plan and request any confirmation required by the security policy.
Agent-readable resources
Use these links when an AI agent, crawler, or script needs clean context instead of reading the full page.
Test it
Using "add-cuda-kernel". Add a FlashInfer scale kernel for FP16, BF16, and FP32.
Expected outcome:
- CUDA header and TVM-FFI launcher aligned with FlashInfer conventions.
- JIT generator, cached Python API, input validation, public export, and AOT registration.
- Parameterized correctness tests, trace integration, and a benchmark covering representative sizes.
Using "add-cuda-kernel". Restrict a new kernel to Hopper and newer GPUs.
Expected outcome:
- JIT architecture flags limited to the requested compute capabilities.
- Runtime capability validation and pytest skips for unsupported GPUs.
- Tests covering supported configurations and clear failure behavior.
Using "add-cuda-kernel". Review an existing kernel integration before submission.
Expected outcome:
The review identifies missing trace registration, output validation, AOT coverage, architecture checks, and benchmark comparisons, with prioritized fixes.
Security Audit
SafeAll 150 static alerts are false positives caused by Markdown backticks, bounded local JIT staging examples, a relative documentation link, or ordinary function declarations. The tutorial contains no prompt injection, command execution mechanism, arbitrary traversal, reconnaissance behavior, or malicious intent.
Risk Factors
โ๏ธ External commands (50)
๐ Filesystem access (3)
Share & cite this report
Share the versioned assessment report, neutral badge, embed card, and citations. Skillstore reports evidence without deciding whether this Skill is safe.
Copy report link
https://skillstore.io/skills/flashinfer-ai-add-cuda-kernel/audits/8?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown badge
[](https://skillstore.io/skills/flashinfer-ai-add-cuda-kernel?utm_source=security_passport_badge)HTML badge
<a href="https://skillstore.io/skills/flashinfer-ai-add-cuda-kernel?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/flashinfer-ai-add-cuda-kernel/security.svg" alt="Skillstore security assessment" loading="lazy"></a>Embed card
<iframe src="https://skillstore.io/embed/skills/flashinfer-ai-add-cuda-kernel.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>Academic citations (APA ยท BibTeX ยท CFF)
APA citation
flashinfer-ai. (2026). add-cuda-kernel security audit report (audit version 8) [Author version unspecified]. Skillstore. https://skillstore.io/skills/flashinfer-ai-add-cuda-kernel/audits/8BibTeX citation
@techreport{flashinfer-ai-flashinfer-ai-add-cuda-kernel-2026,
author = {flashinfer-ai},
title = {add-cuda-kernel security audit report (audit version 8)},
institution = {Skillstore},
year = {2026},
number = {8},
url = {https://skillstore.io/skills/flashinfer-ai-add-cuda-kernel/audits/8},
note = {Author version unspecified}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "add-cuda-kernel security audit report (audit version 8)"
version: "unspecified"
type: report
authors:
- name: "flashinfer-ai"
date-released: "2026-07-23"
url: "https://skillstore.io/skills/flashinfer-ai-add-cuda-kernel/audits/8"
identifiers:
- type: other
value: "skillstore:flashinfer-ai-add-cuda-kernel:audit:8"
description: "Skillstore immutable audit report identifier"
Skillstore Score
Why this score Evidence Confidence: HighWhat You Can Build
Implement a First FlashInfer Kernel
Follow an end-to-end example from CUDA device code through a tested Python API.
Complete Kernel Integration
Add tracing, exports, architecture checks, JIT generation, and AOT registration to an existing kernel.
Validate Kernel Performance
Create correctness coverage and representative GPU benchmarks before submitting a kernel change.
Try These Prompts
Add an element-wise CUDA operation to this FlashInfer checkout. Include bindings, a Python API, tests, tracing, exports, and AOT registration.
Implement this kernel for {supported_sm_versions}. Configure JIT architecture flags and add pytest skips for unsupported GPUs.Complete tracing and AOT integration for {operation}. Register templates, consistency tests, public exports, and common precompiled dtype configurations.Review {kernel_path} for correctness and performance. Add representative benchmarks, compare against {reference}, and report latency across dtypes and sizes.Best Practices
- Confirm repository conventions and supported compute capabilities before choosing source files, dispatch macros, and architecture flags.
- Validate tensor device, shape, dtype, contiguity, and output buffers before launching the kernel.
- Add correctness tests, trace consistency checks, AOT registration, exports, and representative benchmarks before submission.
Avoid
- Do not write generated sources into package directories or use unbounded, user-controlled output paths.
- Do not bypass backend checks or use skip_check until callers guarantee every required precondition.
- Do not claim performance gains without synchronized GPU measurements against a relevant reference implementation.
Frequently Asked Questions
What repository does this skill target?
Do I need an NVIDIA GPU?
Which data types does the example cover?
How are GPU architectures selected?
Does every kernel need a trace template?
Does this skill execute changes automatically?
Developer Details
Author
flashinfer-aiLicense
MIT
Skillstore revision
r2
Version notice
The author did not declare a version.
Ref
c43861a65bb95efcae259cd161c9d6f4dc7eec6f
Maintenance freshness
7/25/2026
Usage
3 downloads ยท 342 views
File structure
๐ SKILL.md