Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/source/builder-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ Install a kernels skill for an AI assistant

Default value: `cuda-kernels`

Possible values: `cuda-kernels`, `cpu-kernels`, `rocm-kernels`, `xpu-kernels`
Possible values: `cuda-kernels`, `cpu-kernels`, `rocm-kernels`, `triton-kernels`, `xpu-kernels`

* `--claude` — Install for Claude
* `--codex` — Install for Codex
Expand Down
2 changes: 1 addition & 1 deletion docs/source/builder/agents-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Code agents are a good fit to build custom kernels because the hard part is not just writing in Domain Specific Language (DSLs) like CUDA. You also need the right project layout, PyTorch bindings, architecture-specific choices, model-specific integration, and trustworthy benchmarks.

Kernels on Hugging Face are compatible with agents via skills and the `hf` CLI. The `cuda-kernels`, `rocm-kernels`, `xpu-kernels`, and `cpu-kernels` skills contain knowledge so an agent can generate and publish a complete kernel project, instead of isolated snippets.
Kernels on Hugging Face are compatible with agents via skills and the `hf` CLI. The `cuda-kernels`, `rocm-kernels`, `xpu-kernels`, `cpu-kernels`, and `triton-kernels` skills contain knowledge so an agent can generate and publish a complete kernel project, instead of isolated snippets.

This guide is for **authoring new kernels**. If you only want to **load an existing precompiled kernel**, use `get_kernel()` instead.

Expand Down
10 changes: 10 additions & 0 deletions docs/source/cli-skills.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Supported skills include:
- `rocm-kernels`
- `xpu-kernels`
- `cpu-kernels`
- `triton-kernels`
Comment thread
jaygala223 marked this conversation as resolved.
Resolved

Skill files are downloaded from the `huggingface/kernels` directory in this [repository](https://github.com/huggingface/kernels/tree/main/kernel-builder/skills).

Expand All @@ -22,6 +23,15 @@ Example CPU kernels built with this skill (available on the Hub under [`kernels-
- [`kernels-community/quantization-gptq`](https://huggingface.co/kernels-community/quantization-gptq) — INT4 quantized GEMM using AVX512.
- [`kernels-community/rmsnorm`](https://huggingface.co/kernels-community/rmsnorm) — RMSNorm with AVX2/AVX512 element-wise paths.

> [!TIP]
> **When are Triton kernels useful?** Two main cases:
> - **Portability across NVIDIA and AMD** — a single Triton kernel runs on both CUDA and ROCm without modification. No vendor-specific code needed.
> - **Fusing multiple ops to reduce memory traffic** — operations like softmax (5 PyTorch ops, ~8MN memory ops) become a single kernel (2MN ops) with a ~4x reduction in DRAM round-trips. Any chain of element-wise + reduction ops that PyTorch executes as separate kernels is a fusion opportunity.

Example Triton kernels built with this skill:

- [`jaygala223/triton-layernorm`](https://huggingface.co/kernels/jaygala223/triton-layernorm) — fused LayerNorm with fp32 accumulation, ~1.45x faster than PyTorch on V100.

Examples:

```bash
Expand Down
10 changes: 10 additions & 0 deletions kernel-builder/skills/triton-kernels/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Changelog

## v1.0.0 (2026-06-24)

- Initial release of vendor-neutral Triton skill
- SKILL.md with core DSL patterns, autotune, numerics, benchmarking, and integration guidance
- Reference kernels: softmax, matmul with tiling, RMSNorm
- references/: autotune guide, kernel patterns (dropout, fused add+norm, SwiGLU, group-major), benchmarking guide
- scripts/: benchmark and correctness test templates
- examples/: fused softmax with correctness test + benchmark harness
Loading
Loading