add-cuda-kernel
向 FlashInfer 添加 CUDA 内核
添加新的 FlashInfer 内核需要协调 C++、Python、JIT、测试和基准测试方面的变更。此技能提供了一个结构化工作流,AI 编码助手可以安全地遵循。
使用我的智能体安装
将此请求复制给你的智能体,其中包含权威 Skill 页面和清单。
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.你的智能体仍应展示其计划,并按安全策略请求必要确认。
Agent 可读资源
当 AI Agent、爬虫或脚本需要干净上下文,而不是读取完整页面时,请使用这些链接。
测试它
正在使用“add-cuda-kernel”。 向 FlashInfer 添加一个 scale 内核。
预期结果:
一份分步实现计划,涵盖 CUDA 源码、启动器、绑定、JIT 生成器、Python API、测试、导出和基准测试工作。
正在使用“add-cuda-kernel”。 检查我的内核是否需要架构保护。
预期结果:
对受支持计算能力、推荐 CompilationContext 设置以及不支持 GPU 的测试跳过条件的审查。
正在使用“add-cuda-kernel”。 为新内核准备验证。
预期结果:
一份测试和基准测试清单,包含 dtype 覆盖、参考比较、错误用例、AOT 注册和计时测量。
安全审计
安全All 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.
风险因素
⚙️ 外部命令 (50)
📁 文件系统访问 (3)
分享与引用此报告
分享版本化评估报告、中性徽章、嵌入卡片和引用。Skillstore 只报告证据,不判断该 Skill 是否安全。
复制报告链接
https://skillstore.io/skills/flashinfer-ai-add-cuda-kernel/audits/8?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown 徽章
[](https://skillstore.io/skills/flashinfer-ai-add-cuda-kernel?utm_source=security_passport_badge)HTML 徽章
<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>嵌入卡片
<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>学术引用 (APA · BibTeX · CFF)
APA 引用
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 引用
@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 评分
评分依据 证据置信度: 高你能构建什么
添加简单 GPU 操作
实现一个小型逐元素 FlashInfer 内核,并包含 API、测试和基准测试。
扩展 FlashInfer Python API
将新的 CUDA 实现连接到 TVM-FFI,并通过 Python 函数公开。
准备内核验证工作
为新内核创建测试、架构检查、AOT 注册和基准测试覆盖。
试试这些提示
使用此技能规划新的 FlashInfer 逐元素 CUDA 内核。在编辑前列出要创建或修改的文件。
使用此技能为我的新 FlashInfer 内核添加 JIT 生成器和 TVM-FFI 绑定。
使用此技能为新内核添加 pytest 覆盖、Python 导出和 AOT 注册。
使用此技能审查我的 FlashInfer 内核集成,检查是否缺少架构检查、API 缺口、测试和基准测试。
最佳实践
- 保持 CUDA 头文件与框架无关,并将 TVM-FFI 逻辑放在 csrc 文件中。
- 在公开 API 前添加 dtype 分发、架构检查和清晰的错误处理。
- 每个新内核都应随附测试和基准测试,以保护正确性和性能。
避免
- 不要将 Torch 或 TVM-FFI 依赖放入通用 CUDA include 头文件中。
- 除非调用方控制所有输入并接受风险,否则不要跳过验证。
- 不要在没有测试、导出、AOT 注册和性能覆盖的情况下添加内核。
常见问题
这是什么类型的技能?
它会自动生成可用于生产环境的内核吗?
哪些工具可以使用此技能?
它涵盖测试吗?
它涵盖性能测量吗?
用户应手动验证什么?
开发者详情
许可证
MIT
Skillstore 修订
r2
版本提示
作者未声明版本。
引用
c43861a65bb95efcae259cd161c9d6f4dc7eec6f
维护新鲜度
2026/7/25
使用量
3 次下载 · 342 次浏览
文件结构
📄 SKILL.md