Skip to content

Commit

Permalink
update android/iOS build library packing (#26565)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: pytorch/pytorch#26565

For OSS mobile build we should keep QNNPACK off and PYTORCH_QNNPACK on
as we don't include caffe2 ops that use third_party/QNNPACK.

Update android/iOS build script to include new libraries accordingly.

Test Plan: - CI build

Differential Revision: D17508918

Pulled By: ljk53

fbshipit-source-id: 0483d45646d4d503b4e5c1d483e4df72cffc6c68
  • Loading branch information
ljk53 authored and facebook-github-bot committed Sep 21, 2019
1 parent f7ba68e commit 8f54d0d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .circleci/scripts/binary_ios_upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ mkdir -p ${ZIP_DIR}/src
cp -R ${ARTIFACTS_DIR}/arm64/include ${ZIP_DIR}/install/
# build a FAT bianry
cd ${ZIP_DIR}/install/lib
target_libs=(libc10.a libclog.a libcpuinfo.a libqnnpack.a libtorch.a)
target_libs=(libc10.a libclog.a libcpuinfo.a libeigen_blas.a libpytorch_qnnpack.a libtorch.a)
for lib in ${target_libs[*]}
do
libs=(${ARTIFACTS_DIR}/x86_64/lib/${lib} ${ARTIFACTS_DIR}/arm64/lib/${lib})
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,8 @@ if (INTERN_BUILD_MOBILE AND NOT BUILD_CAFFE2_MOBILE)
set(FEATURE_TORCH_MOBILE ON)
set(NO_API ON)
set(USE_FBGEMM OFF)
set(USE_PYTORCH_QNNPACK ON)
set(USE_QNNPACK OFF)
set(USE_STATIC_DISPATCH ON)
set(INTERN_DISABLE_ONNX ON)
set(INTERN_DISABLE_AUTOGRAD ON)
Expand Down
2 changes: 0 additions & 2 deletions android/pytorch_android/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ endfunction(import_static_lib)
import_static_lib(libtorch)
import_static_lib(libc10)
import_static_lib(libnnpack)
import_static_lib(libqnnpack)
import_static_lib(libpytorch_qnnpack)
import_static_lib(libeigen_blas)
import_static_lib(libcpuinfo)
Expand All @@ -57,7 +56,6 @@ target_link_libraries(pytorch
-Wl,--no-whole-archive
libc10
libnnpack
libqnnpack
libpytorch_qnnpack
libeigen_blas
libcpuinfo
Expand Down

0 comments on commit 8f54d0d

Please sign in to comment.