Skip to content

build: Update C++ standard from c++17 to c++20 (#24) - #25

Merged
mc-nv merged 1 commit into
r26.09from
mchornyi/TRI-1877/cherry-pick-r26.09-std-20
Sep 11, 2026
Merged

mc-nv merged 1 commit into
r26.09from
mchornyi/TRI-1877/cherry-pick-r26.09-std-20

Conversation

@mc-nv

@mc-nv mc-nv commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Cherry-pick of the C++17->C++20 standard bump (TRI-1877) onto r26.09.

Upstream PyTorch raised ATen's minimum required C++ standard from 17
to 20 (pytorch/pytorch#178150), which broke the pytorch_backend build.
Align this repo's TRITON_MIN_CXX_STANDARD/CMAKE_CXX_STANDARD default
with that floor for consistency across the stack.

TRI-1877

(cherry picked from commit 094675c)

Upstream PyTorch raised ATen's minimum required C++ standard from 17
to 20 (pytorch/pytorch#178150), which broke the pytorch_backend build.
Align this repo's TRITON_MIN_CXX_STANDARD/CMAKE_CXX_STANDARD default
with that floor for consistency across the stack.

TRI-1877

(cherry picked from commit 094675c)
@mc-nv mc-nv added cherry-pick Cherry-picked from another branch build Build system or external dependencies (build: PRs) labels Sep 11, 2026
@greptile-apps

greptile-apps Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

The PR should not merge until existing configured build trees are prevented from silently retaining the obsolete C++17 setting.

Findings

  1. P1 Cached C++17 Remains Active ▶

Summary

  • Aligns compilation with dependencies that now require C++20.
  • Existing CMake build trees can retain the previous cached C++17 value, leaving the intended floor unenforced.

Reviews (1) · Last reviewed commit: "build: Update C++ standard from c++17 to..."

Comment thread CMakeLists.txt
# Use C++17 standard as Triton's minimum required.
set(TRITON_MIN_CXX_STANDARD 17 CACHE STRING "The minimum C++ standard which features are requested to build this target.")
# Use C++20 standard as Triton's minimum required.
set(TRITON_MIN_CXX_STANDARD 20 CACHE STRING "The minimum C++ standard which features are requested to build this target.")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Cached C++17 Remains Active

When an existing build tree is reconfigured after this update, CMake preserves its cached TRITON_MIN_CXX_STANDARD=17 because this assignment only changes the default. The target then continues requesting cxx_std_17, so builds that include C++20-only dependency headers can still fail despite this standard bump. Please reject values below 20 or migrate the stale cached default.

@mc-nv
mc-nv requested review from whoisj and yinggeh September 11, 2026 03:38
@mc-nv mc-nv self-assigned this Sep 11, 2026
@mc-nv
mc-nv merged commit 998a4b5 into r26.09 Sep 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Build system or external dependencies (build: PRs) cherry-pick Cherry-picked from another branch

Development

Successfully merging this pull request may close these issues.

2 participants