‹ 首页

liger-kernel-dev

@linkedin · 收录于 昨天 · 上游提交 昨天

Develops production-ready Triton kernels for Liger Kernel. Creates new kernels from PyTorch operations (local files, URLs, code snippets, or natural language) with ops, module wrappers, functional APIs, unit tests, benchmarks, and plots. Also modifies existing Liger kernels. Use when adding a new Triton kernel, converting a PyTorch operation to Triton, or updating an existing Liger kernel.

适合你,如果经常编写或优化高性能 Triton 内核。

/ 通过 npx 安装 校验哈希
npx oh-my-skill add linkedin/liger-kernel/liger-kernel-dev
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- linkedin/liger-kernel/liger-kernel-dev
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify linkedin/liger-kernel/liger-kernel-dev
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
6536GitHub stars
~663最小装载
~4.8K含声明引用
~7.9K文本包总量
索引托管

怎么用

商店整理自技能原文 · 版本 e9bbef0 · 表述以原文为准
它做什么

Claude可以帮你为Liger Kernel开发高效的Triton内核。它能从你提供的PyTorch代码(文件、网址、代码片段或描述)自动生成完整的Triton内核,包括操作、模块封装、函数API、测试和基准测试。也可以修改已有的内核。需要NVIDIA GPU。

什么时候触发

当你要求创建新的Triton内核(如说“生成内核”、“添加内核”)或修改现有Liger内核(如“更新内核”、“修复内核”)时触发。

装好后可以这样说
Claude会解析代码并创建完整的内核文件。
Claude会修改对应文件并验证。
需要提供操作描述或代码片段。
技能原文 SKILL.md作者撰写 · BSD-3-Clause · e9bbef0

Liger Kernel Dev

Develops Triton kernels for Liger Kernel through a 3-stage pipeline with human review between stages. Supports creating new kernels and modifying existing ones. NVIDIA GPUs only.

Mode Detection
  • Create mode: User asks to create/add/generate/write/build a new kernel → full pipeline
  • Modify mode: User asks to update/fix/change/extend an existing kernel → skip Analyze, modify files, then Validate
Pipeline (Create Mode)
Stage 1: Analyze

Follow the Analyzer workflow in [analyzer.md](analyzer.md). If the host runtime supports parallel subagents, this stage may be delegated to one; otherwise execute the workflow directly.

Accepts any input: local file, URL, code snippet, natural language description, or model component reference. Produces a standalone PyTorch reference implementation and a kernel profile.

Human checkpoint: Present PyTorch reference + kernel profile. Confirm before proceeding.

Stage 2: Generate

Follow the Generator workflow in [generator.md](generator.md).

Generates/modifies up to 8 files:

  1. src/liger_kernel/ops/{kernel}.py — NEW Triton kernels + autograd Function
  2. src/liger_kernel/transformers/{kernel}.py — NEW nn.Module wrapper
  3. src/liger_kernel/transformers/functional.py — MODIFY add functional API
  4. src/liger_kernel/ops/__init__.py — MODIFY export Function class
  5. src/liger_kernel/transformers/__init__.py — MODIFY export Module + __all__
  6. test/transformers/test_{kernel}.py — NEW unit tests
  7. benchmark/scripts/benchmark_{kernel}.py — NEW benchmark script
  8. benchmark/data/all_benchmark_data.csv — MODIFY (after benchmarks run)

Human checkpoint: Present changes for review.

Stage 3: Validate

Follow the Validator workflow in [validator.md](validator.md).

Runs checkstyle, unit tests (hard gate — stops on persistent failure), benchmarks, and generates plots. Optionally runs ncu profiling.

Human checkpoint: Report final results with benchmark numbers and plots.

Pipeline (Modify Mode)
  1. Read existing kernel files to understand current implementation
  2. Understand the requested modification
  3. Make targeted changes (Generator handles this)
  4. Run full Validate stage (same as create mode)
Reference Files
  • [kernel-profile-format.md](kernel-profile-format.md) — Kernel profile schema and field descriptions
  • [examples/swiglu-profile.md](examples/swiglu-profile.md) — Tier 1 (element-wise) reference
  • [examples/rms-norm-profile.md](examples/rms-norm-profile.md) — Tier 2 (reduction) reference
  • [examples/cross-entropy-profile.md](examples/cross-entropy-profile.md) — Tier 3 (fused/complex) reference
  • Templates in [templates/](templates/) — Code generation patterns for each file type
按 BSD-3-Clause 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。