← Back to Pull requests

[pytorch] Pin cmake<4.5 for Windows PyTorch wheel builds #10439

Closed
unknown closed this pull request without merging on Dec 02, 2026 22:14 UTC
View on GitHub
unknown unknown commented on Dec 02, 2026 17:55 UTC
Author

Motivation

  • Workaround for https://github.com/ROCm/TheRock/issues/10421
  • Windows PyTorch wheel builds against torch nightly fail at configure since 12-02 (rockrel run 46797940847, all Python versions). PyTorch main's requirements-build.txt has an unpinned cmake>=3.27, which now resolves to 4.5.1:

    CMake Error at .../cmake-4.5/Modules/Platform/Windows-Clang.cmake:194 (message):
      The current configuration uses the Clang compiler tool with mixed frontend
      variants, both the GNU and in MSVC CL like variants.  This is not supported.
    Call Stack: cmake/public/LoadHIP.cmake:145 (enable_language)
    

    Technical Details

    C/C++ use clang-cl, while HIP uses GNU-style clang. CMake 4.4 already documented this mix as unsupported, but only checked it when the first language was enabled. CMake 4.5 checks it again on every later enable_language(), so LoadHIP.cmake now fails.

    This PR adds cmake<4.5 to the existing Windows-only ninja>=1.13.2 override in build_prod_wheels.py. That step runs after the PyTorch requirements install, so it downgrades cmake for torch nightly and leaves release-branch pins alone. Linux is unaffected.

    Test Plan

  • Windows wheel build, torch nightly, ROCm 10.3.0a20261202, gfx1151, py3.13, tests off: https://github.com/ROCm/TheRock/actions/runs/46934928846

  • Linux wheel build (expected no-op), same inputs, gfx94X-dcgpu: https://github.com/ROCm/TheRock/actions/runs/46934930714

  • pre-commit run on the changed file.
  • Test Result

    pre-commit passes. Windows: pip downgraded cmake 4.5.1 to 4.4.5 before the build, configure passed, and the torch nightly wheel built. Linux built as before.

    Submission Checklist

  • Look over the contributing guidelines at https://github.com/ROCm/TheRock/blob/main/CONTRIBUTING.md.
  • _Drafted with an AI coding assistant and reviewed by the author._

    Diff: 244 lines (+183 / -61) across 3 files Reviewer: ScottTodd Review duration: 258m
    All Vouch review confidence checks passed
    Residual risk 0.15 = Change Risk (0.39) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 244 lines diff across 3 files
    0.39
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.329
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #10439"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 38.8% (MEDIUM) · Higher = larger blast radius
    38.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.3% · Safe to merge
    15.3%
    Repository