mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
**Summary** Update onednn from v2.7.3 to v3.1.1. It is bc-breaking as some APIs are changed on oneDNN side. Changes include: - PyTorch code where oneDNN is directly called - Submodule `third_party/ideep` to adapt to oneDNN's new API. - CMAKE files to fix build issues. **Test plan** Building issues and correctness are covered by CI checks. For performance, we have run TorchBench models to ensure there is no regression. Below is the comparison before and after oneDNN update.  Note: - Base commit of PyTorch: da322ea - CPU: Intel(R) Xeon(R) Platinum 8380 CPU @ 2.30GHz (Ice Lake) Pull Request resolved: https://github.com/pytorch/pytorch/pull/97957 Approved by: https://github.com/jgong5, https://github.com/jerryzh168
19 lines
444 B
CMake
19 lines
444 B
CMake
set(MKLDNN_USE_NATIVE_ARCH ${USE_NATIVE_ARCH})
|
|
|
|
if(CPU_AARCH64)
|
|
include(${CMAKE_CURRENT_LIST_DIR}/ComputeLibrary.cmake)
|
|
endif()
|
|
|
|
find_package(MKLDNN QUIET)
|
|
|
|
if(NOT TARGET caffe2::mkldnn)
|
|
add_library(caffe2::mkldnn INTERFACE IMPORTED)
|
|
endif()
|
|
|
|
set_property(
|
|
TARGET caffe2::mkldnn PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
|
${MKLDNN_INCLUDE_DIR})
|
|
set_property(
|
|
TARGET caffe2::mkldnn PROPERTY INTERFACE_LINK_LIBRARIES
|
|
${MKLDNN_LIBRARIES})
|