Skip to content

[MPS] Update C++ Standard in CPUAdamBuilder - #8466

Merged
tohtana merged 2 commits into
deepspeedai:masterfrom
jinyouzhi:mps_cpp20
Sep 10, 2026
Merged

tohtana merged 2 commits into
deepspeedai:masterfrom
jinyouzhi:mps_cpp20

Conversation

@jinyouzhi

@jinyouzhi jinyouzhi commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Fix #8267 CI failure in MPS CPU, which block the pr ci.

Changes

This pull request updates the cxx_args method in op_builder/mps/cpu_adam.py to improve compatibility with newer versions of PyTorch. The main change is to select the appropriate C++ standard based on the detected PyTorch version.

Build compatibility improvement:

  • op_builder/mps/cpu_adam.py: The C++ standard used in compilation is now set to -std=c++20 for PyTorch versions 2.12 and above, and remains -std=c++17 for earlier versions. This ensures compatibility with recent PyTorch releases.

…wer PyTorch versions

Signed-off-by: iLeGend <824040212@qq.com>
@jinyouzhi
jinyouzhi marked this pull request as ready for review September 10, 2026 07:32
@jinyouzhi
jinyouzhi requested a review from loadams as a code owner September 10, 2026 07:32
@jinyouzhi
jinyouzhi requested a review from tjruwase as a code owner September 10, 2026 07:32

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8008451b59

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread op_builder/mps/cpu_adam.py

@tohtana tohtana left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @jinyouzhi! This PR is very important to unblock the CI issue.

@tohtana
tohtana enabled auto-merge September 10, 2026 08:06
@jinyouzhi

Copy link
Copy Markdown
Contributor Author

Thank you @jinyouzhi! This PR is very important to unblock the CI issue.

Thank you for your reviewing.

@tohtana
tohtana added this pull request to the merge queue Sep 10, 2026
Merged via the queue into deepspeedai:master with commit bb7ad0d Sep 10, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants