[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:
Marat Dukhan
2018-04-06 18:27:59 -04:00
committed by GitHub
parent aab0bd3c13
commit e45b51148a
3 changed files with 5 additions and 11 deletions

View File

@ -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.
##############################################################################
##############################################################################