-
Notifications
You must be signed in to change notification settings - Fork 3k
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
base: main
Are you sure you want to change the base?
Enabling c++20 on linux #17816
Changes from all commits
81fbc65
c72c40e
512cd4d
e9fd1ef
a3a69d0
2e795b4
1a7efec
c46ab4a
11f8d5b
107788f
7646254
661a465
450d994
168beb8
3736658
89d8e59
2d6abd5
c66de02
31cb371
d3a385a
41c821e
cc3f411
84122a5
5244cc4
0e10f73
c669ead
55edc2d
33d08f3
2452708
0a2d22b
c5a3e64
6c105be
f356538
6177120
254c8c1
7386423
9750089
42ee12f
d837bfa
a6b56f3
78c7b4a
4f2ebed
7de09f7
524decf
0fe8720
6eb70d5
fa8a8cc
1471383
fb7ee24
fc63b36
3c31842
9e30f73
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,7 +87,18 @@ Status EmbedLayerNorm<T>::Compute(OpKernelContext* context) const { | |
|
||
int n = batch_size * sequence_length; | ||
concurrency::ThreadPool::TryBatchParallelFor( | ||
#if __cplusplus >= 202002L | ||
context->GetOperatorThreadPool(), n, [=, this, &failed](ptrdiff_t index) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see this core guideline: I think they have a point. at least, we should consider how to make the code easier to understand. |
||
#else | ||
#ifdef __GNUC__ | ||
#pragma GCC diagnostic push | ||
#pragma GCC diagnostic ignored "-Wdeprecated" | ||
#endif | ||
context->GetOperatorThreadPool(), n, [=, &failed](ptrdiff_t index) { | ||
#ifdef __GNUC__ | ||
#pragma GCC diagnostic pop | ||
#endif | ||
#endif | ||
int word_col_index = input_ids_data[index]; | ||
if (word_col_index < 0 || word_col_index >= word_embedding_length) { | ||
failed.store(true, std::memory_order_release); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can be fixed - see this patch: e34c91c