From 227bc7264e16fee09ac349ade758e1552f09f3f7 Mon Sep 17 00:00:00 2001 From: sumitsays Date: Fri, 15 Apr 2022 09:24:21 -0700 Subject: [PATCH] Fixed compilation error for ARM architecture (#11223) Co-authored-by: Sumit Agarwal --- onnxruntime/core/common/cpuid_info.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/onnxruntime/core/common/cpuid_info.cc b/onnxruntime/core/common/cpuid_info.cc index 7327942177..9905e6f3dc 100644 --- a/onnxruntime/core/common/cpuid_info.cc +++ b/onnxruntime/core/common/cpuid_info.cc @@ -165,7 +165,7 @@ void CPUIDInfo::ArmWindowsInit() { constexpr int MAX_CORES = 64; constexpr int MAX_VALUE_NAME = 4096; - TCHAR midrKey[MAX_VALUE_NAME] = ""; // buffer for processor registry name + CHAR midrKey[MAX_VALUE_NAME] = ""; // buffer for processor registry name uint32_t lastUarch = cpuinfo_uarch_unknown; for (int i = 0; i < MAX_CORES - 1; i++) { snprintf(midrKey, MAX_VALUE_NAME, "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\%d", i); @@ -185,7 +185,7 @@ void CPUIDInfo::ArmWindowsInit() { * * For the CP value of MIDR, op0 = 3 and the others are all = 0, so we come up with 0x4000, */ - auto retCode = ::RegGetValue(HKEY_LOCAL_MACHINE, midrKey, "CP 4000", RRF_RT_REG_QWORD, nullptr, &midrVal, &midrSize); + auto retCode = ::RegGetValueA(HKEY_LOCAL_MACHINE, midrKey, "CP 4000", RRF_RT_REG_QWORD, nullptr, &midrVal, &midrSize); if (retCode != ERROR_SUCCESS) { break; }