Agent skill

Tile Triton Ascend Gather

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

Tile two-dimensional torch.gather(dim=1) kernels for Triton-Ascend so the logical grid stays near the physical vector-core count while each program handles multiple batch rows and loops over K.

Apache-2.0Auto-check passedSecurity

Install Tile Triton Ascend Gather

skills CLI
$ npx skills add Krusty84/triton-ascend-agent-dev-kit --skill tile-triton-ascend-gather -a claude-code

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

GitHub CLI
$ gh skill install Krusty84/triton-ascend-agent-dev-kit tile-triton-ascend-gather --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/tile-triton-ascend-gather .claude/skills/tile-triton-ascend-gather && 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
tile-triton-ascend-gather
GitHub stars
106
Token cost
~583 tokens
SKILL.md length
167 words
Files
1
Skills in repo
23
Repo updated
First seen
Licence
Apache-2.0

At a glance

Tile two-dimensional torch.gather(dim=1) kernels for Triton-Ascend so the logical grid stays near the physical vector-core count while each program handles multiple batch rows and loops over K.

  • Works in 5 steps: Query the target num_vectorcore value. → Choose BLOCK_B so ceil(B / BLOCK_B) is… → Launch a one-dimensional grid over batch… → …
  • An agent ports a GPU grid of B by ceil(K/BLOCKK)
  • 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

Tile Triton Ascend Gather is an agent skill from Krusty84/triton-ascend-agent-dev-kit. Tile two-dimensional torch.gather(dim=1) kernels for Triton-Ascend so the logical grid stays near the physical vector-core count while each program handles multiple batch rows and loops over K. Use when an agent ports a GPU grid of B by ceil(K/BLOCKK), observes NPU launch or scheduling overhead, or needs stride-aware indexed row gathers.

Its SKILL.md is about 580 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 Security, covering Threat modeling. 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 ports a GPU grid of B by ceil(K/BLOCKK)
  • Observes NPU launch
  • Scheduling overhead
  • Needs stride-aware indexed row gathers

Example prompts

  • “/tile-triton-ascend-gather”

Requirements

  • Python 3

Workflow steps

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

  1. Query the target num_vectorcore value.
  2. Choose BLOCK_B so ceil(B / BLOCK_B) is close to, and not far above, the core count.
  3. Launch a one-dimensional grid over batch blocks.
  4. Loop over K inside each program in BLOCK_K tiles.
  5. Load index tiles, validate them against C, gather x values with explicit strides, and store with combined masks.

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

Tile Triton Ascend Gather loads about 583 tokens when it runs. Until then it costs about 92 tokens; SKILL.md has 167 words of instructions outside code blocks.

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

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). 167 words, ~583 tokens.

