Repository navigation
[AUTOGENERATED] [release/1.15.0] Let PyTorch choose the C++ standard when building ops - #343
Merged
rocm-repo-management-api-6[bot] merged 1 commit intoOct 19, 2026
Conversation
torch.utils.cpp_extension compiles extensions with -std=c++20 since PyTorch 2.12, but the op builder appended -std=c++17 to the host C++ flags and to the ROCm hipcc flags. The later flag wins, so every op was compiled as C++17. PyTorch 2.14 headers require C++20 (ATen.h raises "C++20 or later compatible compiler is required", and c10 uses std::strong_ordering and requires-clauses), so every op fails to build, both when JIT-built on first use and when prebuilt with APEX_BUILD_*=1. Remove every hard-coded -std flag from the op builder: from cxx_args(), from the ROCm branch of nvcc_args(), and the CUDA-version-based selection in the CUDA branch. torch.utils.cpp_extension adds the standard that matches the installed PyTorch headers whenever no -std flag is passed, on both the JIT and setup.py paths. This follows NVIDIA#2006, which made the same change upstream. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
rocm-repo-management-api-6
Bot
deleted the
autogenerated/release/1.15.0_cherry-pick_pr-341
branch
October 19, 2026 19:17
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Cherry-pick of #341