-
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
Suppress some warnings in WebGPU EP generated by GCC 13 #23445
base: main
Are you sure you want to change the base?
Conversation
It would be helpful for future tracking if we can split the changes in this PR into:
Some issues related to strict aliasing may be fixed by using |
The changes in this PR are not in main yet. |
#pragma GCC diagnostic ignored "-Wstrict-aliasing" | ||
#endif | ||
|
||
#include <webgpu/webgpu_cpp.h> |
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.
This change is for suppressing strict-aliasing warnings from the 3rd-party webgpu source code, not ours.
|
||
#if defined(__GNUC__) | ||
#pragma GCC diagnostic push | ||
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
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.
do we no longer need to use macro HAS_* like this
onnxruntime/cmake/CMakeLists.txt
Line 750 in 655a23f
check_cxx_compiler_flag(-Wdeprecated-anon-enum-enum-conversion HAS_DEPRECATED_ANON_ENUM_ENUM_CONVERSION) |
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.
We only support GCC 11 and above. "--strict-aliasing" is available in these GCC versions.
Suppress some warnings generated by GCC 13 by introducing a wrapper for WebGPU header files.