Agent skill

Build Triton Ascend Layer Norm

by Krusty84 in Krusty84/triton-ascend-agent-dev-kit

Build a fused forward LayerNorm kernel for Triton-Ascend with row-wise mean and variance reductions, float32 accumulation, affine weight and bias, and masked feature tiles.

Apache-2.0Auto-check passedDatabases

Install Build Triton Ascend Layer Norm

skills CLI
$ npx skills add Krusty84/triton-ascend-agent-dev-kit --skill build-triton-ascend-layer-norm -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Krusty84/triton-ascend-agent-dev-kit build-triton-ascend-layer-norm --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Krusty84/triton-ascend-agent-dev-kit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/build-triton-ascend-layer-norm .claude/skills/build-triton-ascend-layer-norm && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
build-triton-ascend-layer-norm
GitHub stars
106
Token cost
~659 tokens
SKILL.md length
230 words
Files
1
Skills in repo
23
Repo updated
First seen
Licence
Apache-2.0

At a glance

Build a fused forward LayerNorm kernel for Triton-Ascend with row-wise mean and variance reductions, float32 accumulation, affine weight and bias, and masked feature tiles.

  • Works in 5 steps: Reshape the input logically to M by N,… → Allocate output with the original shape… → Launch one program per row. → …
  • An agent needs LayerNorm over the last dimension on Ascend NPU
  • SKILL.md covers Goal, Workflow, Implementation Pattern and Ascend Guardrails, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Build Triton Ascend Layer Norm is an agent skill from Krusty84/triton-ascend-agent-dev-kit. Build a fused forward LayerNorm kernel for Triton-Ascend with row-wise mean and variance reductions, float32 accumulation, affine weight and bias, and masked feature tiles. Use when an agent needs LayerNorm over the last dimension on Ascend NPU or needs a reusable two-pass reduction pattern for normalization kernels.

Its SKILL.md is about 660 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Databases, covering Database schema design. The repository describes itself as: A toolkit for AI agents used for development on Triton-Ascend for Ascend NPU. The licence is Apache-2.0.

When your agent uses it

  • An agent needs LayerNorm over the last dimension on Ascend NPU
  • Needs a reusable two-pass reduction pattern for normalization kernels

Example prompts

  • “/build-triton-ascend-layer-norm”

Requirements

  • Python 3

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Reshape the input logically to M by N, where N is the normalized dimension.
  2. Allocate output with the original shape and allocate optional mean and reciprocal-standard-deviation buffers as float32 vectors of length M.
  3. Launch one program per row.
  4. Accumulate the mean in float32 across masked BLOCK_SIZE tiles.
  5. Make a second pass for variance, compute rstd, then make a third pass to normalize and apply weight and bias.

What it can do on your machine

Read from SKILL.md and the folder at commit 4ab5ee7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Build Triton Ascend Layer Norm loads about 659 tokens when it runs. Until then it costs about 87 tokens; SKILL.md has 230 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~87
When it runs · the whole SKILL.md, loaded when a task matches
~659

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Krusty84/triton-ascend-agent-dev-kit at commit 4ab5ee7, republished under its Apache-2.0 licence (© Krusty84). 230 words, ~659 tokens.

