Commits


Changming Sun authored and GitHub committed c9614fbf904
Suppress some strict-aliasing related warnings in WebGPU EP (#23454) ### Description Suppress some strict-aliasing related warnings in WebGPU EP For example: ``` /home/chasun/src/onnxruntime/onnxruntime/core/providers/webgpu/math/unary_elementwise_ops.cc:208:30: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] 208 | float encoded_value = *reinterpret_cast<const float*>(attr); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` This PR does not really fix the problems. It just suppresses the warnings to make build pass. Some issues related to strict aliasing may be fixed by using std::bit_cast, which requires c++20 however. ### Motivation and Context Build the code on Azure Linux 3 fails. To reproduce the issue, you may get an AzureLinux3 machine and run: ``` python3 tools/ci_build/build.py --update --build --build_wheel --use_xnnpack --build_nodejs --use_webgpu --build_dir b --skip_submodule_sync --parallel --use_binskim_compliant_compile_flags --build_shared_lib --config Release ```