agentleFS
fzyzcjyfzyzcjy/torch_memory_saver/.claude/skills/tms-testing/SKILL.md

tms-testing

Skill279 starsChanged 34 days agoMITView on GitHub

Use when running ordinary torch_memory_saver regression tests or the full CUDA wheel runtime matrix.

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 0 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use an isolated checkout on a Linux GPU host, such as tom-workstation, in an official PyTorch CUDA devel container with an idle GPU exposed.

    line 8
  2. Very specific:

    If preload children cannot find libcudart.so.<major>, prepend the matching runtime directory to LD_LIBRARY_PATH before pytest.

    line 17
  3. Very specific:

    Run the ordinary and tooling tests above, then use tms-publish-release Sections 2–5 for isolated paths, Docker/ARM64 binfmt setup, both …

    line 28
  4. Very specific:

    After building both wheels into dist/, run on the GPU host with the paths prepared above:

    line 30
  5. Very specific:

    When adding test/test_*.py, update the harness runtime/build-tool inventory and run every classified build-tool module.

    line 40

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

1 Ordinary tests

  • Use an isolated checkout on a Linux GPU host, such as tom-workstation, in an official PyTorch CUDA devel container with an idle GPU exposed. Install pytest, nvidia-ml-py, and setuptools in the same Python environment as PyTorch.
  • From the repository root, rebuild the extensions for the container's CUDA major, then run all ordinary tests. This example uses CUDA 12; set TMS_CUDA_MAJOR=13 for CUDA 13:
TMS_CUDA_MAJOR=12 uv run --no-project python setup.py build_ext --inplace
CUDA_VISIBLE_DEVICES=0 timeout 3600 uv run --no-project python -m pytest test -vv -ra
  • The suite parametrizes supported scenarios over preload and torch hook modes. Single-GPU runs skip multi-device cases; report skips with the passing summary.
  • If preload children cannot find libcudart.so.<major>, prepend the matching runtime directory to LD_LIBRARY_PATH before pytest; pip CUDA runtimes may be outside the loader's default search path.
  • For build/release tooling changes, also run:
uv run --no-project --with pytest --with packaging --with typer --with setuptools python -m pytest \
  test/test_merge_cuda_wheels.py \
  .claude/skills/tms-publish-release/scripts/test_*.py -vv -ra

2 Full matrix tests

  • Run the ordinary and tooling tests above, then use tms-publish-release Sections 2–5 for isolated paths, Docker/ARM64 binfmt setup, both wheel builds, and fresh GPU containers on tom-workstation.
  • For development testing, use the target commit and its setup.py version; release-only requirements to use merged origin/master, check PyPI, or publish do not apply.
  • After building both wheels into dist/, run on the GPU host with the paths prepared above:
uv run --script .claude/skills/tms-publish-release/scripts/gpu_validation.py \
  --release-root "$TMS_REMOTE_ROOT" \
  --artifact-root "$TMS_REMOTE_ARTIFACTS" \
  --expected-version "$TMS_RELEASE_VERSION"
  • Require all four cells to pass: x86_64/ARM64 × CUDA 12/13. The harness tests installed wheels outside the checkout and enforces exact skips; do not deselect failing cases.
  • When adding test/test_*.py, update the harness runtime/build-tool inventory and run every classified build-tool module; unclassified modules fail preflight.
  • Multi-device, XPU, and Lupine exclusions remain coverage limits. Validate affected backends on suitable hardware separately.
  • For either chapter, save complete build/test output in unique artifact logs, run long commands in the background, and inspect progress at least every ten minutes.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.