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

Enabling c++20 on linux #17816

Open
wants to merge 46 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
81fbc65
Trying out c++20 on linux
jchen351 Oct 6, 2023
c72c40e
Enabling "set_property(TARGET onnxruntime_test_all APPEND_STRING PROP…
jchen351 Oct 6, 2023
512cd4d
Revert "Enabling "set_property(TARGET onnxruntime_test_all APPEND_STR…
jchen351 Oct 6, 2023
e9fd1ef
Merge branch 'main' into Cjian/linux_c++20
jchen351 Oct 13, 2023
a3a69d0
ignore "-Werror=deprecated" for Eigen CXX11 Tensor
jchen351 Oct 13, 2023
2e795b4
-Wdeprecated-declarations
jchen351 Oct 13, 2023
1a7efec
Merge branch 'refs/heads/main' into Cjian/linux_c++20
jchen351 May 24, 2024
c46ab4a
Merge remote-tracking branch 'origin/main' into Cjian/linux_c++20
snnn Jun 3, 2024
11f8d5b
Merge branch 'refs/heads/main' into Cjian/linux_c++20
jchen351 Jun 3, 2024
107788f
#pragma GCC diagnostic ignored "-Wdeprecated"
jchen351 Jun 3, 2024
7646254
#pragma GCC diagnostic ignored "-Wdeprecated"
jchen351 Jun 3, 2024
661a465
TreeAggregatorMin
jchen351 Jun 3, 2024
450d994
#pragma GCC diagnostic ignored "-Wdeprecated"
jchen351 Jun 4, 2024
168beb8
[=
jchen351 Jun 6, 2024
3736658
qembed_layer_norm.cc:97:50
jchen351 Jun 6, 2024
89d8e59
Merge branch 'refs/heads/main' into Cjian/linux_c++20
jchen351 Jun 17, 2024
2d6abd5
is_trivial
jchen351 Jun 17, 2024
c66de02
Merge branch 'refs/heads/main' into Cjian/linux_c++20
jchen351 Jun 19, 2024
31cb371
Merge remote-tracking branch 'refs/remotes/origin/main' into Cjian/li…
jchen351 Jun 20, 2024
d3a385a
Merge remote-tracking branch 'origin/main' into Cjian/linux_c++20
jchen351 Jun 20, 2024
41c821e
onnxruntime/core/session/inference_session.cc lintrunner
jchen351 Jun 20, 2024
cc3f411
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
jchen351 Jun 20, 2024
84122a5
#if __cplusplus >= 202002L
jchen351 Jun 20, 2024
5244cc4
std::function<void()> run_fn = [=, this]() {
jchen351 Jun 20, 2024
0e10f73
std::function<void()> run_fn = [this]() {
jchen351 Jun 20, 2024
c669ead
std::function<void()> run_fn = [this]() {
jchen351 Jun 20, 2024
55edc2d
Merge branch 'refs/heads/main' into Cjian/linux_c++20
jchen351 Jul 19, 2024
33d08f3
#pragma GCC diagnostic ignored "-Wdeprecated"
jchen351 Jul 19, 2024
2452708
volatile size_t volatile_x = 0;
jchen351 Jul 19, 2024
0a2d22b
implicit capture of ‘this’ via ‘[=]’ is deprecated in C++20
jchen351 Jul 19, 2024
c5a3e64
#ifdef __GNUC__
jchen351 Jul 22, 2024
6c105be
compute_info.create_state_func = [=](ComputeContext* context, Functio…
jchen351 Jul 22, 2024
f356538
Special case where c++20 is defined by was undefined again
jchen351 Jul 22, 2024
6177120
#pragma GCC diagnostic push
jchen351 Jul 22, 2024
254c8c1
#pragma GCC diagnostic push
jchen351 Jul 22, 2024
7386423
if(UNIX)
jchen351 Jul 22, 2024
9750089
if(UNIX)
jchen351 Jul 22, 2024
42ee12f
-Wdeprecated-pragma
jchen351 Jul 22, 2024
d837bfa
-Wdeprecated-pragma
jchen351 Jul 22, 2024
a6b56f3
google nsync
jchen351 Jul 23, 2024
78c7b4a
#if defined(
jchen351 Jul 23, 2024
4f2ebed
#if defined(__clang__) && __cplusplus >= 202002L
jchen351 Jul 23, 2024
7de09f7
[=, this]
jchen351 Jul 23, 2024
524decf
maxThreadsPerBlock
jchen351 Jul 23, 2024
0fe8720
#ifdef __GNUC__
jchen351 Jul 23, 2024
6eb70d5
deprecated
jchen351 Jul 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ include(FetchContent)
include(CheckFunctionExists)

# TODO: update this once all system adapt c++20
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(CMAKE_CXX_STANDARD 20)
else()
set(CMAKE_CXX_STANDARD 17)
Expand Down
11 changes: 10 additions & 1 deletion include/onnxruntime/core/common/eigen_common_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
// build/external/eigen/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h:162:71:
// error: ignoring attributes on template argument "Eigen::PacketType<const float, Eigen::DefaultDevice>::type {aka __vector(4) float}" [-Werror=ignored-attributes]
#if defined(__GNUC__)
#if __cplusplus >= 202002L
jchen351 marked this conversation as resolved.
Show resolved Hide resolved
#pragma GCC diagnostic ignored "-Wdeprecated"
#endif
#pragma GCC diagnostic push
#if __GNUC__ >= 6
#pragma GCC diagnostic ignored "-Wignored-attributes"
Expand Down Expand Up @@ -60,8 +63,14 @@
#pragma warning(disable : 4245)
#pragma warning(disable : 4127)
#endif

#if defined(__GNUC__) and __cplusplus >= 202002L
jchen351 marked this conversation as resolved.
Show resolved Hide resolved
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
#include "unsupported/Eigen/CXX11/Tensor"
#if defined(__GNUC__) and __cplusplus >= 202002L
#pragma GCC diagnostic pop
#endif

#if defined(__GNUC__)
#pragma GCC diagnostic pop
Expand Down
Loading