diff --git a/cmake/external/onnxruntime_external_deps.cmake b/cmake/external/onnxruntime_external_deps.cmake index 0d1f47f195ba5..84e3132b1deec 100644 --- a/cmake/external/onnxruntime_external_deps.cmake +++ b/cmake/external/onnxruntime_external_deps.cmake @@ -367,23 +367,23 @@ if (CPUINFO_SUPPORTED) set(CPUINFO_BUILD_MOCK_TESTS OFF CACHE INTERNAL "") set(CPUINFO_BUILD_BENCHMARKS OFF CACHE INTERNAL "") if (onnxruntime_target_platform STREQUAL "ARM64EC" OR onnxruntime_target_platform STREQUAL "ARM64") - message(STATUS "Applying a patch for Windows ARM64/ARM64EC in cpuinfo") - onnxruntime_fetchcontent_declare( - pytorch_cpuinfo - URL ${DEP_URL_pytorch_cpuinfo} - URL_HASH SHA1=${DEP_SHA1_pytorch_cpuinfo} - EXCLUDE_FROM_ALL - PATCH_COMMAND ${Patch_EXECUTABLE} -p1 < ${PROJECT_SOURCE_DIR}/patches/cpuinfo/9bb12d342fd9479679d505d93a478a6f9cd50a47.patch - FIND_PACKAGE_ARGS NAMES cpuinfo - ) + message(STATUS "Applying a patch for Windows ARM64/ARM64EC in cpuinfo") + onnxruntime_fetchcontent_declare( + pytorch_cpuinfo + URL ${DEP_URL_pytorch_cpuinfo} + URL_HASH SHA1=${DEP_SHA1_pytorch_cpuinfo} + EXCLUDE_FROM_ALL + PATCH_COMMAND ${Patch_EXECUTABLE} -p1 < ${PROJECT_SOURCE_DIR}/patches/cpuinfo/patch_cpuinfo_h_for_arm64ec.patch + FIND_PACKAGE_ARGS NAMES cpuinfo + ) else() - onnxruntime_fetchcontent_declare( - pytorch_cpuinfo - URL ${DEP_URL_pytorch_cpuinfo} - URL_HASH SHA1=${DEP_SHA1_pytorch_cpuinfo} - EXCLUDE_FROM_ALL - FIND_PACKAGE_ARGS NAMES cpuinfo - ) + onnxruntime_fetchcontent_declare( + pytorch_cpuinfo + URL ${DEP_URL_pytorch_cpuinfo} + URL_HASH SHA1=${DEP_SHA1_pytorch_cpuinfo} + EXCLUDE_FROM_ALL + FIND_PACKAGE_ARGS NAMES cpuinfo + ) endif() set(ONNXRUNTIME_CPUINFO_PROJ pytorch_cpuinfo) onnxruntime_fetchcontent_makeavailable(${ONNXRUNTIME_CPUINFO_PROJ}) diff --git a/cmake/patches/cpuinfo/9bb12d342fd9479679d505d93a478a6f9cd50a47.patch b/cmake/patches/cpuinfo/patch_cpuinfo_h_for_arm64ec.patch similarity index 53% rename from cmake/patches/cpuinfo/9bb12d342fd9479679d505d93a478a6f9cd50a47.patch rename to cmake/patches/cpuinfo/patch_cpuinfo_h_for_arm64ec.patch index 7785621965b00..23ceeb8f758cc 100644 --- a/cmake/patches/cpuinfo/9bb12d342fd9479679d505d93a478a6f9cd50a47.patch +++ b/cmake/patches/cpuinfo/patch_cpuinfo_h_for_arm64ec.patch @@ -1,5 +1,5 @@ diff --git a/include/cpuinfo.h b/include/cpuinfo.h -index 6eb4b8c..4346a5a 100644 +index f1d35d4..9e454d2 100644 --- a/include/cpuinfo.h +++ b/include/cpuinfo.h @@ -18,7 +18,7 @@ @@ -20,16 +20,3 @@ index 6eb4b8c..4346a5a 100644 #define CPUINFO_ARCH_ARM64 1 #endif -diff --git a/src/arm/windows/init.c b/src/arm/windows/init.c -index de2f6cc..c3a7835 100644 ---- a/src/arm/windows/init.c -+++ b/src/arm/windows/init.c -@@ -175,7 +175,7 @@ static struct woa_chip_info* get_system_info_from_registry(void) { - if (chip_info == NULL) { - /* No match was found, so print a warning and assign the unknown - * case. */ -- cpuinfo_log_error( -+ cpuinfo_log_debug( - "Unknown chip model name '%ls'.\nPlease add new Windows on Arm SoC/chip support to arm/windows/init.c!", - text_buffer); - } else {