claudeers.
// RAG & Knowledge

nvshmem-metal-markdown

NVSHMEM skills for Claude Code

// RAG & Knowledge[ api ][ claude ]#claude#rag$open-sourceupdated 14 days ago
Actively maintained
96/100
last commit 19 days ago
last release none
releases 0
open issues 0

Install with your AI

Paste into Claude Code, Cursor, or any agent — it reads the repo and wires the tool into your project.

Install and set up nvshmem-metal-markdown (git-clone project) into my current project.
Found on https://claudeers.com/nvshmem-metal-markdown
Repo: https://github.com/l1cacheDell/nvshmem-metal-markdown
Homepage/docs: —
Detected install method: git-clone → git clone https://github.com/l1cacheDell/nvshmem-metal-markdown
Category: rag. Platforms: api.
Read the repo's README for exact setup and env vars, then install it and wire it into my project.

Claudeers Health Verdict:
active; community-verified: false. Confirm the source before running anything.
// or clone
git clone https://github.com/l1cacheDell/nvshmem-metal-markdown

// compatibility

Platformsapi
Operating systems
AI compatibilityclaude
License
Pricingopen-source
LanguageCuda

NVSHMEM Knowledge Base + Claude Code Skill

A Claude Code skill for multi-GPU / GPU-initiated-communication work, built from how two production libraries actually use NVSHMEM rather than from a rewrite of the vendor manual.

NVIDIA's documentation tells you what nvshmem_put_nbi does. It does not tell you how to structure a library around it, which of the hundreds of routines matter in practice, or what a team learns after shipping. That is what is here — reverse-engineered from DeepEP and UltraEP, both MIT-licensed and both vendored in full, so every claim is anchored to code you can read.

What's Here

  1. nvshmem-purified-docs/ — a clean-room NVSHMEM knowledge base (5.5k lines)

    Seven topic files organised by what you have to get right, not by API family: bootstrap and lifecycle, symmetric memory, data movement, ordering and synchronisation, collectives, environment tuning, and what lives below the API. Plus a symbol index covering all 55 NVSHMEM symbols the two projects use, annotated with which project uses each.

    That last annotation is the part no vendor index can give you: 26 of the 55 are used by both projects. Two independent teams converging on a routine is strong evidence it is core; something only one uses is situational. The vendor manual documents hundreds of routines with equal weight.

    Derived entirely from MIT-licensed source. Verified to share zero 10-word sequences with NVIDIA's documentation.

  2. Two production case studies, deliberately contrasting (6.7k lines + 20.1k lines of vendored source)

    DeepEP and UltraEP solve neighbouring problems in MoE training and made opposite NVSHMEM choices. Reading them side by side answers a question the reference cannot: which shape should my library have? ~950 file:line citations, all verified against the vendored trees.

  3. The skill itselfSKILL.md plus topical guides on the API surface, environment variables, and correctness traps. Everything is searched with grep rather than loaded into context.

Two Production Case Studies

DeepEP v1.2.1UltraEP v1.0.0
JobDispatch/combine MoE tokens across nodesBalance expert load, reroute within a node
Hot pathBelow the API — hand-built mlx5 WQEs against NVSHMEM-internal IBGDA stateAbove it — public API only
nvshmem_ptr0 uses7 uses — peer load/store is the main mechanism
CollectivesNonenvshmemx_int32_{sum_reduce,fcollect}_on_stream
CouplingA ~500-line fork of NVSHMEM's own headerA 104-line facade, built to be swapped for NCCL GIN
Bulk trafficCrosses the networkStays in the NVLink domain

That last row is the deciding question, and ultraep-docs/ultraep-vs-deepep.md develops it into an ordered set of questions to ask about your own workload. Read that one first if you are choosing an approach rather than reading an existing codebase.

GuideWhat it covers
ultraep-docs/ultraep-vs-deepep.mdThe design question: symbol-by-symbol comparison, what each approach buys and costs, and which to pick
deepep-docs/deepep-architecture.mdUnique-ID bootstrap alongside torch.distributed; strided team split for cross-node planes; one nvshmem_align with per-PE layout; environment-before-init; teardown
deepep-docs/deepep-kernel-patterns.mdWarp specialisation with named barriers; channel/slot credit rings; dual-domain RDMA→NVLink forwarding; low-latency path; hook-based overlap consuming no SMs
deepep-docs/deepep-ibgda-direct.mdThe hot path calls no NVSHMEM RMA routine — full mechanism, plus an honest account of the cost
ultraep-docs/ultraep-architecture.mdThe 104-line facade as a real seam; measuring the NVLink domain before init; allocate-once symmetric memory under CUDA-graph constraints
ultraep-docs/ultraep-balancing-and-p2p.mdPeer-pointer tables cached on device; TMA load-once/store-to-N-peers; hand-rolled signalling on epoch flags; a placement solver behind one on-stream fcollect

