diff --git a/onnxruntime/core/providers/cpu/tensor/onehot.cc b/onnxruntime/core/providers/cpu/tensor/onehot.cc index 806b0c8485..16e213b2a1 100644 --- a/onnxruntime/core/providers/cpu/tensor/onehot.cc +++ b/onnxruntime/core/providers/cpu/tensor/onehot.cc @@ -15,18 +15,7 @@ limitations under the License. /* Modifications Copyright (c) Microsoft. */ #include "core/providers/cpu/tensor/onehot.h" - -// build\windows\debug\external\eigen3\unsupported\eigen\cxx11\src/Tensor/Tensor.h(76): -// warning C4554: '&': check operator precedence for possible error; use parentheses to clarify precedence -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4554) -#endif #include "core/util/eigen_common_wrapper.h" -#ifdef _MSC_VER -#pragma warning(pop) -#endif - #include "core/platform/env.h" #define EIGEN_USE_THREADS @@ -56,8 +45,8 @@ REG_ONE_HOT_OP(int64_t, int64_t, int64_t); REG_ONE_HOT_OP(float, int64_t, int64_t); REG_ONE_HOT_OP(int64_t, string, int64_t); REG_ONE_HOT_OP(float, string, int64_t); -REG_ONE_HOT_OP(float, float, float); // added this to satisfy onnx model tests -REG_ONE_HOT_OP(int64_t, int32_t, float); // added this to satisfy onnx model tests +REG_ONE_HOT_OP(float, float, float); // added this to satisfy onnx model tests +REG_ONE_HOT_OP(int64_t, int32_t, float); // added this to satisfy onnx model tests Status ValidateInputs(const Tensor* depth, const Tensor* values) { diff --git a/onnxruntime/core/util/eigen_common_wrapper.h b/onnxruntime/core/util/eigen_common_wrapper.h index 30c9feb2ff..227004e23a 100644 --- a/onnxruntime/core/util/eigen_common_wrapper.h +++ b/onnxruntime/core/util/eigen_common_wrapper.h @@ -14,10 +14,24 @@ #pragma GCC diagnostic ignored "-Wignored-attributes" #endif #pragma GCC diagnostic ignored "-Wunused-parameter" + +// build\windows\debug\external\eigen3\unsupported\eigen\cxx11\src/Tensor/Tensor.h(76): +// warning C4554: '&': check operator precedence for possible error; use parentheses to clarify precedence +// build\windows\debug\external\eigen3\unsupported\eigen\cxx11\src/Tensor/TensorStorage.h(65): +// warning C4324: structure was padded due to alignment specifier +#elif defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable : 4554) +#pragma warning(disable : 4324) + #endif #include "unsupported/Eigen/CXX11/Tensor" #if defined(__GNUC__) && __GNUC__ >= 6 #pragma GCC diagnostic pop -#endif + +#elif defined(_MSC_VER) +#pragma warning(pop) + +#endif \ No newline at end of file