From 7ee286c80ae89b25da2fc7993acbb8e097b7bead Mon Sep 17 00:00:00 2001 From: Marat Dukhan Date: Wed, 31 Jan 2018 21:05:07 -0800 Subject: [PATCH] Vendor NNPACK dependencies with Caffe2 --- .gitmodules | 11 +++++++---- cmake/External/nnpack.cmake | 8 ++++++++ third_party/FP16 | 1 + third_party/FXdiv | 1 + third_party/NNPACK | 2 +- third_party/NNPACK_deps/FP16 | 1 - third_party/NNPACK_deps/FXdiv | 1 - third_party/NNPACK_deps/psimd | 1 - third_party/NNPACK_deps/pthreadpool | 1 - third_party/cpuinfo | 1 + third_party/psimd | 1 + third_party/pthreadpool | 1 + 12 files changed, 21 insertions(+), 9 deletions(-) create mode 160000 third_party/FP16 create mode 160000 third_party/FXdiv delete mode 160000 third_party/NNPACK_deps/FP16 delete mode 160000 third_party/NNPACK_deps/FXdiv delete mode 160000 third_party/NNPACK_deps/psimd delete mode 160000 third_party/NNPACK_deps/pthreadpool create mode 160000 third_party/cpuinfo create mode 160000 third_party/psimd create mode 160000 third_party/pthreadpool diff --git a/.gitmodules b/.gitmodules index 0efc9358bfd..5765c51b911 100644 --- a/.gitmodules +++ b/.gitmodules @@ -32,16 +32,16 @@ path = third_party/gloo url = https://github.com/facebookincubator/gloo [submodule "third_party/NNPACK_deps/pthreadpool"] - path = third_party/NNPACK_deps/pthreadpool + path = third_party/pthreadpool url = https://github.com/Maratyszcza/pthreadpool.git [submodule "third_party/NNPACK_deps/FXdiv"] - path = third_party/NNPACK_deps/FXdiv + path = third_party/FXdiv url = https://github.com/Maratyszcza/FXdiv.git [submodule "third_party/NNPACK_deps/FP16"] - path = third_party/NNPACK_deps/FP16 + path = third_party/FP16 url = https://github.com/Maratyszcza/FP16.git [submodule "third_party/NNPACK_deps/psimd"] - path = third_party/NNPACK_deps/psimd + path = third_party/psimd url = https://github.com/Maratyszcza/psimd.git [submodule "third_party/aten"] path = third_party/aten @@ -49,3 +49,6 @@ [submodule "third_party/zstd"] path = third_party/zstd url = https://github.com/facebook/zstd.git +[submodule "third-party/cpuinfo"] + path = third_party/cpuinfo + url = https://github.com/Maratyszcza/cpuinfo.git diff --git a/cmake/External/nnpack.cmake b/cmake/External/nnpack.cmake index d2b15dd4a26..73747796fe4 100644 --- a/cmake/External/nnpack.cmake +++ b/cmake/External/nnpack.cmake @@ -58,6 +58,14 @@ if (ANDROID OR IOS OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NA set(CONFU_DEPENDENCIES_BINARY_DIR ${PROJECT_BINARY_DIR}/confu-deps CACHE PATH "Confu-style dependencies binary directory") + # Directories for NNPACK dependencies submoduled in Caffe2 + set(CPUINFO_SOURCE_DIR "${CAFFE2_THIRD_PARTY_ROOT}/cpuinfo" CACHE STRING "cpuinfo source directory") + set(FP16_SOURCE_DIR "${CAFFE2_THIRD_PARTY_ROOT}/fp16" CACHE STRING "FP16 source directory") + set(FXDIV_SOURCE_DIR "${CAFFE2_THIRD_PARTY_ROOT}/fxdiv" CACHE STRING "FXdiv source directory") + set(PSIMD_SOURCE_DIR "${CAFFE2_THIRD_PARTY_ROOT}/psimd" CACHE STRING "PSimd source directory") + set(PTHREADPOOL_SOURCE_DIR "${CAFFE2_THIRD_PARTY_ROOT}/pthreadpool" CACHE STRING "pthreadpool source directory") + set(GOOGLETEST_SOURCE_DIR "${CAFFE2_THIRD_PARTY_ROOT}/googletest" CACHE STRING "Google Test source directory") + if(NOT TARGET nnpack) set(NNPACK_BUILD_TESTS OFF CACHE BOOL "") set(NNPACK_BUILD_BENCHMARKS OFF CACHE BOOL "") diff --git a/third_party/FP16 b/third_party/FP16 new file mode 160000 index 00000000000..af4eeb5c50b --- /dev/null +++ b/third_party/FP16 @@ -0,0 +1 @@ +Subproject commit af4eeb5c50b02a76a0f89471da00032c26973d41 diff --git a/third_party/FXdiv b/third_party/FXdiv new file mode 160000 index 00000000000..8d6ecbee2f8 --- /dev/null +++ b/third_party/FXdiv @@ -0,0 +1 @@ +Subproject commit 8d6ecbee2f8261590fae277fb2c7a68ff962737d diff --git a/third_party/NNPACK b/third_party/NNPACK index 12086a580d1..38047b2ed4a 160000 --- a/third_party/NNPACK +++ b/third_party/NNPACK @@ -1 +1 @@ -Subproject commit 12086a580d18328e4c56def401acce625f8f8c9a +Subproject commit 38047b2ed4a54743e0d681cc804117361e042b61 diff --git a/third_party/NNPACK_deps/FP16 b/third_party/NNPACK_deps/FP16 deleted file mode 160000 index 2e9eeeb0b46..00000000000 --- a/third_party/NNPACK_deps/FP16 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2e9eeeb0b463736d13b887d790ac7e72e78fa4bc diff --git a/third_party/NNPACK_deps/FXdiv b/third_party/NNPACK_deps/FXdiv deleted file mode 160000 index 8f85044fb41..00000000000 --- a/third_party/NNPACK_deps/FXdiv +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8f85044fb41e560508cd69ed26c9afb9cc120e8a diff --git a/third_party/NNPACK_deps/psimd b/third_party/NNPACK_deps/psimd deleted file mode 160000 index 0b26a3fb98d..00000000000 --- a/third_party/NNPACK_deps/psimd +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0b26a3fb98dd6af7e1f4e0796c56df6b32b1c016 diff --git a/third_party/NNPACK_deps/pthreadpool b/third_party/NNPACK_deps/pthreadpool deleted file mode 160000 index 9e17903a3fc..00000000000 --- a/third_party/NNPACK_deps/pthreadpool +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9e17903a3fc963fe86b151aaddae7cf1b1d34815 diff --git a/third_party/cpuinfo b/third_party/cpuinfo new file mode 160000 index 00000000000..d581716a489 --- /dev/null +++ b/third_party/cpuinfo @@ -0,0 +1 @@ +Subproject commit d581716a489bc026f1b6398126423d0a40394f51 diff --git a/third_party/psimd b/third_party/psimd new file mode 160000 index 00000000000..4ac61b11225 --- /dev/null +++ b/third_party/psimd @@ -0,0 +1 @@ +Subproject commit 4ac61b112252778b174575931c641bef661ab3cd diff --git a/third_party/pthreadpool b/third_party/pthreadpool new file mode 160000 index 00000000000..b76d1ca0890 --- /dev/null +++ b/third_party/pthreadpool @@ -0,0 +1 @@ +Subproject commit b76d1ca08902ed31dd7ae7f364f53ef35190464a