Skip to content

Defaults to C++20 for torch targets #143959

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

cyyever
Copy link
Collaborator

@cyyever cyyever commented Dec 29, 2024

With our shift to CUDA 12, which supports C++20 in principle, this PR is an initial attempt to show that PT can build with C++20 with minimum changes.

cc @ezyang @gchanan @jbschlosser @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @jerryzh168 @EikanWang

Copy link

pytorch-bot bot commented Dec 29, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/143959

Note: Links to docs will display an error until the docs builds have been completed.

❌ 7 New Failures, 4 Unrelated Failures

As of commit db21f78 with merge base 5dddcd5 (image):

NEW FAILURES - The following jobs have failed:

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

BROKEN TRUNK - The following jobs failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@cyyever cyyever marked this pull request as draft December 29, 2024 16:36
@pytorch-bot pytorch-bot bot added the module: cpu CPU specific problem (e.g., perf, algorithm) label Dec 30, 2024
@cyyever cyyever force-pushed the cxx20 branch 4 times, most recently from 2067e96 to 67159ad Compare December 30, 2024 03:21
@cyyever cyyever changed the title Defaults to C++20 in CPU builds Defaults to C++20 in CMake CPU targets Dec 30, 2024
@cyyever cyyever added release notes: build release notes category topic: build module: cpp Related to C++ API and removed module: cpu CPU specific problem (e.g., perf, algorithm) labels Dec 30, 2024
@cyyever
Copy link
Collaborator Author

cyyever commented Dec 30, 2024

@pytorchbot label "topic: not user facing"

@pytorch-bot pytorch-bot bot added the topic: not user facing topic category label Dec 30, 2024
@cyyever cyyever added ciflow/s390 s390x-related CI jobs ciflow/periodic Trigger jobs ran periodically on master (periodic.yml) on the PR labels Dec 30, 2024
@pytorch-bot pytorch-bot bot added the module: cpu CPU specific problem (e.g., perf, algorithm) label Dec 30, 2024
@cyyever cyyever changed the title Defaults to C++20 in CMake CPU targets Defaults to C++20 in CMake torch targets Dec 30, 2024
@cyyever cyyever force-pushed the cxx20 branch 4 times, most recently from 3c27707 to ac7553e Compare December 30, 2024 08:40
@pytorch-bot pytorch-bot bot added the NNC label Jan 29, 2025
@cyyever cyyever force-pushed the cxx20 branch 3 times, most recently from 9218259 to c32f4a4 Compare January 31, 2025 07:05
@cyyever cyyever force-pushed the cxx20 branch 2 times, most recently from 65b4f68 to 8804956 Compare July 16, 2025 09:36
@cyyever
Copy link
Collaborator Author

cyyever commented Jul 18, 2025

@pytorchbot rebase -b main

@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/main. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Successfully rebased cxx20 onto refs/remotes/origin/main, please pull locally before adding more changes (for example, via git checkout cxx20 && git pull --rebase)

@cyyever cyyever changed the title Defaults to C++20 in CMake torch targets Defaults to C++20 for torch targets Jul 18, 2025
@cyyever cyyever force-pushed the cxx20 branch 2 times, most recently from 888eaac to a5ea1f3 Compare July 18, 2025 01:58
@cyyever cyyever marked this pull request as ready for review July 18, 2025 02:12
@cyyever cyyever marked this pull request as draft July 18, 2025 03:49
@cyyever cyyever force-pushed the cxx20 branch 2 times, most recently from 809a7d3 to 5c049ee Compare July 22, 2025 09:44
@cyyever
Copy link
Collaborator Author

cyyever commented Jul 24, 2025

@pytorchbot rebase -b main

@cyyever cyyever marked this pull request as ready for review July 24, 2025 15:39
@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/main. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Successfully rebased cxx20 onto refs/remotes/origin/main, please pull locally before adding more changes (for example, via git checkout cxx20 && git pull --rebase)

@cyyever
Copy link
Collaborator Author

cyyever commented Jul 27, 2025

@pytorchbot rebase -b main

@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/main. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Successfully rebased cxx20 onto refs/remotes/origin/main, please pull locally before adding more changes (for example, via git checkout cxx20 && git pull --rebase)

@cyyever cyyever requested a review from malfet July 28, 2025 08:17
@HDCharles HDCharles added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Jul 28, 2025
@cyyever
Copy link
Collaborator Author

cyyever commented Aug 10, 2025

@pytorchbot rebase -b main

@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/main. Check the current status here

Signed-off-by: cyy <cyyever@outlook.com>
@pytorchmergebot
Copy link
Collaborator

Successfully rebased cxx20 onto refs/remotes/origin/main, please pull locally before adding more changes (for example, via git checkout cxx20 && git pull --rebase)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/binaries_libtorch Trigger binary build and upload jobs for libtorch on the PR ciflow/binaries_wheel Trigger binary build and upload jobs for wheel on the PR ciflow/binaries Trigger all binary build and upload jobs on the PR ciflow/periodic Trigger jobs ran periodically on master (periodic.yml) on the PR ciflow/s390 s390x-related CI jobs module: bc-breaking Related to a BC-breaking change module: cpp Related to C++ API module: cpu CPU specific problem (e.g., perf, algorithm) NNC open source release notes: build release notes category topic: bc breaking topic category topic: build triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants