Official agent skill

Proxy Fence Insertion

by facebookexperimental in facebookexperimental/triton

A skill your agent uses when working on fence-related compiler passes, TMA store lowering, proxy fence insertion, investigating missing or spurious fences, or debugging correctness issues in TLX…

OfficialMITAuto-check passedDevelopment

Install Proxy Fence Insertion

skills CLI
$ npx skills add facebookexperimental/triton --skill proxy-fence-insertion -a claude-code

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

GitHub CLI
$ gh skill install facebookexperimental/triton proxy-fence-insertion --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/facebookexperimental/triton.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/proxy-fence-insertion .claude/skills/proxy-fence-insertion && 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
proxy-fence-insertion
GitHub stars
201
Token cost
~1.2k tokens
SKILL.md length
480 words
Files
1
Skills in repo
18
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when working on fence-related compiler passes, TMA store lowering, proxy fence insertion, investigating missing or spurious fences, or debugging correctness issues in TLX…

  • Works in 5 steps: Register → SMEM → TMA store → Register → SMEM → MMA (wgmma / tcgen5) → FenceInsertionPass (optimization phase) → …
  • Working on fence-related compiler passes
  • SKILL.md covers Why fences are needed, TLX DSL API, Common proxy-crossing patterns and Compiler fence insertion, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Proxy Fence Insertion is an agent skill from facebookexperimental/triton, published by the product's own GitHub organization. Use when working on fence-related compiler passes, TMA store lowering, proxy fence insertion, investigating missing or spurious fences, or debugging correctness issues in TLX kernels that use tlx.asyncdescriptorstore or MMA operations.

Its SKILL.md is about 1.2k 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 Development. The repository describes itself as: Github mirror of trition-lang/triton repo. The licence is MIT.

When your agent uses it

  • Working on fence-related compiler passes
  • TMA store lowering
  • Proxy fence insertion
  • Investigating missing

Example prompts

  • “/proxy-fence-insertion”

Requirements

  • Python 3

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Register → SMEM → TMA store
  2. Register → SMEM → MMA (wgmma / tcgen5)
  3. FenceInsertionPass (optimization phase)
  4. TMALowering (TTGIR → TTGIR rewrite)
  5. ProxyFenceInsertionPass (post-allocation safety net)

What it can do on your machine

Read from SKILL.md and the folder at commit 6f3dd70. 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

Proxy Fence Insertion loads about 1.2k tokens when it runs. Until then it costs about 65 tokens; SKILL.md has 480 words of instructions outside code blocks.

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

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 facebookexperimental/triton at commit 6f3dd70, republished under its MIT licence (© facebookexperimental). 480 words, ~1,186 tokens.

