SuperAPI AI 工具集

triton-skill

编程与开发

查看项目

更新于 10-16 00:20

技能介绍

用途:辅助编写、调试和优化 Triton 与 Gluon GPU 内核。以本地 Triton 检出为主要 API 与实现模式来源,优先参考当前教程和源码,而非记忆中的签名。

主要能力:按任务定位源码面,如语言语法与入门模式看 python/tutorials/,Gluon 布局与架构模式看 python/tutorials/gluon/,完整示例看 python/examples/,生产 matmul、reduction、top-k、SwiGLU 看 python/triton_kernels/triton_kernels/,tl.* 定义看 python/triton/language/,JIT、autotune 与运行时看 python/triton/runtime/,编译器入口看 python/triton/compiler/,方言定义看 include/triton/Dialect/,分析与 lowering 看 lib/。

使用方式:先解析 SKILL.md 所在目录,使用其 repos/triton/ 子目录,安装器会将该路径链接到 agent-gpu-skills/third_party/triton/ 或通过 TRITON_REPO 提供的检出。命令中需替换为绝对路径:TRITON_REPO=/absolute/path/to/triton-skill/repos/triton。若检出缺失,在 agent-gpu-skills 仓库运行 bash update-repos.sh triton 与 bash install.sh --skill triton-skill。可用 find 和 rg 检索教程、示例、语言定义、Gluon 模式、生产内核与编译器 lowering。

适用场景:Triton/Gluon 内核开发、正确性验证、性能调优、编译器路径追踪。

限制:源码级模式不能证明编译后内核使用了预期指令或内存路径,必要时需检查编译器输出或性能数据;PTX 语义、计算能力、Nsight、Compute Sanitizer 等需配合 cuda-skill。更新源码时运行 bash update-repos.sh triton 与 python3 scripts/validate_repo.py --require-sources,并注意 third_party/UPSTREAMS.toml 记录的提交与源码映射漂移。