diff --git a/onnxruntime/core/util/qmath.h b/onnxruntime/core/util/qmath.h index 3cec9047f3..f6ce7bcaa2 100644 --- a/onnxruntime/core/util/qmath.h +++ b/onnxruntime/core/util/qmath.h @@ -1,5 +1,14 @@ #pragma once -//#define USE_GEMMLOWP + +// default to gemmlowp when building for arm devices +#ifndef USE_GEMMLOWP +#if defined(_M_ARM64) || defined(__aarch64__) +#define USE_GEMMLOWP +#endif +#if defined(_M_ARM) || defined(__arm__) +#define USE_GEMMLOWP +#endif +#endif #ifdef USE_GEMMLOWP #include "core/util/gemmlowp_common.h"