Skip to content
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

[CPP] Update GCC minversion check to 9 or newer #120126

Closed
wants to merge 3 commits into from

Conversation

malfet
Copy link
Contributor

@malfet malfet commented Feb 16, 2024

It's already a requirement for building PyTorch, but should be a
requirement for linking extensions with it, as that can lead to runtime
crashes, as std::optional template layout is incompatible between
gcc-9 and older compilers.

Also, update minimum supported clang version to 9.x(used to build Android), as clang-5 is clearly not C++17 compliant.

Fixes #120020

cc @jbschlosser

It's already a requirement for building PyTorch, but should be a
requirement for linking extensions with it, as that can lead to runtime
crashes, as `std::optional` template layout is incompatible between
gcc-9 and older compilers.

Also, update minimum supported clang version to 10.x, as clang-5 is
clearly not C++17 compliant

Fixes #120020
Copy link

pytorch-bot bot commented Feb 16, 2024

🔗 Helpful Links

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

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

✅ You can merge normally! (4 Unrelated Failures)

As of commit 7e45701 with merge base 637cf4a (image):

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.

@malfet malfet changed the title [CPP] Update GCC version check to 9 or newer [CPP] Update GCC minversion check to 9 or newer Feb 16, 2024
@malfet malfet requested review from albanD and a team February 16, 2024 22:47
@malfet malfet added module: cpp Related to C++ API topic: bc breaking topic category release notes: cpp release notes category labels Feb 16, 2024
@malfet
Copy link
Contributor Author

malfet commented Feb 19, 2024

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Feb 19, 2024
@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

pytorchmergebot pushed a commit to satheeshhab/pytorch_hab that referenced this pull request Feb 20, 2024
It's already a requirement for building PyTorch, but should be a
requirement for linking extensions with it, as that can lead to runtime
crashes, as `std::optional` template layout is incompatible between
gcc-9 and older compilers.

Also, update minimum supported clang version to 9.x(used to build Android), as clang-5 is clearly not C++17 compliant.

Fixes pytorch#120020

Pull Request resolved: pytorch#120126
Approved by: https://github.com/Skylion007
pytorchmergebot pushed a commit to wangjiangben-hw/pytorch that referenced this pull request Feb 22, 2024
It's already a requirement for building PyTorch, but should be a
requirement for linking extensions with it, as that can lead to runtime
crashes, as `std::optional` template layout is incompatible between
gcc-9 and older compilers.

Also, update minimum supported clang version to 9.x(used to build Android), as clang-5 is clearly not C++17 compliant.

Fixes pytorch#120020

Pull Request resolved: pytorch#120126
Approved by: https://github.com/Skylion007
@malfet malfet added this to the 2.2.2 milestone Mar 5, 2024
@atalman
Copy link
Contributor

atalman commented Mar 7, 2024

@pytorchbot cherry-pick --onto release/2.2 -c critical

pytorchbot pushed a commit that referenced this pull request Mar 7, 2024
It's already a requirement for building PyTorch, but should be a
requirement for linking extensions with it, as that can lead to runtime
crashes, as `std::optional` template layout is incompatible between
gcc-9 and older compilers.

Also, update minimum supported clang version to 9.x(used to build Android), as clang-5 is clearly not C++17 compliant.

Fixes #120020

Pull Request resolved: #120126
Approved by: https://github.com/Skylion007

(cherry picked from commit 3ad067f)
@pytorchbot
Copy link
Collaborator

Cherry picking #120126

The cherry pick PR is at #121419 and it is recommended to link a critical cherry pick PR with an issue

Details for Dev Infra team Raised by workflow job

huydhn pushed a commit that referenced this pull request Mar 13, 2024
It's already a requirement for building PyTorch, but should be a
requirement for linking extensions with it, as that can lead to runtime
crashes, as `std::optional` template layout is incompatible between
gcc-9 and older compilers.

Also, update minimum supported clang version to 9.x(used to build Android), as clang-5 is clearly not C++17 compliant.

Fixes #120020

Pull Request resolved: #120126
Approved by: https://github.com/Skylion007

(cherry picked from commit 3ad067f)

Co-authored-by: Nikita Shulga <2453524+malfet@users.noreply.github.com>
@PaliC
Copy link
Contributor

PaliC commented Mar 25, 2024

Validated we no longer support gcc < 9 for release 2.2.2

/home/ec2-user/libtorch/include/c10/util/C++17.h:13:2: error: #error "You're trying to build PyTorch with a too old version of GCC. We need GCC 9 or later."
 #error \
  ^~~~~

@github-actions github-actions bot deleted the malfet/add-gcc-9-version-checks branch April 25, 2024 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk Trigger trunk jobs on your pull request Merged module: cpp Related to C++ API release notes: cpp release notes category topic: bc breaking topic category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unknown layout while initializing tensors
6 participants