diff --git a/onnxruntime/core/providers/webgpu/buffer_manager.h b/onnxruntime/core/providers/webgpu/buffer_manager.h index 20bee52835c02..a5bba53c6798b 100644 --- a/onnxruntime/core/providers/webgpu/buffer_manager.h +++ b/onnxruntime/core/providers/webgpu/buffer_manager.h @@ -5,7 +5,7 @@ #include -#include +#include "core/providers/webgpu/webgpu_external_header.h" #include "core/framework/execution_provider.h" diff --git a/onnxruntime/core/providers/webgpu/compute_context.h b/onnxruntime/core/providers/webgpu/compute_context.h index 680e03aef0aa3..23fa10a0d5489 100644 --- a/onnxruntime/core/providers/webgpu/compute_context.h +++ b/onnxruntime/core/providers/webgpu/compute_context.h @@ -3,7 +3,7 @@ #pragma once -#include +#include "core/providers/webgpu/webgpu_external_header.h" #include diff --git a/onnxruntime/core/providers/webgpu/program_manager.h b/onnxruntime/core/providers/webgpu/program_manager.h index 55721770014d2..feeb703b95aa2 100644 --- a/onnxruntime/core/providers/webgpu/program_manager.h +++ b/onnxruntime/core/providers/webgpu/program_manager.h @@ -6,7 +6,7 @@ #include #include -#include +#include "core/providers/webgpu/webgpu_external_header.h" #include "core/common/common.h" diff --git a/onnxruntime/core/providers/webgpu/shader_helper.h b/onnxruntime/core/providers/webgpu/shader_helper.h index dac08f3bd9368..64b4c054f93d4 100644 --- a/onnxruntime/core/providers/webgpu/shader_helper.h +++ b/onnxruntime/core/providers/webgpu/shader_helper.h @@ -5,7 +5,7 @@ #include -#include +#include "core/providers/webgpu/webgpu_external_header.h" #include "core/framework/tensor_shape.h" diff --git a/onnxruntime/core/providers/webgpu/webgpu_context.h b/onnxruntime/core/providers/webgpu/webgpu_context.h index 80c8c64ce72b6..1a752a93a7116 100644 --- a/onnxruntime/core/providers/webgpu/webgpu_context.h +++ b/onnxruntime/core/providers/webgpu/webgpu_context.h @@ -6,7 +6,7 @@ #include #include -#include +#include "core/providers/webgpu/webgpu_external_header.h" #include "core/common/common.h" #include "core/framework/library_handles.h" diff --git a/onnxruntime/core/providers/webgpu/webgpu_external_header.h b/onnxruntime/core/providers/webgpu/webgpu_external_header.h new file mode 100644 index 0000000000000..485fa729f1d9f --- /dev/null +++ b/onnxruntime/core/providers/webgpu/webgpu_external_header.h @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#pragma once + +#if defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif + +#include + +#if defined(__GNUC__) +#pragma GCC diagnostic pop +#endif