release-go-live-binary-build-matrix

โดย pytorch

อัปเดต tools/scripts/generate_binary_build_matrix.py เมื่อ PyTorch release เปิดตัวจริง เลื่อน CURRENT_STABLE_VERSION ไปยัง stable เวอร์ชันใหม่ ส่งเสริม…

npx skills add https://github.com/pytorch/test-infra --skill release-go-live-binary-build-matrix

Release Go-Live: Binary Build Matrix

Updates tools/scripts/generate_binary_build_matrix.py and the associated test fixtures when a PyTorch release goes live. This mirrors prior PRs such as:

  • Release 2.10 go live. Update release matrix (#7668)
  • Release 2.11 promotion script changes (#7868)
  • Release 2.12 go live. Update release matrix (#8070)

When to use this skill

Use when the user asks to:

  • Advance stable version to X.Y.0 in the binary build matrix
  • Promote release CUDA/ROCm arches now that release X.Y is going live
  • Update generate_binary_build_matrix.py for a new PyTorch release
  • Do "release go live" changes

Target files

FileWhy
tools/scripts/generate_binary_build_matrix.pySource of truth for version + channel arches
tools/tests/assets/build_matrix_*.jsonSnapshot fixtures (compact JSON, must match script output)
tools/tests/update_test_assets.shRegeneration script (canonical)
tools/tests/test_generate_binary_build_matrix.pyTest runner

Instructions

Step 1: Determine the new stable version

Ask the user (if not clear) what version is going live (e.g. 2.12.0). The current state usually looks like:

CURRENT_NIGHTLY_VERSION = "2.13.0"
CURRENT_CANDIDATE_VERSION = "2.12.0"   # about to become stable
CURRENT_STABLE_VERSION   = "2.11.0"    # being replaced

So a "2.12 go live" advances CURRENT_STABLE_VERSION to match CURRENT_CANDIDATE_VERSION. Do NOT touch CURRENT_NIGHTLY_VERSION or CURRENT_CANDIDATE_VERSION in this PR — those are advanced by separate PRs (e.g. Update nightly version to X.Y.Z, [Release X.Y] advance candidate version).

Step 2: Advance CURRENT_STABLE_VERSION

In tools/scripts/generate_binary_build_matrix.py, change the single line:

CURRENT_STABLE_VERSION = "<old>"

to the new stable version.

Step 3: Promote release-channel arches to match test

Compare the three channels in each arches dict:

CUDA_ARCHES_DICT = {
    "nightly": [...],
    "test":    [...],
    "release": [...],   # promote this to match "test"
}

ROCM_ARCHES_DICT = {
    "nightly": [...],
    "test":    [...],
    "release": [...],   # promote this to match "test"
}

If release differs from test, update release to match test. This is the actual "what CUDA/ROCm versions ship with this release" decision — the candidate-channel arches that survived the release cycle become the official release arches.

Also check STABLE_CUDA_VERSIONS — usually already aligned across channels, but verify all three entries point at the same default for the new release.

Step 4: Regenerate test fixtures (MUST use the shell script)

The fixtures are compact (single-line) JSON. The script tools/tests/update_test_assets.sh is the canonical regenerator. Do NOT use python3 -m tools.tests.test_generate_binary_build_matrix --update-reference-files — that pretty-prints with indent=2 and produces a massive churn diff that does not match the file format on main.

Run from the repo root (note the script uses relative paths so cd matters):

cd tools/tests
python3 ../scripts/generate_binary_build_matrix.py --build-python-only disable --with-xpu disable > assets/build_matrix_linux_wheel_cuda.json
python3 ../scripts/generate_binary_build_matrix.py --build-python-only disable --with-rocm disable --with-xpu disable > assets/build_matrix_linux_wheel_cuda_norocm.json
python3 ../scripts/generate_binary_build_matrix.py --build-python-only disable --with-cpu disable --with-xpu disable > assets/build_matrix_linux_wheel_nocpu.json
python3 ../scripts/generate_binary_build_matrix.py --build-python-only disable --with-cpu disable --with-rocm disable --with-xpu enable > assets/build_matrix_linux_wheel_xpu.json
python3 ../scripts/generate_binary_build_matrix.py --build-python-only disable --operating-system="macos" --with-cuda disable --with-rocm disable > assets/build_matrix_macos_wheel.json
python3 ../scripts/generate_binary_build_matrix.py --build-python-only disable --operating-system="windows" > assets/build_matrix_windows_wheel_cuda.json
python3 ../scripts/generate_binary_build_matrix.py --build-python-only disable --with-rocm disable --with-cuda disable --operating-system="windows" > assets/build_matrix_windows_wheel_xpu.json

Skip the conda lines from update_test_assets.sh — --package-type conda is broken on main (noted in PR #8065) and the conda fixtures are no longer maintained.

Step 5: Run tests

python3 -m tools.tests.test_generate_binary_build_matrix

Expected: Ran 7 tests in <time>s OK.

Step 6: Verify the diff is minimal

git diff --stat should show roughly:

  • tools/scripts/generate_binary_build_matrix.py: ~4 lines (stable version + release arches list)
  • 7 fixture JSON files: 1 line each (single-line files, change is in-place)

Sanity check: the only diff in fixtures should be "stable_version": "<old>" → "stable_version": "<new>". If a fixture has multi-line / pretty-printed diff, you used the wrong regenerator — revert with git checkout upstream/main -- tools/tests/assets/ and re-run Step 4.

If the CUDA release arches changed, expect new entries in fixtures (e.g. new cu132 rows when adding 13.2 to release).

Step 7: Commit and PR

Suggested commit/PR title pattern (matches history):

Release X.Y go live. Update release matrix

PR body should call out:

  • Advance CURRENT_STABLE_VERSION from <old> to <new>
  • (If applicable) Advance CUDA_ARCHES_DICT["release"] / ROCM_ARCHES_DICT["release"]
  • Regenerate test fixtures via tools/tests/update_test_assets.sh

Common pitfalls

  • Don't pretty-print fixtures. The --update-reference-files test flag writes indent=2. The fixtures on main are single-line. Always use the shell script approach.
  • Don't touch nightly/candidate versions. Those are advanced by separate PRs in the release cycle.
  • upstream is pytorch/test-infra. Branch from upstream/main, push to origin (your fork), open the PR against pytorch/test-infra:main.
  • Stash unrelated WIP. generate_binary_build_matrix.py changes should go in a clean branch off upstream/main — don't pile them onto an unrelated feature branch.

Skills เพิ่มเติมจาก pytorch

zephyr
pytorch
สร้างและกำหนดค่า ExecuTorch เป็นโมดูล Zephyr RTOS สำหรับบอร์ดฝังตัว ใช้เมื่อตั้งค่าเวิร์กสเปซ Zephyr กับ ET เพิ่มการรองรับบอร์ด (overlays,…
aoti-debug
pytorch
ดีบักข้อผิดพลาดและการขัดข้องของ AOTInductor (AOTI) ใช้เมื่อพบ AOTI segfaults, ข้อผิดพลาด device mismatch, ความล้มเหลวในการโหลดค่าคงที่ หรือข้อผิดพลาดรันไทม์จาก…
skill-writer
pytorch
คู่มือสำหรับสร้าง Agent Skills ที่มีโครงสร้างดีสำหรับ Claude Code พร้อมแนวทางปฏิบัติที่ดีที่สุดและการตรวจสอบความถูกต้อง ครอบคลุมวงจรชีวิตของ Skill แบบเต็ม: การกำหนดขอบเขต โครงสร้างไฟล์ การตรวจสอบ YAML frontmatter การจัดระเบียบเนื้อหา และขั้นตอนการทดสอบ บังคับใช้กฎการตั้งชื่อที่เข้มงวด (ตัวพิมพ์เล็ก ยัติภังค์ สูงสุด 64 ตัวอักษร) และข้อกำหนดคำอธิบาย (ทริกเกอร์เฉพาะ ประเภทไฟล์ เงื่อนไข "อะไร" และ "เมื่อใด") มีเทมเพลตสำหรับรูปแบบทั่วไป รวมถึง Skill แบบอ่านอย่างเดียว Skill ที่ใช้สคริปต์ และ Skill แบบหลายไฟล์พร้อม...
triaging-issues
pytorch
จัดลำดับความสำคัญของปัญหา GitHub โดยการส่งต่อไปยังทีมที่รับผิดชอบในขณะนั้น ติดป้ายกำกับ และปิดคำถาม ใช้เมื่อดำเนินการกับปัญหา PyTorch ใหม่ หรือเมื่อถูกขอให้จัดลำดับความสำคัญของ...
wheel-size-analyzer
pytorch
วิเคราะห์ขนาดของ PyTorch nightly wheel ในช่วงวันที่กำหนดโดยใช้ GitHub Actions artifacts API ใช้เมื่อติดตามการเปลี่ยนแปลงขนาดไบนารี ระบุขนาด wheel…
pr-review
pytorch
ตรวจสอบ pull requests ของ PyTorch ในด้านคุณภาพโค้ด ความครอบคลุมของการทดสอบ ความปลอดภัย และความเข้ากันได้ย้อนหลัง ใช้เมื่อตรวจสอบ PR หรือเมื่อถูกขอให้ตรวจสอบการเปลี่ยนแปลงโค้ด…
qualcomm
pytorch
สร้าง ทดสอบ หรือพัฒนาแบ็กเอนด์ QNN (Qualcomm AI Engine Direct) ใช้เมื่อทำงานกับ backends/qualcomm/, สร้าง QNN (ใช้…
setup
pytorch
ตั้งค่าสภาพแวดล้อมการพัฒนา ExecuTorch ใช้เมื่อติดตั้ง dependencies, ตั้งค่า conda environments, หรือเตรียมพัฒนาโดยใช้ ExecuTorch