Skip to content

Commit 38ef3ad

Browse files
authored
Disable cpuinfo for ARM64EC builds. (microsoft#25831)
### Description <!-- Describe your changes. --> Disable cpuinfo for ARM64EC builds. There's an error when linking to cpuinfo built for ARM64EC when using `--use_vckpg`. This issue was exposed by a recent change (microsoft#25228) but cpuinfo was actually not being used before for ARM64EC. The macros here don't properly account for ARM64EC: https://github.com/microsoft/onnxruntime/blob/e6d3e085cb0bb96da7c3458b97316ecca234b37a/onnxruntime/core/common/cpuid_arch_definition.h#L8-L14 ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> Fix a packaging pipeline failure. Revert to the old behavior of not calling cpuinfo from the CPUIDInfo ctor for ARM64EC. This PR is just a workaround. The cpuinfo link issue needs more investigation.
1 parent 8c68aa1 commit 38ef3ad

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

cmake/external/onnxruntime_external_deps.cmake

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,13 @@ if (onnxruntime_ENABLE_CPUINFO)
331331
set(CPUINFO_SUPPORTED TRUE)
332332
endif()
333333
if (WIN32)
334-
set(CPUINFO_SUPPORTED TRUE)
334+
# There's an error when linking with cpuinfo on arm64ec with a vcpkg build (--use_vcpkg).
335+
# TODO Fix it and then re-enable cpuinfo on arm64ec.
336+
if (onnxruntime_target_platform STREQUAL "ARM64EC")
337+
set(CPUINFO_SUPPORTED FALSE)
338+
else()
339+
set(CPUINFO_SUPPORTED TRUE)
340+
endif()
335341
elseif (NOT ${onnxruntime_target_platform} MATCHES "^(i[3-6]86|AMD64|x86(_64)?|armv[5-8].*|aarch64|arm64)$")
336342
message(WARNING
337343
"Target processor architecture \"${onnxruntime_target_platform}\" is not supported in cpuinfo. "

0 commit comments

Comments
 (0)