You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ci(pt): use PyTorch 2.13 for Python 3.11+ CPU tests - #6123
The merge queue for #5802 failed in Python 3.13's CPU DPA4C automatic-freeze test when AOTInductor emitted references to undeclared int_array_N variables. The original job is 124523329062.
The first revision of this PR selected PyTorch 2.15, but actual C++ and wheel jobs exposed an unsatisfiable dependency combination: the required vesin-torch==0.6.2 declares torch<2.15. That revision is replaced here.
Built the actual PT native extensions and verified custom-op loading.
Installed .[torch] with the CPU pin group through the normal resolver; the test-plus-Torch dependency dry run resolved 102 packages.
Ran the exact failed case, source/tests/pt_expt/test_calculator.py::test_automatic_freeze_single_artifact_matches_eager[cpu-dpa4c], twice in separate processes with separate fresh Inductor caches: 1 passed in 44.82 s, then 1 passed in 21.86 s, with no skips. Both runs compiled and loaded the AOTI artifact and compared energy, force and stress.
Checked 15 Python/platform marker combinations.
Full Ruff 0.16 lint/format and whitespace checks passed.
The complete platform CI on this pushed head is still required before merge.
Agent: ChatGPT
Model: GPT-6 Astra Pro
Windows compiler follow-up
The first 2.13 CI run exposed MSVC errors in Torch headers: designated initializers and bit-field defaults require C++20. Commit cd035fc extends the existing standard selector to MSVC with Torch >=2.13, retaining the existing >=2.14 rule for other compilers and preserving higher user-selected standards.
Twelve exact-production CMake selector cases pass. The installed Torch 2.13 headers reproduce the relevant strict-C++17 failures and compile with C++20; cmake-format 0.6.13 and whitespace checks pass. Actual Windows execution of this new revision awaits hosted CI. The twice-passing Python 3.13 CPU AOTI regression recorded above remains the runtime evidence for selecting the compatible 2.13 pin.
Agent: ChatGPT
Model: GPT-6 Astra Pro
Summary by CodeRabbit
Bug Fixes
Updated CPU-based PyTorch version selection: Python versions below 3.11 use PyTorch 2.11.0, while Python 3.11 and newer use PyTorch 2.13.0. These pins apply outside x86_64 macOS, where installation remains unpinned.
Compatibility
Updated build settings to use the required C++20 standard when building with MSVC and PyTorch 2.13.x.
Keep the PyTorch 2.11 pin for Python 3.10 and preserve the macOS
Intel fallback and GPU test pin. This exercises upstream AOTInductor
int_array codegen fixes without dropping Python 3.10 coverage.
Agent: ChatGPT
Model: GPT-6
Run CodeRabbit Verify to test the changes in this pull request.
Recent review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: f9160788-554e-48e5-a33a-01936f6bce27
Commits
Reviewing files that changed from the base of the PR and between 8cfe231 and cd035fc.
Files selected for processing: 1
source/CMakeLists.txt
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 0 remain after this review.
Use the supported 2.13 release with the upstream bound-method int_array
cache fix while retaining vesin-torch's torch<2.15 compatibility.
Preserve the Python 3.10 pin and macOS Intel fallback.
Validation: real PT native build on Python 3.13.17, normal dependency
resolution, 15 marker combinations and the original CPU DPA4C automatic
freeze regression twice in independent processes with fresh Inductor caches.
Both runs passed without skips. Full Ruff 0.16 and whitespace checks pass.
Agent: ChatGPT
Model: GPT-6 Astra Pro
njzjz-bot
changed the title
ci(pt): use PyTorch 2.15 for Python 3.11+ CPU tests
ci(pt): use PyTorch 2.13 for Python 3.11+ CPU tests
Nov 3, 2026
The reason will be displayed to describe this comment to others. Learn more.
Additional comments: 1
pyproject.toml-195-195: 1
195-195: Minor · Potential issue · Quick win
Unverified finding
We couldn't verify this from the code. It is shown for review, not as a verified issue.
The new Python 3.11+ CPU requirement pins torch to 2.13.0, whereas the PR objective identifies 2.15.0 as containing both upstream fixes for the reported AOTInductor failure. Torch 2.13.0 may lack the second fix and leave that failure unresolved.
The generated wrapper may again reference undeclared int_array variables, causing compilation and the merge-queue test to fail.
This can occur when: The Python 3.13 CPU DPA4C automatic-freeze test generates an AOTInductor C++ wrapper through the newly selected torch 2.13.0 installation.
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 6fae7319-8d25-42d6-8008-0ed515f60427
Commits
Reviewing files that changed from the base of the PR and between c12bef5 and 8cfe231.
Files selected for processing: 1
pyproject.toml
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 2 remain after this review.
Torch 2.13 headers already use designated initializers and bit-field defaults that MSVC rejects under C++17. Raise the standard for this compiler/version combination while preserving existing non-MSVC selection and higher explicit standards.
Agent: ChatGPT
Model: GPT-6 Astra Pro
The reason will be displayed to describe this comment to others. Learn more.
Rechecked the compatible CPU pin against the original AOTI regression and addressed the Windows compiler error exposed by the first hosted run. Current hosted checks must still complete.
The reason will be displayed to describe this comment to others. Learn more.
New qualification blocker on cd035fc: the unsanitized CPU TensorFlow+PyTorch C++ job crashes while generating the DPA2 inference fixtures, before it reaches ctest or the LAMMPS tests.
Job 126146911281 installs torch==2.13.0+cpu on Python 3.11, completes the native build/install, then reports:
source/install/test_cc_local.sh: line 88: 5541 Segmentation fault ... python .../gen_dpa2.py
The process exits with code 139. This is not the earlier MSVC header failure, and _GEN_ENV is empty, so it is not the known LeakSanitizer-only path. The successful LSAN job explicitly skips the DPA2 graph section, so its success does not qualify that section.
For comparison, the contemporaneous regular CPU job for #5612 uses torch==2.11.0+cpu and passes with the identical gen_dpa2.py blob (be160f52fd614b6e6fab3f4dc212e48357143d8a). This is comparison evidence, not an isolated proof that the new pin caused the crash; the failure log has no native backtrace. Please reproduce/triage the unsanitized DPA2 path and obtain a passing regular C++/LAMMPS qualification before accepting the CPU pin change. The focused DPA4C freeze result does not cover this failure.
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.45%. Comparing base (a14c52b) to head (cd035fc). ⚠️ Report is 1 commits behind head on master.
❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The merge queue for #5802 failed in Python 3.13's CPU DPA4C automatic-freeze test when AOTInductor emitted references to undeclared
int_array_Nvariables. The original job is 124523329062.The first revision of this PR selected PyTorch 2.15, but actual C++ and wheel jobs exposed an unsatisfiable dependency combination: the required
vesin-torch==0.6.2declarestorch<2.15. That revision is replaced here.Changes
torch==2.13.0for Python 3.11+ CPU tests. Its release source contains the bound-writer cache-key fix discussed in [Inductor] Fix undefined identifier error in CppWrapper due to false … pytorch/pytorch#178147.torch==2.11.0for Python 3.10 and the existing macOS Intel fallback. The GPU group, compile allowlist and regression tests are unchanged.Validation
Using Python 3.13.17 and
torch==2.13.0+cpu:.[torch]with the CPU pin group through the normal resolver; the test-plus-Torch dependency dry run resolved 102 packages.source/tests/pt_expt/test_calculator.py::test_automatic_freeze_single_artifact_matches_eager[cpu-dpa4c], twice in separate processes with separate fresh Inductor caches: 1 passed in 44.82 s, then 1 passed in 21.86 s, with no skips. Both runs compiled and loaded the AOTI artifact and compared energy, force and stress.The complete platform CI on this pushed head is still required before merge.
Agent: ChatGPT
Model: GPT-6 Astra Pro
Windows compiler follow-up
The first 2.13 CI run exposed MSVC errors in Torch headers: designated initializers and bit-field defaults require C++20. Commit cd035fc extends the existing standard selector to MSVC with Torch >=2.13, retaining the existing >=2.14 rule for other compilers and preserving higher user-selected standards.
Twelve exact-production CMake selector cases pass. The installed Torch 2.13 headers reproduce the relevant strict-C++17 failures and compile with C++20; cmake-format 0.6.13 and whitespace checks pass. Actual Windows execution of this new revision awaits hosted CI. The twice-passing Python 3.13 CPU AOTI regression recorded above remains the runtime evidence for selecting the compatible 2.13 pin.
Agent: ChatGPT
Model: GPT-6 Astra Pro
Summary by CodeRabbit