Download SKILL.mdSave it as .claude/skills/proxy-fence-insertion/SKILL.md (or your agent's skills folder).
name
proxy-fence-insertion
description
Use when working on fence-related compiler passes, TMA store lowering, proxy fence insertion, investigating missing or spurious fences, or debugging correctness issues in TLX kernels that use tlx.async_descriptor_store or MMA operations.

Proxy Fence Insertion

Use when working on fence-related compiler passes, TMA store lowering, proxy fence insertion, investigating missing or spurious fences, or debugging correctness issue in TLX kernels that use tlx.async_descriptor_store or MMA operations.


Why fences are needed

Hopper+ (sm90+) has separate generic and async memory proxies. Writes through one proxy are not visible to reads through the other without an explicit proxy fence (fence.proxy.async.shared::cta). For example, a register→SMEM store (generic proxy) followed by a TMA store from SMEM (async proxy) requires a fence between the two.

TLX DSL API

Source: third_party/tlx/language/tlx/mem_ops.py

tlx.fence(scope)

Unified fence entry point.

scopePTX emittedUse case
"async_shared"fence.proxy.async.shared::ctaBridge generic↔async proxy (e.g. between local_store and TMA store)
"gpu"fence.acq_rel.gpuDevice-scope ordering of global/shared memory
"sys"fence.acq_rel.sysSystem-scope ordering (visible to host CPU)
tlx.fence_async_shared()

Deprecated alias for tlx.fence("async_shared").

Canonical TMA store pattern
python
tlx.local_store(smem, data)
tlx.fence("async_shared")           # proxy fence
tlx.async_descriptor_store(desc, smem)
tlx.async_descriptor_store_wait(0)

Common proxy-crossing patterns

1. Register → SMEM → TMA store

local_store (generic proxy write) followed by async_descriptor_store (async proxy read). The TMA hardware reads SMEM via the async proxy, so a fence is needed after the generic-proxy store. This is handled by TMALowering and covered by the canonical TMA store pattern above.

2. Register → SMEM → MMA (wgmma / tcgen5)

When MMA operands are populated by writing registers to SMEM (via LocalAllocOp with a source or LocalStoreOp), the write goes through the generic proxy. wgmma and tcgen5 MMA instructions read their SMEM operands through the async proxy. A proxy fence is required between the register→SMEM copy and the MMA. This is handled automatically by FenceInsertionPass.

In TLX kernels this shows up when, for example, scales or other data are written to SMEM from registers and then consumed by a wgmma — the compiler inserts the fence, but understanding the pattern helps when debugging correctness issues where the fence might be missing.

Show full SKILL.md (187 more words)Show less

Compiler fence insertion

Three passes insert proxy fences at different stages of the compilation pipeline. They are listed in the order they run.

1. FenceInsertionPass (optimization phase)

File: lib/Dialect/TritonNvidiaGPU/Transforms/FenceInsertion.cpp

Walks every DotOpInterface op (wgmma / tcgen5 MMA). If an operand traces back to a register→SMEM copy (generic proxy write feeding an async proxy read), inserts a FenceAsyncSharedOp before the dot. Can hoist the fence out of loops when safe. Only runs on sm90+.

2. TMALowering (TTGIR → TTGIR rewrite)

File: lib/Dialect/TritonNvidiaGPU/Transforms/TMALowering.cpp

Rewrites high-level TMA store ops. Unconditionally inserts a FenceAsyncSharedOp between the LocalAllocOp (register→SMEM) and the lowered TMA store:

LocalAllocOp  →  FenceAsyncSharedOp  →  TMA store  →  TMAStoreWaitOp
3. ProxyFenceInsertionPass (post-allocation safety net)

File: lib/Dialect/TritonNvidiaGPU/Transforms/ProxFenceInsertion.cpp

Runs after shared memory allocation. Uses alias analysis over allocated buffers to find remaining generic↔async proxy conflicts not caught by earlier passes. Conservatively inserts fences to avoid races. Only runs on sm90+ (computeCapability >= 90).

PTX lowering chain

FenceAsyncSharedOp (TritonNvidiaGPU dialect)
  → NVVM::FenceProxyOp (NVVM dialect)
    → fence.proxy.async.shared::cta  (PTX)

Lowering lives in third_party/nvidia/lib/TritonNVIDIAGPUToLLVM/BarrierOpToLLVM.cpp (FenceAsyncSharedOpConversion). The bCluster attribute selects shared::cluster vs shared::cta scope.

When a fence is NOT needed

  • Async→async (same proxy domain) — no proxy crossing
  • Pre-Hopper (< sm90) — no separate async proxy
  • Fence already present between the conflicting ops (all three passes check for existing FenceAsyncSharedOp)

© facebookexperimental, MIT. 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 .claude/skills/proxy-fence-insertion of facebookexperimental/triton.

Open the folder on GitHubat commit 6f3dd70

Compare with similar skills

Proxy Fence Insertion 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.

Proxy Fence Insertion compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Proxy Fence Insertion this skillfacebookexperimental/triton201—~1.2kAutomated safety check: PassMIT
Vercel Composition Patternssupabase/supabase111k58 repos~726Automated safety check: PassMIT
Finishing a Development Branchobra/superpowers297k5 repos~1.9kAutomated safety check: PassMIT
Typescript Advanced Typesrolling-scopes/rsschool-app10k25 repos~4.2kAutomated safety check: PassMPL-2.0
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Code Review ChecklistshareAI-lab/learn-claude-code78k4 repos~1.1kAutomated safety check: PassMIT

Similar skills

  • Official

    React composition patterns that scale. An agent skill from supabase/supabase.

    111k GitHub starsUsed in 58 repos~726 tokens
    DevelopmentAuto-check passed
  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    297k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Typescript Advanced Types

    rolling-scopes/rsschool-app

    Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications.

    10k GitHub starsUsed in 25 repos~4.2k tokens
    DevelopmentAuto-check passed
  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 4 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Greploop

    onyx-dot-app/onyx

    Iteratively improves a PR (GitHub), MR (GitLab), or shelved changelist (Perforce) until Greptile gives it a 5/5 confidence score with zero unresolved comments.

    32k GitHub starsUsed in 4 repos~3.3k tokens
    DevelopmentAuto-check passed

More from facebookexperimental/triton

All 18 skills in this repo
  • Amd Att Trace

    facebookexperimental/triton

    Official

    Collect, validate, package, and inspect rocprofv3 Advanced Thread Trace bundles for AMD GPU kernels.

    201 GitHub stars~733 tokensUpdated today
    Auto-check passed
  • Ir Override Ablation

    facebookexperimental/triton

    Official

    Design and run Triton TTGIR debugging ablations using iroverride.

    201 GitHub stars~978 tokensUpdated today
    Auto-check passed
  • Tlx Kernel Optimization Agent

    facebookexperimental/triton

    Official

    Execute the TLX Kernel Optimization Agent CLI on a Triton or TLX kernel.

    201 GitHub stars~3.5k tokensUpdated today
    Auto-check passed
  • Compute Sanitizer

    facebookexperimental/triton

    Official

    Run NVIDIA compute-sanitizer (memcheck, racecheck, initcheck, synccheck) against a Triton/TLX kernel to find runtime memory and synchronization bugs.

    201 GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Debug Failing GPU

    facebookexperimental/triton

    Official

    Recover from GPU-busy / GPU-unavailable failures. An agent skill from facebookexperimental/triton.

    201 GitHub stars~709 tokensUpdated today
    Auto-check passed
  • Ir Debugging

    facebookexperimental/triton

    Official

    Debug Triton compilation by dumping IR at each stage (TTIR, TTGIR, LLVM, PTX).

    201 GitHub stars~644 tokensUpdated today
    Auto-check passed

Categories

Questions about Proxy Fence Insertion

What does Proxy Fence Insertion do?

A skill your agent uses when working on fence-related compiler passes, TMA store lowering, proxy fence insertion, investigating missing or spurious fences, or debugging correctness issues in TLX…. Proxy Fence Insertion is an agent skill from facebookexperimental/triton, published by the product's own GitHub organization.asyncdescriptorstore or MMA operations.

When should I use Proxy Fence Insertion?

Proxy Fence Insertion fits situations like: working on fence-related compiler passes; TMA store lowering; proxy fence insertion; investigating missing.

How do I install Proxy Fence Insertion in Claude Code?

Run `npx skills add facebookexperimental/triton --skill proxy-fence-insertion -a claude-code`. Or copy the skill folder (.claude/skills/proxy-fence-insertion in facebookexperimental/triton) into .claude/skills/proxy-fence-insertion in your project. Claude Code loads it when a task matches its description.

How do I install Proxy Fence Insertion in Codex?

Run `npx skills add facebookexperimental/triton --skill proxy-fence-insertion -a codex`. Or copy the skill folder (.claude/skills/proxy-fence-insertion in facebookexperimental/triton) into .agents/skills/proxy-fence-insertion in your project. Codex loads it when a task matches its description.

Can I use Proxy Fence Insertion 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 facebookexperimental/triton --skill proxy-fence-insertion -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/proxy-fence-insertion, .gemini/skills/proxy-fence-insertion, .github/skills/proxy-fence-insertion and .opencode/skills/proxy-fence-insertion in your project.

What does Proxy Fence Insertion need to run?

SKILL.md names no scripts, command-line tools or credentials: Proxy Fence Insertion is instructions for the agent only. Our summary lists: Python 3.

Does Proxy Fence Insertion 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 Proxy Fence Insertion 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 Proxy Fence Insertion use?

Proxy Fence Insertion is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Proxy Fence Insertion use?

About 1.2k tokens (SKILL.md is roughly 4.7k 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 Proxy Fence Insertion?

Skills that share tags, products or a category with Proxy Fence Insertion: Vercel Composition Patterns (supabase/supabase, 111k stars), Finishing a Development Branch (obra/superpowers, 297k stars), Typescript Advanced Types (rolling-scopes/rsschool-app, 10k stars) and PR Babysitter (openinterpreter/openinterpreter, 69k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Proxy Fence Insertion?

facebookexperimental (a GitHub organization, an official publisher) maintains it in facebookexperimental/triton, which has 201 GitHub stars. The repository holds 18 skills in this directory. The repository was last updated on October 10, 2026.

Source: facebookexperimental/triton on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.