From d079e0d48fc633b72d6e4110a1a677e72233077d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gin=C3=A9s=20Hidalgo?= Date: Wed, 27 Oct 2021 00:31:45 -0400 Subject: [PATCH] Fixed Clang (on Windows) compiler error with `#pragma`'s (#9484) --- .../core/providers/dml/OperatorAuthorHelper/OperatorHelper.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/onnxruntime/core/providers/dml/OperatorAuthorHelper/OperatorHelper.h b/onnxruntime/core/providers/dml/OperatorAuthorHelper/OperatorHelper.h index e9965fb3db..97a593073c 100644 --- a/onnxruntime/core/providers/dml/OperatorAuthorHelper/OperatorHelper.h +++ b/onnxruntime/core/providers/dml/OperatorAuthorHelper/OperatorHelper.h @@ -20,7 +20,9 @@ std::vector BroadcastTensorShape( // e.g. input values = {2,1,3,1,1,5} // value = 1 // output indices = {1,3,4} +#ifndef __clang__ #pragma optimize("", off) +#endif template void FindValueIndices(gsl::span values, T value, /*out*/ std::vector& indices) { indices.clear(); @@ -32,7 +34,9 @@ void FindValueIndices(gsl::span values, T value, /*out*/ std::vector