update xnnpack for disable libm on Windows [submodule XNNPACK] (#141943)

This PR is implement of RFC: https://github.com/pytorch/pytorch/issues/141946
Changes:
1. Update `XNNPACK` to contains it's PRS: https://github.com/google/XNNPACK/pull/7456, https://github.com/google/XNNPACK/pull/7535 and other build fixing PRs.
2. Set `XNNPACK_BUILD_WITH_LIBM` to `OFF`, it is turn off CMake find_library(libm) of `XNNPACK`.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/141943
Approved by: https://github.com/atalman
This commit is contained in:
Xu Han
2025-01-10 00:47:41 +00:00
committed by PyTorch MergeBot
parent 8db67e0319
commit bd1f5d1c32
2 changed files with 7 additions and 1 deletions

View File

@ -540,6 +540,12 @@ if(USE_XNNPACK AND NOT USE_SYSTEM_XNNPACK)
set(__caffe2_CMAKE_POSITION_INDEPENDENT_CODE_FLAG ${CMAKE_POSITION_INDEPENDENT_CODE})
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
if(Win32)
# Disable libm dependency explicitly to avoid symbol conflict for XNNPACK as
# Windows runtime has provided the math functions - #134989
set(XNNPACK_BUILD_WITH_LIBM OFF CACHE BOOL "")
endif()
add_subdirectory(
"${XNNPACK_SOURCE_DIR}"
"${CONFU_DEPENDENCIES_BINARY_DIR}/XNNPACK")