Skip to content
FunCoding

pytorch-upgrade-and-lab-audit

Upgrade PyTorch, CUDA, Triton, or CUTLASS version pins across `ai-performance-engineering`, audit labs for conceptual fidelity and correctness, and verify live on Blackwell GPUs. Use when bumping stack pins, auditing labs for fake or misaligned optimizations, checking duplicate lab targets, or validating releases on multi-GPU B200/GB200 hosts.

Star
2,269
Category
Science
License
Apache-2.0
Last commit
Dec 1, 2026

.agents/skills/pytorch-upgrade-and-lab-audit/SKILL.md

View on GitHub

PyTorch Stack Upgrade and All-Labs Audit

Execute every step in order. Do not declare an upgrade or audit complete until all version pins, lab contracts, generated docs, and live GPU checks pass.

1. Map and update every version pin

  1. Search the whole repository for the outgoing version string (exact, major.minor, and regex-escaped forms like 2\.13\.0\+cu130).
  2. Update root pins (code/setup.sh, code/requirements_latest.txt, code/pyproject.toml, Dockerfiles, docs/). Test unified solver compatibility with uv pip compile before bumping serving packages (vllm vs torchtitan/datasets huggingface-hub major-version bounds) so code/requirements_latest.txt stays pip check-clean, and document any held-back upstream pin with its exact blocker instead of breaking the shared environment.
  3. Inspect standalone per-lab manifests, intake specs, and tests (for example code/labs/arithmetic_intensity_b200/ has its own *.yaml intake files, runner, README, and regex assertions in tests/). Update every standalone pin unless a documented hardware or upstream incompatibility requires keeping a pin.
  4. Confirm zero stale outgoing version strings remain outside historical release notes and completed benchmark receipts.

Completion criterion: every active environment spec, standalone lab pin, and version-pin unit test targets the new stack, and all version-pin unit tests pass.

2. Audit labs for conceptual fidelity and correctness

Read references/lab-audit-rubric.md before starting a multi-lab sweep.

  1. Shard labs into parallel read-only audit batches (10 to 15 labs per batch) when reviewing more than 10 labs.
  2. Check every baseline_*.py / optimized_*.py pair against the concept its lab README claims to demonstrate: matching math and tensor shapes, real algorithmic or kernel optimization (no trivial fallbacks or skipped work), harness-seeded determinism, discriminating (rtol, atol) tolerances, and SKIPPED: classification for missing capabilities.
  3. Before deleting an apparent duplicate across two labs (such as KV-cache compression FP4 vs decode-loop FP4), compare their timed workloads and subsystems to confirm whether they isolate distinct mechanisms. Keep distinct mechanisms and document the boundary.
  4. Fix every confirmed defect and re-verify with the benchmark linter and unit tests.

Completion criterion: every audited lab is accounted for with a pass, verified fix, or explicit capability boundary, and python -m core.scripts.linting.check_benchmarks --include-unpaired --fail-on-warnings passes.

3. Sync CLI, MCP, and generated documentation

  1. Regenerate MCP documentation after tool or schema updates:
    cd code
    python -m scripts.generate_mcp_docs
    
  2. Regenerate and verify all managed READMEs:
    cd code
    python -m core.scripts.refresh_readmes --write --all
    python -m core.scripts.refresh_readmes --check
    
  3. Run the CPU contract and linter suite (make lint, tests/test_get_benchmark_presence.py, tests/test_interface_consistency.py, tests/test_mcp_tools.py, tests/test_refresh_readmes.py, tests/test_repository_configuration.py, tests/test_agents_policy_regressions.py).

Completion criterion: all 61 README targets are in sync, MCP docs match code, and every CPU contract test passes.

4. Verify live on target GPU hardware and clean up

  1. Check nvidia-smi and running processes before launching jobs so you never collide with active GPU workloads.
  2. Verify the exact live runtime (python -c "import torch; print(torch.__version__, torch.version.cuda, torch.cuda.get_device_name(0))").
  3. Run representative python -m cli.aisp bench verify / bench run checks and standalone lab smoke tests (including any upgraded standalone lab) on the target GPU.
  4. Remove every temporary checkout or scratch directory created on the remote GPU host (for example /tmp/... or /root/... staging clones) once verification completes.
  5. Report exact commands, live PyTorch/CUDA/GPU versions, pass/fail counts, and any skipped or unmeasured targets plainly.

Similar Skills

graphify

GRGraphify-Labs/graphify156k2,564 new stars in the last 7 days

wiki-query

PApaperclipai/paperclip119k1,966 new stars in the last 7 days

Official

clinical-case-report

NEnexu-io/open-design111k1,277 new stars in the last 7 days

style-sampling

HEheygen-com/hyperframes94k4,558 new stars in the last 7 days

academic-paper-review

BYbytedance/deer-flow86k276 new stars in the last 7 days

systematic-literature-review

BYbytedance/deer-flow86k276 new stars in the last 7 days