Download SKILL.mdSave it as .claude/skills/tile-triton-ascend-gather/SKILL.md (or your agent's skills folder).
name
tile-triton-ascend-gather
description
Tile two-dimensional torch.gather(dim=1) kernels for Triton-Ascend so the logical grid stays near the physical vector-core count while each program handles multiple batch rows and loops over K. Use when an agent ports a GPU grid of B by ceil(K/BLOCK_K), observes NPU launch or scheduling overhead, or needs stride-aware indexed row gathers.

Tile Triton-Ascend Gather

Goal

Compute out[b, k] = x[b, index[b, k]] without launching one logical program for every batch-row and K tile.

Workflow

  1. Query the target num_vectorcore value.
  2. Choose BLOCK_B so ceil(B / BLOCK_B) is close to, and not far above, the core count.
  3. Launch a one-dimensional grid over batch blocks.
  4. Loop over K inside each program in BLOCK_K tiles.
  5. Load index tiles, validate them against C, gather x values with explicit strides, and store with combined masks.

Implementation Pattern

python
@triton.jit
def gather_dim1(x, indices, out, sx_b, sx_c, si_b, si_k, so_b, so_k,
                B, C, K, BLOCK_B: tl.constexpr, BLOCK_K: tl.constexpr):
    rows = tl.program_id(0) * BLOCK_B + tl.arange(0, BLOCK_B)
    row_mask = rows < B
    for k_start in tl.range(0, K, BLOCK_K):
        ks = k_start + tl.arange(0, BLOCK_K)
        tile_mask = row_mask[:, None] & (ks[None, :] < K)
        index_offsets = rows[:, None] * si_b + ks[None, :] * si_k
        cols = tl.load(indices + index_offsets, mask=tile_mask, other=0)
        valid = tile_mask & (cols >= 0) & (cols < C)
        values = tl.load(x + rows[:, None] * sx_b + cols * sx_c, mask=valid)
        output_offsets = rows[:, None] * so_b + ks[None, :] * so_k
        tl.store(out + output_offsets, values, mask=valid)

Ascend Guardrails

  • Do not hardcode 40 or 48 cores; query device properties.
  • Choose legal tl.arange extents, commonly powers of two, while keeping the actual grid near num_vectorcore.
  • Include C and check both lower and upper index bounds.
  • Preserve all input, index, and output strides.
  • Balance fewer programs against UB use and loop length; one program should not monopolize excessive work.

Verification

Compare with torch.gather(x, dim=1, index=indices). Cover B smaller and larger than the core count, K tails, non-contiguous strides, repeated indices, and invalid-index rejection.

© 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/tile-triton-ascend-gather of Krusty84/triton-ascend-agent-dev-kit.

Open the folder on GitHubat commit 4ab5ee7

Compare with similar skills

Tile Triton Ascend Gather 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.

Tile Triton Ascend Gather compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Tile Triton Ascend Gather this skillKrusty84/triton-ascend-agent-dev-kit106—~583Automated safety check: PassApache-2.0
Forensifyalexgreensh/repo-forensics190—~2.5kAutomated safety check: NotesCustom licence
Create Rulecartography-cncf/cartography4.1k—~3kAutomated safety check: PassApache-2.0
Commit Security Scancodexstar69/bug-hunter520—~629Automated safety check: PassMIT
Auditing Code For Vulnerabilitiestrilwu/secskills157—~3.2kAutomated safety check: PassMIT
Threat Mitigation Mappingwshobson/agents40k8 repos~742Automated safety check: PassMIT

Similar skills

  • Forensify

    alexgreensh/repo-forensics

    Cross-agent self-inspection of your AI-agent stack. An agent skill from alexgreensh/repo-forensics.

    190 GitHub stars~2.5k tokensUpdated 14 days ago
    SecurityAuto-check: notes
  • Create Rule

    cartography-cncf/cartography

    Author a Cartography security rule (one or more Cypher Facts plus a Pydantic Finding output model) under cartography/rules/data/rules/.

    4.1k GitHub stars~3k tokensUpdated today
    SecurityAuto-check passed
  • Commit Security Scan

    codexstar69/bug-hunter

    Scan code changes for security vulnerabilities using Bug Hunter-native artifacts and STRIDE context.

    520 GitHub stars~629 tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • Audit source code for exploitable vulnerabilities using threat-model-driven review, taint tracing, invariant checking, and variant analysis.

    157 GitHub stars~3.2k tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • Match identified threats to preventive, detective and corrective controls across network, application, data, endpoint and process layers to plan remediation.

    40k GitHub starsUsed in 8 repos~742 tokens
    SecurityAuto-check passed
  • Audit Browser Security Boundaries

    nordstjernen-web/northstar-browser

    Audit browser-engine changes that process untrusted content or cross native-memory, origin, network, storage, extension, decoder, sandbox, or operating-system boundaries.

    128 GitHub stars~920 tokensUpdated today
    SecurityAuto-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 Layer Norm

    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.

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

Categories

Questions about Tile Triton Ascend Gather

What does Tile Triton Ascend Gather do?

Tile two-dimensional torch.gather(dim=1) kernels for Triton-Ascend so the logical grid stays near the physical vector-core count while each program handles multiple batch rows and loops over K. Tile Triton Ascend Gather is an agent skill from Krusty84/triton-ascend-agent-dev-kit.gather(dim=1) kernels for Triton-Ascend so the logical grid stays near the physical vector-core count while each program handles multiple batch rows and loops over K.

When should I use Tile Triton Ascend Gather?

Tile Triton Ascend Gather fits situations like: an agent ports a GPU grid of B by ceil(K/BLOCKK); observes NPU launch; scheduling overhead; needs stride-aware indexed row gathers.

How do I install Tile Triton Ascend Gather in Claude Code?

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

How do I install Tile Triton Ascend Gather in Codex?

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

Can I use Tile Triton Ascend Gather 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 tile-triton-ascend-gather -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/tile-triton-ascend-gather, .gemini/skills/tile-triton-ascend-gather, .github/skills/tile-triton-ascend-gather and .opencode/skills/tile-triton-ascend-gather in your project.

What does Tile Triton Ascend Gather need to run?

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

Does Tile Triton Ascend Gather 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 Tile Triton Ascend Gather 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 Tile Triton Ascend Gather use?

Tile Triton Ascend Gather 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 Tile Triton Ascend Gather use?

About 583 tokens (SKILL.md is roughly 2.3k 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 Tile Triton Ascend Gather?

Skills that share tags, products or a category with Tile Triton Ascend Gather: Forensify (alexgreensh/repo-forensics, 190 stars), Create Rule (cartography-cncf/cartography, 4.1k stars), Commit Security Scan (codexstar69/bug-hunter, 520 stars) and Auditing Code For Vulnerabilities (trilwu/secskills, 157 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Tile Triton Ascend Gather?

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.