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 52 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
52 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
fa8a8cc
Merge branch 'refs/heads/main' into Cjian/linux_c++20
jchen351 Aug 27, 2024
1471383
Changing ostringstream to wostringstream
jchen351 Aug 28, 2024
fb7ee24
Using wostringstream only on Windows
jchen351 Aug 30, 2024
fc63b36
change ifndef to ifdef
jchen351 Aug 30, 2024
3c31842
Merge branch 'refs/heads/main' into Cjian/linux_c++20
jchen351 Sep 10, 2024
9e30f73
Merge branch 'refs/heads/main' into Cjian/linux_c++20
jchen351 Sep 17, 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
6 changes: 5 additions & 1 deletion include/onnxruntime/core/common/eigen_common_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@
#pragma warning(disable : 4245)
#pragma warning(disable : 4127)
#endif

#if defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#pragma GCC diagnostic ignored "-Wdeprecated"
#endif
#include "unsupported/Eigen/CXX11/Tensor"

#if defined(__GNUC__)
Expand Down
10 changes: 5 additions & 5 deletions onnxruntime/core/providers/cpu/ml/tree_ensemble_aggregator.h
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,11 @@
template <typename InputType, typename ThresholdType, typename OutputType>
class TreeAggregatorMax : public TreeAggregator<InputType, ThresholdType, OutputType> {
public:
TreeAggregatorMax<InputType, ThresholdType, OutputType>(size_t n_trees,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

All other similar class like TreeAggregatorMin and TreeAggregatorSum does not include type qualifier.

const int64_t& n_targets_or_classes,
POST_EVAL_TRANSFORM post_transform,
const std::vector<ThresholdType>& base_values) : TreeAggregator<InputType, ThresholdType, OutputType>(n_trees, n_targets_or_classes,
post_transform, base_values) {}
TreeAggregatorMax(size_t n_trees,
const int64_t& n_targets_or_classes,
POST_EVAL_TRANSFORM post_transform,
const std::vector<ThresholdType>& base_values) : TreeAggregator<InputType, ThresholdType, OutputType>(n_trees, n_targets_or_classes,

Check warning on line 332 in onnxruntime/core/providers/cpu/ml/tree_ensemble_aggregator.h

View workflow job for this annotation

GitHub Actions / Lint C++

[cpplint] reported by reviewdog 🐶 Lines should be <= 120 characters long [whitespace/line_length] [2] Raw Output: onnxruntime/core/providers/cpu/ml/tree_ensemble_aggregator.h:332: Lines should be <= 120 characters long [whitespace/line_length] [2]
post_transform, base_values) {}

Check warning on line 333 in onnxruntime/core/providers/cpu/ml/tree_ensemble_aggregator.h

View workflow job for this annotation

GitHub Actions / Lint C++

[cpplint] reported by reviewdog 🐶 Lines should be <= 120 characters long [whitespace/line_length] [2] Raw Output: onnxruntime/core/providers/cpu/ml/tree_ensemble_aggregator.h:333: Lines should be <= 120 characters long [whitespace/line_length] [2]

// 1 output

Expand Down
Loading