Skip to content

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

Draft
jinyouzhi wants to merge 1 commit into
deepspeedai:masterfrom
jinyouzhi:mps_cpp20
Draft

[MPS] Update C++ Standard in CPUAdamBuilder #8466
jinyouzhi wants to merge 1 commit into
deepspeedai:masterfrom
jinyouzhi:mps_cpp20

Conversation

@jinyouzhi

Copy link
Copy Markdown
Contributor

Motivation

Fix #8267 CI failure in MPS CPU

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>
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.

1 participant