Skip to content

Commit

Permalink
Edit ci files to fit dnnlibrary
Browse files Browse the repository at this point in the history
  • Loading branch information
daquexian committed May 23, 2019
1 parent bd9bfd1 commit 618f198
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 18 deletions.
2 changes: 1 addition & 1 deletion ci/build_aar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ MY_ANDROID_HOME="${ANDROID_HOME:-$HOME/Android/Sdk}"
MY_ANDROID_NDK_HOME="${ANDROID_NDK_HOME:-$MY_ANDROID_HOME/ndk-bundle}"
JNI_BUILD_DIR=build_jni_tmp
rm -rf ${JNI_BUILD_DIR} && mkdir ${JNI_BUILD_DIR} && pushd ${JNI_BUILD_DIR}
cmake -DCMAKE_SYSTEM_NAME=Android -DCMAKE_TOOLCHAIN_FILE=${MY_ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake -DANDROID_CPP_FEATURES=exceptions -DANDROID_PLATFORM=android-21 -DANDROID_ABI=arm64-v8a -DBNN_BUILD_JNI=ON -DBNN_BUILD_TEST=OFF -DBNN_BUILD_BENCHMARK=OFF ..
cmake -DCMAKE_SYSTEM_NAME=Android -DCMAKE_TOOLCHAIN_FILE=${MY_ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake -DANDROID_CPP_FEATURES=exceptions -DANDROID_PLATFORM=android-27 -DANDROID_ABI=arm64-v8a -DBNN_BUILD_JNI=ON -DBNN_BUILD_TEST=OFF -DBNN_BUILD_BENCHMARK=OFF ..
cmake --build . -- -j$nproc
popd
mkdir -p ci/android_aar/dnnlibrary/src/main/jniLibs/arm64-v8a
Expand Down
6 changes: 3 additions & 3 deletions ci/build_dnnlibrary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e
echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install 'ndk-bundle'
nproc=$(ci/get_cores.sh)

mkdir build_dnnlibrary && cd build_dnnlibrary
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_HOME/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release ..
mkdir build_dnnlibrary && pushd build_dnnlibrary
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_HOME/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release -DDNN_READ_ONNX=ON ..
cmake --build . -- -j$nproc
cd -
popd
10 changes: 2 additions & 8 deletions ci/dnnlibrary_build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,8 @@ steps:
displayName: Build
- bash: ci/start_android_emulator.sh
displayName: Start Android Emulator
- bash: ci/adb_push_and_run.sh build_dnnlibrary/tests/bconv_test
displayName: Binary Conv Test
- bash: ci/adb_push_and_run.sh build_dnnlibrary/tests/bgemm_test
displayName: Binary Gemm Test
- bash: ci/download_models.sh
displayName: Download Models
- bash: ci/adb_push_and_run.sh build_dnnlibrary/tests/net_test
displayName: Model Test
- bash: ci/download_and_test_models.sh
displayName: Download Models And Test
- bash: ci/build_aar.sh
env:
BINTRAY_KEY: $(bintrayKey)
Expand Down
20 changes: 20 additions & 0 deletions ci/download_and_test_models.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#! /usr/bin/env bash

set -e

wget "https://s3.amazonaws.com/onnx-model-zoo/squeezenet/squeezenet1.1/squeezenet1.1.tar.gz" -O squeezenet1.1.tar.gz
tar xvf squeezenet1.1.tar.gz
python3 ci/validate_onnx.py squeezenet1.1 build_dnnlibrary/binaries/dnn_retrieve_result

wget "https://s3.amazonaws.com/onnx-model-zoo/mobilenet/mobilenetv2-1.0/mobilenetv2-1.0.tar.gz" -O mobilenetv2-1.0.tar.gz
tar xvf mobilenetv2-1.0.tar.gz
python3 ci/validate_onnx.py mobilenetv2-1.0 build_dnnlibrary/binaries/dnn_retrieve_result

wget "https://s3.amazonaws.com/onnx-model-zoo/resnet/resnet18v2/resnet18v2.tar.gz" -O resnet18v2.tar.gz
tar xvf resnet18v2.tar.gz
python3 ci/validate_onnx.py resnet18v2 build_dnnlibrary/binaries/dnn_retrieve_result

wget "https://s3.amazonaws.com/download.onnx/models/opset_9/bvlc_googlenet.tar.gz" -O bvlc_googlenet.tar.gz
tar xvf bvlc_googlenet.tar.gz
python3 ci/validate_onnx.py bvlc_googlenet build_dnnlibrary/binaries/dnn_retrieve_result

6 changes: 0 additions & 6 deletions ci/download_models.sh

This file was deleted.

File renamed without changes.

0 comments on commit 618f198

Please sign in to comment.