Skip to content

Commit

Permalink
rename dabnn to dnnlibrary, onnx2bnn to onnx2daq
Browse files Browse the repository at this point in the history
  • Loading branch information
daquexian committed May 23, 2019
1 parent ce1a521 commit bd9bfd1
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 44 deletions.
10 changes: 5 additions & 5 deletions ci/build_aar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ 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 --build . -- -j$nproc
popd
mkdir -p ci/android_aar/dabnn/src/main/jniLibs/arm64-v8a
cp ${JNI_BUILD_DIR}/dabnn/jni/libdabnn-jni.so ci/android_aar/dabnn/src/main/jniLibs/arm64-v8a/
mkdir -p ci/android_aar/dnnlibrary/src/main/jniLibs/arm64-v8a
cp ${JNI_BUILD_DIR}/dnnlibrary/jni/libdnnlibrary-jni.so ci/android_aar/dnnlibrary/src/main/jniLibs/arm64-v8a/

# Increase version code and update version name

Expand All @@ -36,10 +36,10 @@ elif (( $# == 1 )); then
fi
echo "ver=$ver"

sed -i -E "s/versionName .+/versionName \"v$ver\"/" ci/android_aar/dabnn/build.gradle
sed -i -E "s/publishVersion = .+/publishVersion = \'$ver\'/" ci/android_aar/dabnn/build.gradle
sed -i -E "s/versionName .+/versionName \"v$ver\"/" ci/android_aar/dnnlibrary/build.gradle
sed -i -E "s/publishVersion = .+/publishVersion = \'$ver\'/" ci/android_aar/dnnlibrary/build.gradle

cat ci/android_aar/dabnn/build.gradle
cat ci/android_aar/dnnlibrary/build.gradle

pushd ci/android_aar
ANDROID_HOME=$MY_ANDROID_HOME ./gradlew clean build
Expand Down
6 changes: 3 additions & 3 deletions ci/build_appimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ wget https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/downloa

chmod +x linuxdeploy-*.AppImage
mkdir -p ci/appimage/appdir/usr/bin
cp build_onnx2bnn/tools/onnx2bnn/onnx2bnn ci/appimage/appdir/usr/bin/
./linuxdeploy-x86_64.AppImage --appdir ci/appimage/appdir -d ci/appimage/onnx2bnn.desktop -i ci/appimage/onnx2bnn.png --output appimage
mv `ls onnx2bnn-*.AppImage` onnx2bnn.AppImage
cp build_onnx2daq/tools/onnx2daq/onnx2daq ci/appimage/appdir/usr/bin/
./linuxdeploy-x86_64.AppImage --appdir ci/appimage/appdir -d ci/appimage/onnx2daq.desktop -i ci/appimage/onnx2daq.png --output appimage
mv `ls onnx2daq-*.AppImage` onnx2daq.AppImage
2 changes: 1 addition & 1 deletion 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_dabnn && cd build_dabnn
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 ..
cmake --build . -- -j$nproc
cd -
2 changes: 1 addition & 1 deletion ci/build_onnx2daq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e

nproc=$(ci/get_cores.sh)

mkdir build_onnx2bnn && cd build_onnx2bnn
mkdir build_onnx2daq && cd build_onnx2daq
cmake ..
cmake --build . -- -j$nproc
cd -
8 changes: 4 additions & 4 deletions ci/dnnlibrary_build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ steps:
submodules: true
- bash: brew install watch gnu-sed
displayName: Install watch and gnu-sed
- bash: ci/build_dabnn.sh
- bash: ci/build_dnnlibrary.sh
displayName: Build
- bash: ci/start_android_emulator.sh
displayName: Start Android Emulator
- bash: ci/adb_push_and_run.sh build_dabnn/tests/bconv_test
- bash: ci/adb_push_and_run.sh build_dnnlibrary/tests/bconv_test
displayName: Binary Conv Test
- bash: ci/adb_push_and_run.sh build_dabnn/tests/bgemm_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_dabnn/tests/net_test
- bash: ci/adb_push_and_run.sh build_dnnlibrary/tests/net_test
displayName: Model Test
- bash: ci/build_aar.sh
env:
Expand Down
44 changes: 22 additions & 22 deletions ci/onnx2daq_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ trigger:
exclude:
- README.md
- docs/*
# not trigger onnx2bnn build when only dabnn is edited
- dabnn/*
# not trigger onnx2daq build when only dnnlibrary is edited
- dnnlibrary/*
pr:
branches:
include:
Expand All @@ -23,8 +23,8 @@ pr:
exclude:
- README.md
- docs/*
# not trigger onnx2bnn build when only dabnn is edited
- dabnn/*
# not trigger onnx2daq build when only dnnlibrary is edited
- dnnlibrary/*

jobs:
- job: LinuxAppImage
Expand All @@ -35,45 +35,45 @@ jobs:
submodules: true
- script: sudo apt install -y protobuf-compiler libprotobuf-dev
displayName: Install protobuf
- bash: ci/build_onnx2bnn.sh
- bash: ci/build_onnx2daq.sh
displayName: Build
- bash: ci/build_appimage.sh
displayName: Build AppImage
- task: CopyFiles@2
inputs:
contents: 'onnx2bnn.AppImage'
contents: 'onnx2daq.AppImage'
targetFolder: $(Build.ArtifactStagingDirectory)
- template: template_onnx2bnn_publish_artifacts.yml
- template: template_onnx2bnn_github_release.yml
- template: template_onnx2daq_publish_artifacts.yml
- template: template_onnx2daq_github_release.yml
- job: Windows
pool:
vmImage: 'vs2017-win2016'
steps:
- checkout: self
submodules: true
- template: template_onnx2bnn_build_python_all_version.yml
- template: template_onnx2daq_build_python_all_version.yml
- task: CopyFiles@2
inputs:
sourceFolder: '.setuptools-cmake-build\tools\onnx2bnn\Release\'
contents: 'onnx2bnn.exe'
sourceFolder: '.setuptools-cmake-build\tools\onnx2daq\Release\'
contents: 'onnx2daq.exe'
targetFolder: $(Build.ArtifactStagingDirectory)
- template: template_onnx2bnn_publish_artifacts.yml
- template: template_onnx2bnn_github_release.yml
- template: template_onnx2bnn_upload_to_pypi.yml
- template: template_onnx2daq_publish_artifacts.yml
- template: template_onnx2daq_github_release.yml
- template: template_onnx2daq_upload_to_pypi.yml
- job: macOS
pool:
vmImage: 'macOS-10.14'
steps:
- checkout: self
submodules: true
- template: template_onnx2bnn_build_python_all_version.yml
- script: 'cp .setuptools-cmake-build/tools/onnx2bnn/onnx2bnn .setuptools-cmake-build/tools/onnx2bnn/onnx2bnn-macos'
displayName: 'Rename onnx2bnn'
- template: template_onnx2daq_build_python_all_version.yml
- script: 'cp .setuptools-cmake-build/tools/onnx2daq/onnx2daq .setuptools-cmake-build/tools/onnx2daq/onnx2daq-macos'
displayName: 'Rename onnx2daq'
- task: CopyFiles@2
inputs:
sourceFolder: '.setuptools-cmake-build/tools/onnx2bnn'
contents: 'onnx2bnn-macos'
sourceFolder: '.setuptools-cmake-build/tools/onnx2daq'
contents: 'onnx2daq-macos'
targetFolder: $(Build.ArtifactStagingDirectory)
- template: template_onnx2bnn_publish_artifacts.yml
- template: template_onnx2bnn_github_release.yml
- template: template_onnx2bnn_upload_to_pypi.yml
- template: template_onnx2daq_publish_artifacts.yml
- template: template_onnx2daq_github_release.yml
- template: template_onnx2daq_upload_to_pypi.yml
4 changes: 2 additions & 2 deletions ci/template_onnx2daq_build_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ steps:
- script: python -m pip install --user --upgrade setuptools wheel twine
displayName: Install setuptools, wheel and twine
- script: python setup.py bdist_wheel
workingDirectory: tools/onnx2bnn/python/
displayName: Build onnx2bnn python package
workingDirectory: tools/onnx2daq/python/
displayName: Build onnx2daq python package
6 changes: 3 additions & 3 deletions ci/template_onnx2daq_build_python_all_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ steps:
versionSpec: '3.7'
addToPath: true
architecture: 'x64'
- template: template_onnx2bnn_build_python.yml
- template: template_onnx2daq_build_python.yml
- task: UsePythonVersion@0
inputs:
versionSpec: '3.6'
addToPath: true
architecture: 'x64'
- template: template_onnx2bnn_build_python.yml
- template: template_onnx2daq_build_python.yml
- task: UsePythonVersion@0
inputs:
versionSpec: '3.5'
addToPath: true
architecture: 'x64'
- template: template_onnx2bnn_build_python.yml
- template: template_onnx2daq_build_python.yml

2 changes: 1 addition & 1 deletion ci/template_onnx2daq_github_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ steps:
- task: GitHubRelease@0
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
inputs:
gitHubConnection: 'dabnn release'
gitHubConnection: 'dnnlibrary release'
repositoryName: '$(Build.Repository.Name)'
action: 'edit'
tag: '$(Build.SourceBranchName)'
Expand Down
2 changes: 1 addition & 1 deletion ci/template_onnx2daq_publish_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ steps:
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)
artifactName: onnx2bnn
artifactName: onnx2daq

2 changes: 1 addition & 1 deletion ci/template_onnx2daq_upload_to_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ steps:
- script: python -m twine upload dist/* --verbose
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
displayName: Upload wheel to PyPI
workingDirectory: tools/onnx2bnn/python/
workingDirectory: tools/onnx2daq/python/
env:
TWINE_USERNAME: $(twineUsername)
TWINE_PASSWORD: $(twinePassword)
Expand Down

0 comments on commit bd9bfd1

Please sign in to comment.