Download SKILL.mdSave it as .claude/skills/build-triton-ascend-layer-norm/SKILL.md (or your agent's skills folder).
name
build-triton-ascend-layer-norm
description
Build a fused forward LayerNorm kernel for Triton-Ascend with row-wise mean and variance reductions, float32 accumulation, affine weight and bias, and masked feature tiles. Use when an agent needs LayerNorm over the last dimension on Ascend NPU or needs a reusable two-pass reduction pattern for normalization kernels.

Build Triton-Ascend LayerNorm

Goal

Implement the forward equation y = ((x - mean) / sqrt(var + eps)) * weight + bias over the final tensor dimension.

Workflow

  1. Reshape the input logically to M by N, where N is the normalized dimension.
  2. Allocate output with the original shape and allocate optional mean and reciprocal-standard-deviation buffers as float32 vectors of length M.
  3. Launch one program per row.
  4. Accumulate the mean in float32 across masked BLOCK_SIZE tiles.
  5. Make a second pass for variance, compute rstd, then make a third pass to normalize and apply weight and bias.

Implementation Pattern

python
row = tl.program_id(0)
x_row = X + row * stride
y_row = Y + row * stride

mean_acc = tl.zeros([BLOCK_SIZE], tl.float32)
for start in range(0, N, BLOCK_SIZE):
    cols = start + tl.arange(0, BLOCK_SIZE)
    mean_acc += tl.load(x_row + cols, mask=cols < N, other=0.0).to(tl.float32)
mean = tl.sum(mean_acc, axis=0) / N

var_acc = tl.zeros([BLOCK_SIZE], tl.float32)
for start in range(0, N, BLOCK_SIZE):
    cols = start + tl.arange(0, BLOCK_SIZE)
    value = tl.load(x_row + cols, mask=cols < N, other=0.0).to(tl.float32)
    centered = tl.where(cols < N, value - mean, 0.0)
    var_acc += centered * centered
rstd = 1.0 / tl.sqrt(tl.sum(var_acc, axis=0) / N + eps)

In the final tiled pass, load weight and bias with the same mask, compute (value - mean) * rstd * weight + bias, and store to y_row.

Ascend Guardrails

  • Accumulate mean and variance in tl.float32 even for float16 or bfloat16 inputs.
  • Require weight and bias to be one-dimensional, contiguous, and length N.
  • Mask weight, bias, input, and output accesses in every partial tile.
  • Keep BLOCK_SIZE fixed initially, such as 1024, and loop when N is larger.
  • State clearly that this skill implements forward inference only; do not imply backward support because the wrapper subclasses torch.autograd.Function.
  • Preserve the input layout explicitly or require the flattened rows to be contiguous.

Verification

Compare with torch.nn.functional.layer_norm using the same eps, weight, and bias. Cover float16, bfloat16, and float32, multiple N values including non-multiples of BLOCK_SIZE, and use an explicit tolerance justified by dtype.

© Krusty84, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/build-triton-ascend-layer-norm of Krusty84/triton-ascend-agent-dev-kit.

Open the folder on GitHubat commit 4ab5ee7

Compare with similar skills

Build Triton Ascend Layer Norm next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Build Triton Ascend Layer Norm compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Build Triton Ascend Layer Norm this skillKrusty84/triton-ascend-agent-dev-kit106—~659Automated safety check: PassApache-2.0
SQL Optimization Patternsynulihao/AgentSkillOS61811 repos~3.3kAutomated safety check: PassNone
Datamodellmnimbalyst/nimbalyst1.9k—~713Automated safety check: PassMIT
Add Mpk Taskmirage-project/mirage2.5k—~4.5kAutomated safety check: PassApache-2.0
B200 Flash Attention4 Plannermirage-project/mirage2.5k—~1.9kAutomated safety check: PassApache-2.0
Experiment Auditwanshuiyin/Auto-claude-code-research-in-sleep17k1 repos~2.7kAutomated safety check: NotesMIT

Similar skills

  • SQL Optimization Patterns

    ynulihao/AgentSkillOS

    Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries.

    618 GitHub starsUsed in 11 repos~3.3k tokens
    DatabasesAuto-check passed
  • Datamodellm

    nimbalyst/nimbalyst

    Create visual data models for database schemas using Nimbalyst's DataModelLM editor.

    1.9k GitHub stars~713 tokensUpdated today
    DatabasesAuto-check passed
  • Add Mpk Task

    mirage-project/mirage

    Step-by-step guide for adding a new task implementation to Mirage Persistent Kernel (MPK).

    2.5k GitHub stars~4.5k tokensUpdated 3 days ago
    DatabasesAuto-check passed
  • B200 Flash Attention4 Planner

    mirage-project/mirage

    A skill your agent uses when the user wants to design or extend a FlashAttention-style forward kernel on B200/Blackwell, involving the two MMAs QKᵀ and PV, online softmax, S/P/O in TMEM, warp roles…

    2.5k GitHub stars~1.9k tokensUpdated 3 days ago
    DatabasesAuto-check passed
  • Experiment Audit

    wanshuiyin/Auto-claude-code-research-in-sleep

    Audit experiment integrity before claiming results. An agent skill from wanshuiyin/Auto-claude-code-research-in-sleep.

    17k GitHub starsUsed in 1 repo~2.7k tokens
    DatabasesAuto-check: notes
  • Sqlite Schema Design

    fastrepl/anarlog

    Design or review schemas for crates/cloudsync using SQLite Sync constraints, not generic SQLite advice.

    9.5k GitHub stars~1.9k tokensUpdated today
    DatabasesAuto-check passed

More from Krusty84/triton-ascend-agent-dev-kit

All 23 skills in this repo
  • Triton-Ascend Token Pool Assignment

    Krusty84/triton-ascend-agent-dev-kit

    Implements request-to-token-pool copies for Triton kernels on Ascend NPUs, replacing loop-carried vector offsets with fixed-offset block loops that compile reliably.

    106 GitHub stars~564 tokensUpdated 1 mo ago
    Auto-check passed
  • Triton-Ascend Batch Token Reorder

    Krusty84/triton-ascend-agent-dev-kit

    Writes a Triton kernel pattern for Ascend NPU that gathers several indexed token rows per program into an on-chip buffer and stores one contiguous output tile, for MoE-style token reordering.

    106 GitHub stars~597 tokensUpdated 1 mo ago
    Auto-check passed
  • Triton-Ascend Binned MoE Routing

    Krusty84/triton-ascend-agent-dev-kit

    Builds Triton-Ascend kernels that pack sorted token assignments into fixed expert-capacity tensors, restore top-k outputs and compute router-weight gradients on Ascend NPUs.

    106 GitHub stars~662 tokensUpdated 1 mo ago
    Auto-check passed
  • Triton-Ascend Fused Attention

    Krusty84/triton-ascend-agent-dev-kit

    Guides building a FlashAttention-v2-style fused forward attention kernel for Triton-Ascend on Ascend NPU, with online softmax, causal staging and float32 accumulation.

    106 GitHub stars~753 tokensUpdated 1 mo ago
    Auto-check passed
  • Triton-Ascend Fused Softmax

    Krusty84/triton-ascend-agent-dev-kit

    Builds a fused row-wise softmax kernel for Triton-Ascend that reads and writes each row once, handling padding, strides and masked loads on Ascend NPUs.

    106 GitHub stars~636 tokensUpdated 1 mo ago
    Auto-check passed
  • Build Triton Ascend Moe Gather Scatter

    Krusty84/triton-ascend-agent-dev-kit

    Build Ascend-friendly MoE gather, scatter, and router-weight-gradient kernels with vector-core-sized grids, UB-aware row/column tiling, and CANN slice extensions.

    106 GitHub stars~696 tokensUpdated 1 mo ago
    Auto-check passed

Categories

Questions about Build Triton Ascend Layer Norm

What does Build Triton Ascend Layer Norm do?

Build a fused forward LayerNorm kernel for Triton-Ascend with row-wise mean and variance reductions, float32 accumulation, affine weight and bias, and masked feature tiles. Build Triton Ascend Layer Norm is an agent skill from Krusty84/triton-ascend-agent-dev-kit. Build a fused forward LayerNorm kernel for Triton-Ascend with row-wise mean and variance reductions, float32 accumulation, affine weight and bias, and masked feature tiles.

When should I use Build Triton Ascend Layer Norm?

Build Triton Ascend Layer Norm fits situations like: an agent needs LayerNorm over the last dimension on Ascend NPU; needs a reusable two-pass reduction pattern for normalization kernels.

How do I install Build Triton Ascend Layer Norm in Claude Code?

Run `npx skills add Krusty84/triton-ascend-agent-dev-kit --skill build-triton-ascend-layer-norm -a claude-code`. Or copy the skill folder (skills/build-triton-ascend-layer-norm in Krusty84/triton-ascend-agent-dev-kit) into .claude/skills/build-triton-ascend-layer-norm in your project. Claude Code loads it when a task matches its description.

How do I install Build Triton Ascend Layer Norm in Codex?

Run `npx skills add Krusty84/triton-ascend-agent-dev-kit --skill build-triton-ascend-layer-norm -a codex`. Or copy the skill folder (skills/build-triton-ascend-layer-norm in Krusty84/triton-ascend-agent-dev-kit) into .agents/skills/build-triton-ascend-layer-norm in your project. Codex loads it when a task matches its description.

Can I use Build Triton Ascend Layer Norm in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Krusty84/triton-ascend-agent-dev-kit --skill build-triton-ascend-layer-norm -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/build-triton-ascend-layer-norm, .gemini/skills/build-triton-ascend-layer-norm, .github/skills/build-triton-ascend-layer-norm and .opencode/skills/build-triton-ascend-layer-norm in your project.

What does Build Triton Ascend Layer Norm need to run?

SKILL.md names no scripts, command-line tools or credentials: Build Triton Ascend Layer Norm is instructions for the agent only. Our summary lists: Python 3.

Does Build Triton Ascend Layer Norm access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Build Triton Ascend Layer Norm safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Build Triton Ascend Layer Norm use?

Build Triton Ascend Layer Norm is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Build Triton Ascend Layer Norm use?

About 659 tokens (SKILL.md is roughly 2.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Build Triton Ascend Layer Norm?

Skills that share tags, products or a category with Build Triton Ascend Layer Norm: SQL Optimization Patterns (ynulihao/AgentSkillOS, 618 stars), Datamodellm (nimbalyst/nimbalyst, 1.9k stars), Add Mpk Task (mirage-project/mirage, 2.5k stars) and B200 Flash Attention4 Planner (mirage-project/mirage, 2.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Build Triton Ascend Layer Norm?

Krusty84 (a GitHub user) maintains it in Krusty84/triton-ascend-agent-dev-kit, which has 106 GitHub stars. The repository holds 23 skills in this directory. The repository was last updated on August 15, 2026.

Source: Krusty84/triton-ascend-agent-dev-kit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.