mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[caffe2] Always build NNPACK together with Caffe2 (#6365)
Caffe2 started with an option to use NNPACK pre-installed in the system. Now this option is mostly legacy, as Caffe2 can include NNPACK in its own build on all platforms. Due to problems when pre-installed NNPACK is built with different dependencies or compiler options, we decided to remove this option and alwyas build NNPACK with Caffe2. This change makes Caffe2 always build NNPACK as part of its own build, and updates NNPACK and cpuinfo submodules.
This commit is contained in:
12
cmake/External/nnpack.cmake
vendored
12
cmake/External/nnpack.cmake
vendored
@ -7,16 +7,10 @@ if (NOT USE_NNPACK)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# try any external nnpack first
|
||||
find_package(NNPACK)
|
||||
|
||||
if (NNPACK_FOUND)
|
||||
message(INFO "Found external NNPACK installation.")
|
||||
return()
|
||||
endif()
|
||||
|
||||
##############################################################################
|
||||
# Custom build rules to build nnpack, if external dependency is not found
|
||||
# NNPACK is built together with Caffe2
|
||||
# By default, it builds code from third-party/NNPACK submodule.
|
||||
# Define NNPACK_SOURCE_DIR to build with a different version.
|
||||
##############################################################################
|
||||
|
||||
##############################################################################
|
||||
|
2
third_party/NNPACK
vendored
2
third_party/NNPACK
vendored
Submodule third_party/NNPACK updated: 0872691892...b63fe1ba89
2
third_party/cpuinfo
vendored
2
third_party/cpuinfo
vendored
Submodule third_party/cpuinfo updated: d0222b4794...831dc28341
Reference in New Issue
Block a user