Two things worth knowing before reading the DeepEP guides:

  • Its hot path depends on NVSHMEM-internal interfaces, not public API. Read it for the patterns, not as a template. This is a considered trade for a specific regime, and the comparison guide says what that regime is.
  • A nvshmemi_ prefix does not make a symbol NVSHMEM's. DeepEP defines nvshmemi_ibgda_put_nbi_warp, nvshmemi_ibgda_quiet, nvshmemi_get_p2p_ptr and others itself under that prefix — and UltraEP's ultra_ep::nvshmem::* wrappers are likewise its own. Both guides tag every symbol, verified by cross-checking the source trees rather than inferring from the name.

Why grep, not a manual

Every question below is answered by a literal string in this repository:

cd nvshmem_skill/references

# Which NVSHMEM routines do production libraries actually call?
cat nvshmem-purified-docs/INDEX.md            # 55 symbols, 26 used by both projects

# How does a real library bootstrap NVSHMEM under torch.distributed?
grep -n -A20 'unique-ID' nvshmem-purified-docs/01-bootstrap-and-lifecycle.md

# What does fence guarantee that quiet doesn't?
grep -n -B2 -A10 'fence' nvshmem-purified-docs/04-ordering-and-synchronisation.md

# Which env vars does shipping code set, and why?
grep -n -B2 "os.environ\['NVSHMEM" deepep-docs/src/deep_ep/buffer.py
grep -n 'NVSHMEM' ultraep-docs/src/ultra_ep/runtime.py

# UltraEP's entire NVSHMEM dependency is one header — read it in a minute
cat ultraep-docs/src/csrc/utils/nvshmem.cuh

Structure

nvshmem-metal-markdown/
├── README.md
├── scrape_nvshmem_docs.py                 # optional: fetch NVIDIA's docs locally (see below)
├── html_to_markdown.py                    # optional: convert them to markdown
└── nvshmem_skill/                         # the portable skill
    ├── SKILL.md                           # program structure, build/launch, debugging, traps
    └── references/
        ├── nvshmem-purified-docs/         # THE clean-room knowledge base
        │   ├── INDEX.md                   #   55-symbol index, both/one-project annotated
        │   ├── 01-bootstrap-and-lifecycle.md
        │   ├── 02-symmetric-memory.md
        │   ├── 03-data-movement.md
        │   ├── 04-ordering-and-synchronisation.md
        │   ├── 05-collectives.md
        │   ├── 06-environment-and-tuning.md
        │   └── 07-below-the-api.md
        │
        ├── nvshmem-api.md                 # API-surface search guide
        ├── env-and-config.md              # environment variables
        ├── patterns-and-pitfalls.md       # correctness traps
        │
        ├── deepep-docs/                   # case study 1: below the API
        │   ├── INDEX.md
        │   ├── deepep-architecture.md
        │   ├── deepep-kernel-patterns.md
        │   ├── deepep-ibgda-direct.md
        │   └── src/                       # DeepEP v1.2.1, MIT (8.9k lines)
        │
        └── ultraep-docs/                  # case study 2: above the API
            ├── INDEX.md
            ├── ultraep-vs-deepep.md       # THE decision guide
            ├── ultraep-architecture.md
            ├── ultraep-balancing-and-p2p.md
            └── src/                       # UltraEP v1.0.0, MIT (11.2k lines)

Using the Skill

cp -r nvshmem_skill ~/.claude/skills/nvshmem

It activates automatically for NVSHMEM work. Questions it answers from local content:

  • "Why does my program hang in nvshmem_barrier_all?"
  • "What's the difference between nvshmem_fence and nvshmem_quiet?"
  • "How do I bootstrap NVSHMEM from an existing torch.distributed world?"
  • "Should I use nvshmem_ptr peer stores or put_nbi here?"
  • "How do I allocate symmetric memory when CUDA graphs forbid dynamic allocation?"
  • "Which environment variables should I set before init, and why?"
  • "What does an RMA put actually do at the hardware level?"

Optional: adding NVIDIA's own documentation locally

NVIDIA's NVSHMEM documentation is proprietary — "All rights reserved", and its SLA forbids redistribution and derivative works — so it is not included here. The skill is designed to work without it.

If you want it locally anyway, two scripts fetch and convert it into the same grep-able shape:

./scrape_nvshmem_docs.py     # 49 pages, random 2-5s between requests
./html_to_markdown.py        # -> nvshmem_skill/references/nvshmem-docs/

Dependencies: requests, beautifulsoup4, lxml. Both outputs are gitignored.

