Skip to content

build: Update C++ standard from c++17 to c++20 - #8962

Merged
mc-nv merged 2 commits into
mainfrom
mchornyi/TRI-1877/TRI-1855-std-20
Sep 11, 2026
Merged

build: Update C++ standard from c++17 to c++20#8962
mc-nv merged 2 commits into
mainfrom
mchornyi/TRI-1877/TRI-1855-std-20

Conversation

@mc-nv

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

Copy link
Copy Markdown
Contributor

What does the PR do?

  • Upstream PyTorch raised ATen's minimum required C++ standard from 17 to 20 ([12/12] Enforce C++20 minimum in header guards (#178150) pytorch/pytorch#178150), breaking the pytorch_backend build.
  • Bumps this repo's C++ standard default from 17 to 20 for consistency across the Triton stack.
  • This branch is stacked on mchornyi/TRI-1855/build-against-upstream (unrelated upstream-container work, tracked separately) — PR base is set to that branch so this diff shows only the C++20 change.

Checklist

  • PR title reflects the change and is of format <commit_type>: <Title>
  • Changes are described in the pull request.
  • Related issues are referenced.
  • Populated github labels field
  • Added test plan and verified test passes.
  • Verified that the PR passes existing CI.
  • Verified copyright is correct on all changed files.
  • Added succinct git squash message before merging ref.
  • All template sections are filled out.
  • Optional: Additional screenshots for behavior/output changes with before/after.

Commit Type:

Check the conventional commit type box here and add the label to the github PR.

  • build
  • ci
  • docs
  • feat
  • fix
  • perf
  • refactor
  • revert
  • style
  • test

Related PRs:

Where should the reviewer start?

  • CMakeLists.txt

Test plan:

  • CI Pipeline ID: 67062220

Caveats:

This repo has no direct dependency on ATen/libtorch; the bump is for cross-repo C++ standard consistency, not a confirmed build break here.

Background

Part of a coordinated C++17->C++20 bump across ~18 Triton component repos (TRI-1877), triggered by upstream PyTorch's ATen.h now requiring C++20.

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

  • Resolves: TRI-1877

@mc-nv mc-nv self-assigned this Sep 9, 2026
@mc-nv mc-nv added the Build Build system or external dependencies (build: PRs) label Sep 9, 2026
This was referenced Sep 9, 2026
@mc-nv
mc-nv marked this pull request as ready for review September 10, 2026 15:27
@greptile-apps

greptile-apps Bot commented Sep 10, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

The PR appears safe to merge; the C++20 build requirement and SDK consumer checks are aligned.

Summary

  • Sets TRITON_MIN_CXX_STANDARD to 20 for server and propagated subproject builds.
  • Compiles shared and static HTTP/gRPC SDK link tests with GNU C++20.

Reviews (2) · Last reviewed commit: "fix: pass -std=gnu++20 to L0_sdk/test.sh..."

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
These QA smoke tests compile a downstream consumer app directly with
plain g++ against the packaged triton_client headers/libs, with no
-std= flag -- so they defaulted to GCC 13's gnu++17. Since the C++20
bump (TRI-1877) now builds the packaged client's grpc/protobuf/abseil
dependencies at C++20, their exported headers expect C++20 (e.g.
std::partial_ordering/strong_ordering aliases in absl/types/compare.h),
which a gnu++17 compile can't satisfy: "'partial_ordering' has not
been declared in 'std'". Pass -std=gnu++20 to match.

TRI-1877
@mc-nv
mc-nv force-pushed the mchornyi/TRI-1877/TRI-1855-std-20 branch from cc506ee to 9d854f5 Compare September 10, 2026 19:37
@mc-nv
mc-nv changed the base branch from mchornyi/TRI-1855/build-against-upstream to main September 10, 2026 19:38

@mattwittwer mattwittwer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@mc-nv
mc-nv merged commit a028e00 into main Sep 11, 2026
4 checks passed
@mc-nv
mc-nv deleted the mchornyi/TRI-1877/TRI-1855-std-20 branch September 11, 2026 03:14
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)

Development

Successfully merging this pull request may close these issues.

2 participants