Skip to content

Commit

Permalink
Update ONNX Runtime version To 1.13.1 (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
snnn authored Oct 25, 2022
1 parent 67ba67a commit c66d7e0
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 104 deletions.
34 changes: 0 additions & 34 deletions .github/workflows/linux-ci.yml

This file was deleted.

60 changes: 0 additions & 60 deletions .github/workflows/win-ci.yml

This file was deleted.

13 changes: 9 additions & 4 deletions .pipelines/OneBranch.Official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ parameters: # parameters are shown up in ADO UI in a build queue time
displayName: 'Enable debug output'
type: boolean
default: false

- name: 'ortversion'
displayName: 'ONNX Runtime Version'
type: string
default: '1.13.1'

variables:
CDP_DEFINITION_BUILD_COUNT: $[counter('', 0)]
Expand Down Expand Up @@ -82,10 +87,10 @@ extends:
set -e -x
apt-get update
apt-get install -y cmake gcc g++ libpng-dev libjpeg-turbo8-dev
curl -O -L https://github.com/microsoft/onnxruntime/releases/download/v1.10.0/onnxruntime-linux-x64-1.10.0.tgz
curl -O -L https://github.com/microsoft/onnxruntime/releases/download/v{{ parameters.ortversion }}/onnxruntime-linux-x64-{{ parameters.ortversion }}.tgz
mkdir onnxruntimebin
cd onnxruntimebin
tar --strip=1 -zxvf ../onnxruntime-linux-x64-1.10.0.tgz
tar --strip=1 -zxvf ../onnxruntime-linux-x64-{{ parameters.ortversion }}.tgz
displayName: Download onnxruntime
workingDirectory: '$(Build.BinariesDirectory)'
Expand Down Expand Up @@ -126,9 +131,9 @@ extends:
@echo ##vso[task.setvariable variable=vsdevcmd]%vsdevcmd%
displayName: 'locate vsdevcmd via vswhere'
- script: |
curl -L -o onnxruntime.zip https://github.com/microsoft/onnxruntime/releases/download/v1.10.0/onnxruntime-win-x64-1.10.0.zip
curl -L -o onnxruntime.zip https://github.com/microsoft/onnxruntime/releases/download/v{{ parameters.ortversion }}/onnxruntime-win-x64-{{ parameters.ortversion }}.zip
7z x onnxruntime.zip
move onnxruntime-win-x64-1.10.0 onnxruntimebin
move onnxruntime-win-x64-{{ parameters.ortversion }} onnxruntimebin
workingDirectory: '$(Build.BinariesDirectory)'
displayName: 'Install python modules'
#TODO: use the vsdevcmd variable
Expand Down
13 changes: 9 additions & 4 deletions .pipelines/OneBranch.PullRequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ parameters: # parameters are shown up in ADO UI in a build queue time
type: boolean
default: false

- name: 'ortversion'
displayName: 'ONNX Runtime Version'
type: string
default: '1.13.1'

variables:
CDP_DEFINITION_BUILD_COUNT: $[counter('', 0)]
system.debug: ${{ parameters.debug }}
Expand Down Expand Up @@ -82,10 +87,10 @@ extends:
set -e -x
apt-get update
apt-get install -y cmake gcc g++ libpng-dev libjpeg-turbo8-dev
curl -O -L https://github.com/microsoft/onnxruntime/releases/download/v1.10.0/onnxruntime-linux-x64-1.10.0.tgz
curl -O -L https://github.com/microsoft/onnxruntime/releases/download/v{{ parameters.ortversion }}/onnxruntime-linux-x64-{{ parameters.ortversion }}.tgz
mkdir onnxruntimebin
cd onnxruntimebin
tar --strip=1 -zxvf ../onnxruntime-linux-x64-1.10.0.tgz
tar --strip=1 -zxvf ../onnxruntime-linux-x64-{{ parameters.ortversion }}.tgz
displayName: Download onnxruntime
workingDirectory: '$(Build.BinariesDirectory)'
Expand Down Expand Up @@ -126,9 +131,9 @@ extends:
@echo ##vso[task.setvariable variable=vsdevcmd]%vsdevcmd%
displayName: 'locate vsdevcmd via vswhere'
- script: |
curl -L -o onnxruntime.zip https://github.com/microsoft/onnxruntime/releases/download/v1.10.0/onnxruntime-win-x64-1.10.0.zip
curl -L -o onnxruntime.zip https://github.com/microsoft/onnxruntime/releases/download/v{{ parameters.ortversion }}/onnxruntime-win-x64-{{ parameters.ortversion }}.zip
7z x onnxruntime.zip
move onnxruntime-win-x64-1.10.0 onnxruntimebin
move onnxruntime-win-x64-{{ parameters.ortversion }} onnxruntimebin
workingDirectory: '$(Build.BinariesDirectory)'
displayName: 'Download onnxruntime binary'
#TODO: use the vsdevcmd variable
Expand Down
2 changes: 2 additions & 0 deletions c_cxx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ option(onnxruntime_USE_TENSORRT "Build with TensorRT support" OFF)
option(LIBPNG_ROOTDIR "libpng root dir")
option(ONNXRUNTIME_ROOTDIR "onnxruntime root dir")

set(CMAKE_CXX_STANDARD 17)

if(NOT ONNXRUNTIME_ROOTDIR)
if(WIN32)
set(ONNXRUNTIME_ROOTDIR "C:/Program Files (x86)/onnxruntime")
Expand Down
4 changes: 2 additions & 2 deletions c_cxx/squeezenet/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## How to run the application
1. (Linux) Run ```run_capi_application.sh```, indicate onnxruntime library tarball with -p argument and indicate current onnxruntime-inference-examples/c_cxx/squeezenet directory with -w argument.
```
./run_capi_application.sh -p /home/azureuser/onnxruntime-linux-x64-gpu-1.10.0.tgz -w /home/azureuser/repos/onnxruntime-inference-examples/c_cxx/squeezenet
./run_capi_application.sh -p /home/azureuser/onnxruntime-linux-x64-gpu-1.13.1.tgz -w /home/azureuser/repos/onnxruntime-inference-examples/c_cxx/squeezenet
```
2. (Windows) Run ```run_capi_application.bat``` with onnxruntime library zip file and current onnxruntime-inference-examples\c_cxx\squeezenet directory
```
.\run_capi_application.bat D:\onnxruntime-win-x64-gpu-1.11.0.zip D:\repos\onnxruntime-inference-examples\c_cxx\squeezenet
.\run_capi_application.bat D:\onnxruntime-win-x64-gpu-1.13.1.zip D:\repos\onnxruntime-inference-examples\c_cxx\squeezenet
```
3. Or you can manully run cmake and remember to download squeezenet onnx model.

0 comments on commit c66d7e0

Please sign in to comment.