The conversion is a structural walk of the Sphinx DOM rather than a generic HTML-to-text pass, because the parts that matter are the parts generic converters break:

  • Function signatures are reassembled from the code.descname / em / span.sig-paren spans Sphinx splits them across, and emitted as fenced code so each prototype stays greppable on one line.
  • Parameter names are recovered. NVIDIA's generator emits parameter documentation as an unlabelled run of paragraphs — the names exist only in the prototype. Where the counts line up (24 matches, 0 mismatches), the name is spliced back in.
  • Underscores are never escaped, so nvshmem_put stays searchable.
  • Tables become GitHub pipe tables; the env-var and constant pages are almost entirely tables.

Verified against the HTML source: 49/49 pages, tables 29→29, code blocks and signatures 686→686, text coverage within 0.85–1.6× on 46/49 pages (the three outliers are link indexes).

Provenance and licensing

ContentSourceLicence
nvshmem-purified-docs/Reverse-engineered from the two MIT source trees belowOriginal work
deepep-docs/*.md, ultraep-docs/*.mdOur analysis of MIT-licensed codeOriginal work
deepep-docs/src/DeepEP v1.2.1MIT © DeepSeek
ultraep-docs/src/UltraEP v1.0.0MIT © PKU-DASYS and Dots-Infra
The two scriptsOriginal

Two exclusions worth stating plainly:

  • NVIDIA's documentation is not redistributed here, for the licence reasons above. The purified knowledge base was written from MIT-licensed code, not from that documentation, and is checked mechanically: a 10-word n-gram comparison against the vendor text (code fences and symbol tables stripped, so only prose is compared) returns zero overlapping sequences.
  • deepep-docs/src/csrc/kernels/ibgda_device.cuh is not included. Alone in the DeepEP tree, that file is a fork of NVSHMEM's own non_abi/device/pt-to-pt/ibgda_device.cuh and carries NVIDIA's copyright under the NVSHMEM SLA rather than DeepEP's MIT licence — its own header says so. Clone DeepEP upstream at v1.2.1 to follow the citations that reference it.

For anything beyond the scope of what these two libraries exercise, NVIDIA's official documentation is the authoritative reference.

Verification

Everything published here is checked mechanically rather than asserted:

CheckResult
Clean-room purity of nvshmem-purified-docs/0 shared 10-word sequences with vendor docs (23,210 n-grams compared)
file:line citations across all guides~950, 0 invalid — every path exists, every line number in range
Symbol classification (public / internal / project's own)Cross-checked against both source trees, not inferred from names
grep commands in guidesEvery command executed; 0 path errors. Commands that legitimately return nothing are annotated as such — several exist to prove an absence
Symbol index coverage55 symbols, verified by grep over both trees

Known limitations:

  • The purified knowledge base is narrow by construction: it covers what these two libraries use. Large parts of NVSHMEM — most of the RMA/AMO/signal type-generic families, NVSHMEM4Py, the CuTe and Numba device DSLs — are out of scope. Use NVIDIA's docs for those.
  • Both case studies are MoE communication libraries on NVLink+InfiniBand hardware. Patterns are labelled with a copy / do-not-copy verdict, but the sample is two projects, not a survey.

// faq

What is nvshmem-metal-markdown?

NVSHMEM skills for Claude Code. It is open-source on GitHub.

Is nvshmem-metal-markdown free to use?

nvshmem-metal-markdown is open-source, so it is free to use.

What category does nvshmem-metal-markdown belong to?

nvshmem-metal-markdown is listed under rag in the Claudeers registry of Claude-compatible tools.

3 views
26 stars
unclaimed
updated 14 days ago

// embed badge

nvshmem-metal-markdown on Claudeers
[![Claudeers](https://claudeers.com/api/badge/nvshmem-metal-markdown.svg)](https://claudeers.com/nvshmem-metal-markdown)

// retro hit counter

nvshmem-metal-markdown hit counter
[![Hits](https://claudeers.com/api/counter/nvshmem-metal-markdown.svg)](https://claudeers.com/nvshmem-metal-markdown)

// reviews

// guestbook

0/500

// related in RAG & Knowledge

🔓

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant contex…

// ragthedotmack/JavaScript91,533Apache-2.0[ claude ]
🔓

✨ Light and Fast AI Assistant. Support: Web | iOS | MacOS | Android | Linux | Windows

// ragChatGPTNextWeb/TypeScript88,637MIT[ claude ]
🔓

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 60-95% fewer tokens, same answers. Library, proxy, MCP server.

// ragheadroomlabs-ai/Python66,377Apache-2.0[ claude ]
🔓

A light-weight and powerful meta-prompting, context engineering and spec-driven development system for Claude Code by TÂCHES.

// raggsd-build/JavaScript64,663MIT[ claude ]
→ see how nvshmem-metal-markdown connects across the ecosystem