TK

tensormux/kernel-skills

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

87 stars 质量 65 趋势 19MIT

开源技能库,供AI编码代理编写、优化和调试跨CUDA、Triton和量化工作负载的高性能计算内核。

概览

一个开源的 AI 编码代理计算内核技能文件库。 kernel-skills 是一个精心策划的 SKILL.md 文件集合。每个文件都是一套结构化的工程手册,AI 编码代理在编写、优化、调试或移植计算内核时可以遵循。 技能就是产品。仓库还附带一个npm包(@krxgu/kernel-skills),用一个版本化的注册表包裹,配有小型CLI和TypeScript API。如果你想用脚本技能发现和捆绑,就用npm包;否则直接读或粘贴Markdown就行。 - — 它从不调用 NVCC、PTXAS 或 Hip-Clang - — 它不运行内核或衡量性能 - - - AI编码代理在给出模糊提示时,产生的内核代码明显更差。它们跳过约束收集,选择错误的瓦片策略,忽视边界条件,声称性能不合理,生成看似合理但在真实硬件上失败的代码。

概述(AI 翻译)

一个开源的 AI 编码代理计算内核技能文件库。


核心技能

这是什么

kernel-skills 是一个经过策划的 SKILL.md 文件集合。每个文件都是结构化的工程操作手册,AI 编码代理在编写、优化、调试或移植计算内核时可以遵循。

技能就是产品。仓库还附带一个npm包(@krxgu/kernel-skills),用带有小型CLI和TypeScript API的版本化注册表包裹它们。如果你想用脚本来发现和捆绑技能,可以用npm包;否则直接读或粘贴Markdown就行。

它不是

  • 非内核编译器 — 它从未调用nvcc、ptxas或hip-clang
  • **非基准工具 ** — 它不运行内核或性能
  • 非模型服务运行时
  • 不是自主编码代理
  • 不执行生成代码

为什么它存在

当给出模糊的提示时,AI编码代理产生的内核代码明显更差。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

An open source library of high quality skill files for AI coding agents working on compute kernels.


kernel-skills

What it is

kernel-skills is a curated collection of SKILL.md files. Each file is a structured engineering playbook that an AI coding agent can follow when writing, optimizing, debugging, or porting compute kernels.

The skills are the product. The repository also ships an npm package (@krxgu/kernel-skills) that wraps them in a versioned registry with a small CLI and TypeScript API. Use the npm package if you want to script skill discovery and bundling; otherwise just read or paste the Markdown directly.

What it is not

  • not a kernel compiler — it never invokes nvcc, ptxas, or hip-clang
  • not a benchmark harness — it does not run kernels or measure performance
  • not a model-serving runtime
  • not an autonomous coding agent
  • does not execute generated code

Why it exists

AI coding agents produce substantially worse kernel code when given vague prompts. They skip constraint gathering, choose incorrect tile strategies, ignore boundary conditions, make unsupported performance claims, and produce code that looks plausible but fails on real hardware.

Structured skill files change this. A well-authored skill forces the agent to:

  • gather the right constraints before writing a single line of code
  • choose the correct algorithm and memory strategy for the workload
  • reason explicitly about correctness risks and edge cases
  • avoid cargo-cult optimization and fake performance claims
  • explain tradeoffs with technical precision
  • know when a custom kernel is not the right answer

This repository exists to provide those skill files at expert quality, openly, for any agent and any workflow.


Measured impact

Same model. Same prompt. One difference: a kernel skill file. The naive softmax kernel fails on overflow and large shapes. The skill-guided version stays correct and bandwidth-competitive.

Correctness: pass / fail matrix

Shape N Naive · normal Stable · normal Naive · adversarial Stable · adversarial
64 ✅ ✅ ❌ ✅
128 ✅ ✅ ❌ ✅
256 ✅ ✅ ❌ ✅
257 ❌ ✅ ❌ ✅
512 ❌ ✅ ❌ ✅
在 GitHub 查看完整 README

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add tensormux/kernel-skills
新手?先看 mcpskill.org 教程 →