MUSA GPU Training Optimizer
open-infra-skills/infra-skills
Profiles, benchmarks and tunes AI training workloads on Moore Threads MUSA GPUs with a measurement-first process that keeps model behavior unchanged.
Manage tensor lifetimes across CUDA streams and decide whether recordstream is avoidable.
$ npx skills add pytorch/pytorch --skill cuda-streams -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install pytorch/pytorch cuda-streams --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/pytorch/pytorch.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/cuda-streams .claude/skills/cuda-streams && rm -rf skills-srcUse ~/.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/
Install the "cuda-streams" agent skill from https://github.com/pytorch/pytorch/tree/main/.agents/skills/cuda-streams into .claude/skills/cuda-streams/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cuda-streams", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/pytorch/pytorch/tree/main/.agents/skills/cuda-streamsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add pytorch/pytorch --skill cuda-streams -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install pytorch/pytorch cuda-streams --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pytorch/pytorch.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/cuda-streams .agents/skills/cuda-streams && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "cuda-streams" agent skill from https://github.com/pytorch/pytorch/tree/main/.agents/skills/cuda-streams into .agents/skills/cuda-streams/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cuda-streams", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add pytorch/pytorch --skill cuda-streams -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install pytorch/pytorch cuda-streams --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pytorch/pytorch.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/cuda-streams .cursor/skills/cuda-streams && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "cuda-streams" agent skill from https://github.com/pytorch/pytorch/tree/main/.agents/skills/cuda-streams into .cursor/skills/cuda-streams/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cuda-streams", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/pytorch/pytorch.git --path .agents/skills/cuda-streams--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add pytorch/pytorch --skill cuda-streams -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install pytorch/pytorch cuda-streams --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pytorch/pytorch.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/cuda-streams .gemini/skills/cuda-streams && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "cuda-streams" agent skill from https://github.com/pytorch/pytorch/tree/main/.agents/skills/cuda-streams into .gemini/skills/cuda-streams/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cuda-streams", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install pytorch/pytorch cuda-streamsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add pytorch/pytorch --skill cuda-streams -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/pytorch/pytorch.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/cuda-streams .github/skills/cuda-streams && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "cuda-streams" agent skill from https://github.com/pytorch/pytorch/tree/main/.agents/skills/cuda-streams into .github/skills/cuda-streams/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cuda-streams", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add pytorch/pytorch --skill cuda-streams -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install pytorch/pytorch cuda-streams --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pytorch/pytorch.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/cuda-streams .opencode/skills/cuda-streams && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "cuda-streams" agent skill from https://github.com/pytorch/pytorch/tree/main/.agents/skills/cuda-streams into .opencode/skills/cuda-streams/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cuda-streams", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
cuda-streamsManage tensor lifetimes across CUDA streams and decide whether recordstream is avoidable.
Cuda Streams is an agent skill from pytorch/pytorch. Manage tensor lifetimes across CUDA streams and decide whether recordstream is avoidable. Use when using a tensor on a stream other than the one it was allocated on, adding or reviewing Tensor.recordstream / CUDACachingAllocator::recordStream, side streams, waitstream, or CUDA events for cross-stream ordering, or designing APIs that hand side-stream tensors to callers.
Its SKILL.md is about 800 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 AI & LLM Engineering, covering Deep learning. It works with CUDA. The repository describes itself as: Tensors and Dynamic neural networks in Python with strong GPU acceleration.
Read from SKILL.md and the folder at commit 21cfde5. It shows what the files ask for, not the result of running them.
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.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Cuda Streams loads about 796 tokens when it runs. Until then it costs about 97 tokens; SKILL.md has 428 words of instructions outside code blocks.
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.
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.
Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 428 words (~796 tokens).
“The caching allocator only reuses a block on the stream that allocated it. If a tensor is used on some other stream, then before it is freed you need either (a) a sync from that stream back to the creation…”
Just SKILL.md in .agents/skills/cuda-streams of pytorch/pytorch.
Open the folder on GitHubat commit 21cfde5
Cuda Streams 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Cuda Streams this skillpytorch/pytorch | 104k | — | ~796 | Automated safety check: Pass | Custom licence | |
| MUSA GPU Training Optimizeropen-infra-skills/infra-skills | 141 | — | ~1.7k | Automated safety check: Pass | Apache-2.0 | |
| Megatron-LM on SLURMNVIDIA/Megatron-LM | 18k | — | ~1.8k | Automated safety check: Pass | Apache-2.0 | |
| DGX Spark Training Gotchaswshobson/agents | 40k | — | ~2k | Automated safety check: Pass | MIT | |
| Extending Ocannlahrefs/ocannl | 118 | — | ~728 | Automated safety check: Pass | BSD-2-Clause | |
| Mamba State-Space ModelsOrchestra-Research/AI-Research-SKILLs | 13k | 2 repos | ~1.8k | Automated safety check: Pass | MIT |
open-infra-skills/infra-skills
Profiles, benchmarks and tunes AI training workloads on Moore Threads MUSA GPUs with a measurement-first process that keeps model behavior unchanged.
NVIDIA/Megatron-LM
Shows how to launch distributed Megatron-LM training on a SLURM cluster: sbatch skeleton, torch.distributed.run setup, CUDA_DEVICE_MAX_CONNECTIONS rules and failure diagnosis.
wshobson/agents
Preflight checks and diagnosis for ten known failure modes of ML training on NVIDIA DGX Spark's GB10, spanning launch errors, memory, thermals, bandwidth and precision.
ahrefs/ocannl
Touch-lists for common OCANNL extension tasks: adding a primitive operation, adding or extending a backend, extending shape inference, and diagnosing output differences between backends.
Orchestra-Research/AI-Research-SKILLs
Guide to using Mamba selective state-space models for linear-time sequence modeling, from the Mamba block and pretrained checkpoints to Mamba-2 and speed comparisons.
joselado/pyqula
pyqula's CPU/GPU switch (src/pyqula/gpu.py), how a routine is routed onto the device, per-call precision, and the tiered porting plan in documentation/gpuportingplan.md.
pytorch/pytorch
Add unsigned integer (uint) type support to PyTorch operators by updating ATDISPATCH macros.
pytorch/pytorch
Write docstrings for PyTorch functions and methods following PyTorch conventions.
pytorch/pytorch
Debug AOTInductor (AOTI) errors and crashes. An agent skill from pytorch/pytorch.
pytorch/pytorch
Query PyTorch CI, GitHub Actions, HUD, Grafana, and infrastructure metrics.
pytorch/pytorch
Choose 32-bit vs 64-bit index math in PyTorch CUDA kernels. An agent skill from pytorch/pytorch.
pytorch/pytorch
Document undocumented public APIs in PyTorch by removing functions from coverageignorefunctions and coverageignoreclasses in docs/source/conf.py, running Sphinx coverage, and adding the appropriate…
Works with
Categories
Manage tensor lifetimes across CUDA streams and decide whether recordstream is avoidable. Cuda Streams is an agent skill from pytorch/pytorch. Manage tensor lifetimes across CUDA streams and decide whether recordstream is avoidable.
Cuda Streams fits situations like: using a tensor on a stream other than the one it was allocated on; reviewing Tensor.recordstream / CUDACachingAllocator::recordStream; CUDA events for cross-stream ordering; designing APIs that hand side-stream tensors to callers.
Run `npx skills add pytorch/pytorch --skill cuda-streams -a claude-code`. Or copy the skill folder (.agents/skills/cuda-streams in pytorch/pytorch) into .claude/skills/cuda-streams in your project. Claude Code loads it when a task matches its description.
Run `npx skills add pytorch/pytorch --skill cuda-streams -a codex`. Or copy the skill folder (.agents/skills/cuda-streams in pytorch/pytorch) into .agents/skills/cuda-streams in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add pytorch/pytorch --skill cuda-streams -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cuda-streams, .gemini/skills/cuda-streams, .github/skills/cuda-streams and .opencode/skills/cuda-streams in your project.
SKILL.md names no scripts, command-line tools or credentials: Cuda Streams is instructions for the agent only.
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.
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.
Cuda Streams has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.
About 796 tokens (SKILL.md is roughly 3.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Cuda Streams: MUSA GPU Training Optimizer (open-infra-skills/infra-skills, 141 stars), Megatron-LM on SLURM (NVIDIA/Megatron-LM, 18k stars), DGX Spark Training Gotchas (wshobson/agents, 40k stars) and Extending Ocannl (ahrefs/ocannl, 118 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
pytorch (a GitHub organization) maintains it in pytorch/pytorch, which has 103,925 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on October 9, 2026.
Source: pytorch/pytorch on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.