sm120_swapab

sm120_swapab is a skill for Claude Code, Codex from flashinfer-ai/flashinfer. It costs 0 tokens per session (481 once invoked), scanned A, original, Apache-2.0.

A source-maintenance procedure for an SM120 GPU communication and kernel adapter. It covers replacing pinned provider packages, preserving local adapters and records, and checking launch arguments, workspace handling, output shapes, and counter resets.

In plain words
What is it for?
It is for developers updating SM120 swap-AB sources in a GPU machine-learning codebase. It helps apply a prepared source drop and validate construction, launch, communication, and output behavior.
Why use it?
It helps keep a vendored GPU implementation compatible with the surrounding adapter and backend code. It also avoids conflicts caused by shared module names across different GPU generations.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It is for developers updating SM120 swap-AB sources in a GPU machine-learning codebase. It helps apply a prepared source drop and validate construction, launch, communication, and output behavior.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/flashinfer-ai/flashinfer/sm120_swapab
About the project

FlashInfer is a library and kernel generator that supplies GPU operations used to run large language model inference, including attention, matrix multiplication, and mixture-of-experts computations. It helps engineers build and optimize LLM serving systems across supported GPU hardware and backend implementations. Its catalogue add-ons provide skills and instructions for working with FlashInfer.

flashinfer-ai/flashinfer · 7,037 stars · on GitHub · flashinfer.ai

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add flashinfer-ai/flashinfer --skill sm120_swapab
Clone the repo
git clone --depth 1 https://github.com/flashinfer-ai/flashinfer

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sm120_swapab

README.md
[![agentmods](https://agentmods.dev/badge/skills/flashinfer-ai/flashinfer/sm120_swapab/github.svg)](https://agentmods.dev/skills/flashinfer-ai/flashinfer/sm120_swapab)
Your own site
<a href="https://agentmods.dev/skills/flashinfer-ai/flashinfer/sm120_swapab"><img src="https://agentmods.dev/badge/skills/flashinfer-ai/flashinfer/sm120_swapab/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sm120_swapab

Your own site · 80×15
<a href="https://agentmods.dev/skills/flashinfer-ai/flashinfer/sm120_swapab"><img src="https://agentmods.dev/badge/skills/flashinfer-ai/flashinfer/sm120_swapab.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 481 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00481
Opus 5.5 $0.00000 $0.00192
Sonnet 5.5 $0.00000 $0.00096
Haiku 4.5 $0.00000 $0.00048

Measured 9d ago against content hash 2c54bd0aeb66, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

sm120_swapab scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

The scan reads SKILL.md. This mod also ships 60 executable files (common/__init__.py, common/host_utils.py, common/megamoe_constants.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

flashinfer/moe_ep/kernels/flashinfer/sm120_swapab/SKILL.md · 46 lines

What it actually says

Updating the SM120 swap-AB sources

sm120_swapab/
├── common/
├── src/                    # original communication package name
├── moe_sm120_mxfp8_swapab/
├── moe_mxfp8_glu/
└── moe_nvfp4_swapab/

The adapter lives at flashinfer/moe_ep/shims/sm120/swapab_cutedsl/. Backends import its package exports. The adapter owns path setup, communication, workspace allocation and launch binding; kernel_helpers.py lazily exposes provider helpers and references. This legacy drop shares raw module names with SM90 and SM100, so those implementations require separate processes.

Replace the five source packages from the pinned release-prepared branch drop, then reapply the changes recorded in VENDOR.md. Preserve the adapters and vendoring records. Do not format generated sources or copy provider test and benchmark scaffolding.

Check Sm120MegaMoEMxfp8SwapABKernel.__init__ and .__call__ against the adapter's constructor and launch arguments. Compare the provider's moe_sm120_mxfp8_swapab/mega_runner.py for workspace allocation, combine-output shape, the separate top-k reducer and local-counter reset. Keep the reset until the selected kernel revision provides the corresponding tail reset.

Check _MXFP8_BLOCK_SIZE, _SF_PADDING_BLOCK, _CTA_TOKEN_TILE and _SWAP_AB_INTERLEAVE in the adapter. _assert_mirrored_constants() catches value drift at compile time; renamed symbols still need an import update. Verify the reference and quantizer imports in kernel_helpers.py, including their dependencies on common, src and the two helper kernel packages.

Run host import/configuration checks, then the numerical and graph cases on SM120:

torchrun --standalone --nproc_per_node=4 -m pytest \
    tests/moe_ep/test_moe_ep_sm120_mxfp8_cutedsl_mega_multirank.py -x -v

Backend dispatch remains under backends/mega/kernel/sm120/mxfp8_mxfp8_bf16_cutedsl/ and is maintained separately from the provider snapshot.

Files

What ships with it

60 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 46 lines · 0 tokens per session scan A 2c54bd0aeb66

Subscribe to this mod's changes

sm120_swapab is a skill published in the GitHub repository flashinfer-ai/flashinfer (7,037 stars, last pushed today), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 481 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-21.

Related

sm120_swapab compared with skills from other repositories

sm120_swapab next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
sm120_swapabflashinfer-ai/flashinferSkill7.0ktodayApache-2.0A0Claude Code, Codex
gpu-server-setupEvilFreelancer/gpu-server-setupSkill1528d agoMITB223Claude Code
trtllm-modeling-v2-featuresNVIDIA/TensorRT-LLMSkill15ktodaynoneA194Claude Code, Codex
trtllm-modeling-v2-entryNVIDIA/TensorRT-LLMSkill15ktodaynoneA76Claude Code, Codex
trtllm-serve-config-guideNVIDIA/TensorRT-LLMSkill15ktodaynoneA74Claude Code, Codex
atc-model-converterascend-ai-coding/awesome-ascend-skillsSkill187yesterdaynoneA142Claude Code
ai-for-science-ai4s-basicascend-ai-coding/awesome-ascend-skillsSkill187yesterdaynoneA96Claude Code