Skip to content

Commit

Permalink
Support onnxruntime 1.16.0 (#330)
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj authored Sep 21, 2023
1 parent b640c29 commit cf199ad
Show file tree
Hide file tree
Showing 27 changed files with 139 additions and 119 deletions.
1 change: 1 addition & 0 deletions .github/workflows/apk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,4 @@ jobs:
with:
file_glob: true
file: apks/*.apk
overwrite: true
10 changes: 5 additions & 5 deletions .github/workflows/arm-linux-gnueabihf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
uses: actions/cache@v3
with:
path: toolchain
key: gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf
key: gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf

- name: Download toolchain
if: steps.cache-toolchain.outputs.cache-hit != 'true'
Expand All @@ -87,19 +87,19 @@ jobs:
ls -lh arm-linux-gcc
mkdir $GITHUB_WORKSPACE/toolchain
tar xvf ./arm-linux-gcc/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.xz --strip-components 1 -C $GITHUB_WORKSPACE/toolchain
tar xvf ./arm-linux-gcc/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz --strip-components 1 -C $GITHUB_WORKSPACE/toolchain
- name: Display toolchain info
shell: bash
run: |
export PATH=$GITHUB_WORKSPACE/toolchain/bin:$PATH
arm-linux-gnueabihf-gcc --version
arm-none-linux-gnueabihf-gcc --version
- name: Display qemu-arm -h
shell: bash
run: |
export PATH=$GITHUB_WORKSPACE/qemu-install/bin:$PATH
export QEMU_LD_PREFIX=$GITHUB_WORKSPACE/toolchain/arm-linux-gnueabihf/libc
export QEMU_LD_PREFIX=$GITHUB_WORKSPACE/toolchain/arm-none-linux-gnueabihf/libc
qemu-arm -h
- name: build arm-linux-gnueabihf
Expand All @@ -119,7 +119,7 @@ jobs:
run: |
export PATH=$GITHUB_WORKSPACE/toolchain/bin:$PATH
export PATH=$GITHUB_WORKSPACE/qemu-install/bin:$PATH
export QEMU_LD_PREFIX=$GITHUB_WORKSPACE/toolchain/arm-linux-gnueabihf/libc
export QEMU_LD_PREFIX=$GITHUB_WORKSPACE/toolchain/arm-none-linux-gnueabihf/libc
ls -lh ./build-arm-linux-gnueabihf/bin
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/export-whisper-to-onnx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Install dependencies
shell: bash
run: |
python3 -m pip install openai-whisper torch onnxruntime==1.15.1 onnx
python3 -m pip install openai-whisper torch onnxruntime onnx
- name: export ${{ matrix.model }}
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
project(sherpa-onnx)

set(SHERPA_ONNX_VERSION "1.7.16")
set(SHERPA_ONNX_VERSION "1.7.17")

# Disable warning about
#
Expand Down
2 changes: 1 addition & 1 deletion build-android-arm64-v8a.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ fi

echo "ANDROID_NDK: $ANDROID_NDK"
sleep 1
onnxruntime_version=v1.15.1
onnxruntime_version=v1.16.0

if [ ! -f ./android-onnxruntime-libs/$onnxruntime_version/jni/arm64-v8a/libonnxruntime.so ]; then
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/android-onnxruntime-libs
Expand Down
2 changes: 1 addition & 1 deletion build-android-armv7-eabi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fi
echo "ANDROID_NDK: $ANDROID_NDK"
sleep 1

onnxruntime_version=v1.15.1
onnxruntime_version=v1.16.0

if [ ! -f ./android-onnxruntime-libs/$onnxruntime_version/jni/armeabi-v7a/libonnxruntime.so ]; then
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/android-onnxruntime-libs
Expand Down
2 changes: 1 addition & 1 deletion build-android-x86-64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fi
echo "ANDROID_NDK: $ANDROID_NDK"
sleep 1

onnxruntime_version=v1.15.1
onnxruntime_version=v1.16.0

if [ ! -f ./android-onnxruntime-libs/$onnxruntime_version/jni/x86_64/libonnxruntime.so ]; then
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/android-onnxruntime-libs
Expand Down
2 changes: 1 addition & 1 deletion build-android-x86.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fi
echo "ANDROID_NDK: $ANDROID_NDK"
sleep 1

onnxruntime_version=v1.15.1
onnxruntime_version=v1.16.0

if [ ! -f ./android-onnxruntime-libs/$onnxruntime_version/jni/x86/libonnxruntime.so ]; then
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/android-onnxruntime-libs
Expand Down
6 changes: 6 additions & 0 deletions build-arm-linux-gnueabihf.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/usr/bin/env bash

if command -v arm-none-linux-gnueabihf-gcc &> /dev/null; then
ln -svf $(which arm-none-linux-gnueabihf-gcc) ./arm-linux-gnueabihf-gcc
ln -svf $(which arm-none-linux-gnueabihf-g++) ./arm-linux-gnueabihf-g++
export PATH=$PWD:$PATH
fi

if ! command -v arm-linux-gnueabihf-gcc &> /dev/null; then
echo "Please install a toolchain for cross-compiling."
echo "You can refer to: "
Expand Down
11 changes: 8 additions & 3 deletions build-ios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@ set -e
dir=build-ios
mkdir -p $dir
cd $dir
onnxruntime_version=1.15.1
onnxruntime_version=1.16.0

if [ ! -f ios-onnxruntime/$onnxruntime_version/onnxruntime.xcframework/ios-arm64/onnxruntime.a ]; then
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/ios-onnxruntime
if [ ! -d ios-onnxruntime ]; then
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/ios-onnxruntime
fi

pushd ios-onnxruntime
ln -s $onnxruntime_version/onnxruntime.xcframework .
git pull

ln -sf $onnxruntime_version/onnxruntime.xcframework .
git lfs pull --include $onnxruntime_version/onnxruntime.xcframework/ios-arm64/onnxruntime.a
git lfs pull --include $onnxruntime_version/onnxruntime.xcframework/ios-arm64_x86_64-simulator/onnxruntime.a
popd
Expand Down
16 changes: 8 additions & 8 deletions cmake/onnxruntime-linux-aarch64.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ if(NOT CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64)
message(FATAL_ERROR "This file is for aarch64 only. Given: ${CMAKE_SYSTEM_PROCESSOR}")
endif()

set(onnxruntime_URL "https://github.com/microsoft/onnxruntime/releases/download/v1.15.1/onnxruntime-linux-aarch64-1.15.1.tgz")
set(onnxruntime_URL2 "https://huggingface.co/csukuangfj/sherpa-onnx-cmake-deps/resolve/main/onnxruntime-linux-aarch64-1.15.1.tgz")
set(onnxruntime_HASH "SHA256=85272e75d8dd841138de4b774a9672ea93c1be108d96038c6c34a62d7f976aee")
set(onnxruntime_URL "https://huggingface.co/csukuangfj/sherpa-onnx-cmake-deps/resolve/main/onnxruntime-linux-aarch64-1.16.0.tgz")
set(onnxruntime_URL2 )
set(onnxruntime_HASH "SHA256=8b15781d974803203c09df7d52c84d8c9f1ac7d949a97f515e4d2f5dc978d8af")

# If you don't have access to the Internet,
# please download onnxruntime to one of the following locations.
# You can add more if you want.
set(possible_file_locations
$ENV{HOME}/Downloads/onnxruntime-linux-aarch64-1.15.1.tgz
${PROJECT_SOURCE_DIR}/onnxruntime-linux-aarch64-1.15.1.tgz
${PROJECT_BINARY_DIR}/onnxruntime-linux-aarch64-1.15.1.tgz
/tmp/onnxruntime-linux-aarch64-1.15.1.tgz
/star-fj/fangjun/download/github/onnxruntime-linux-aarch64-1.15.1.tgz
$ENV{HOME}/Downloads/onnxruntime-linux-aarch64-1.16.0.tgz
${PROJECT_SOURCE_DIR}/onnxruntime-linux-aarch64-1.16.0.tgz
${PROJECT_BINARY_DIR}/onnxruntime-linux-aarch64-1.16.0.tgz
/tmp/onnxruntime-linux-aarch64-1.16.0.tgz
/star-fj/fangjun/download/github/onnxruntime-linux-aarch64-1.16.0.tgz
)

foreach(f IN LISTS possible_file_locations)
Expand Down
16 changes: 8 additions & 8 deletions cmake/onnxruntime-linux-arm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ if(NOT CMAKE_SYSTEM_PROCESSOR STREQUAL arm)
message(FATAL_ERROR "This file is for arm only. Given: ${CMAKE_SYSTEM_PROCESSOR}")
endif()

set(onnxruntime_URL "https://huggingface.co/csukuangfj/onnxruntime-libs/resolve/main/onnxruntime-linux-arm-1.15.1.zip")
set(onnxruntime_URL2 "https://huggingface.co/csukuangfj/sherpa-onnx-cmake-deps/resolve/main/onnxruntime-linux-arm-1.15.1.zip")
set(onnxruntime_HASH "SHA256=867b96210a347e4b1bb949e7c9a3f222371ea0c00c9deaaba9fdd66c689f7fb7")
set(onnxruntime_URL "https://huggingface.co/csukuangfj/onnxruntime-libs/resolve/main/onnxruntime-linux-arm-1.16.0.zip")
set(onnxruntime_URL2 )
set(onnxruntime_HASH "SHA256=0a63ea99fbba3ee399d6626c36752844ae93ae19bab30e4bf00d45cc8a13da02")

# If you don't have access to the Internet,
# please download onnxruntime to one of the following locations.
# You can add more if you want.
set(possible_file_locations
$ENV{HOME}/Downloads/onnxruntime-linux-arm-1.15.1.zip
${PROJECT_SOURCE_DIR}/onnxruntime-linux-arm-1.15.1.zip
${PROJECT_BINARY_DIR}/onnxruntime-linux-arm-1.15.1.zip
/tmp/onnxruntime-linux-arm-1.15.1.zip
/star-fj/fangjun/download/github/onnxruntime-linux-arm-1.15.1.zip
$ENV{HOME}/Downloads/onnxruntime-linux-arm-1.16.0.zip
${PROJECT_SOURCE_DIR}/onnxruntime-linux-arm-1.16.0.zip
${PROJECT_BINARY_DIR}/onnxruntime-linux-arm-1.16.0.zip
/tmp/onnxruntime-linux-arm-1.16.0.zip
/star-fj/fangjun/download/github/onnxruntime-linux-arm-1.16.0.zip
)

foreach(f IN LISTS possible_file_locations)
Expand Down
16 changes: 8 additions & 8 deletions cmake/onnxruntime-linux-x86_64-gpu.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ if(NOT SHERPA_ONNX_ENABLE_GPU)
message(FATAL_ERROR "This file is for NVIDIA GPU only. Given SHERPA_ONNX_ENABLE_GPU: ${SHERPA_ONNX_ENABLE_GPU}")
endif()

set(onnxruntime_URL "https://github.com/microsoft/onnxruntime/releases/download/v1.15.1/onnxruntime-linux-x64-gpu-1.15.1.tgz")
set(onnxruntime_URL2 "https://huggingface.co/csukuangfj/sherpa-onnx-cmake-deps/resolve/main/onnxruntime-linux-x64-gpu-1.15.1.tgz")
set(onnxruntime_HASH "SHA256=eab891393025edd5818d1aa26a42860e5739fcc49e3ca3f876110ec8736fe7f1")
set(onnxruntime_URL "https://huggingface.co/csukuangfj/sherpa-onnx-cmake-deps/resolve/main/onnxruntime-linux-x64-gpu-1.16.0.tgz")
set(onnxruntime_URL2 )
set(onnxruntime_HASH "SHA256=f9cbf3d711f46d7e03ea43746ee9d1c7d8e82c171a4655f6591dd4d1ba1b9ec7")

# If you don't have access to the Internet,
# please download onnxruntime to one of the following locations.
# You can add more if you want.
set(possible_file_locations
$ENV{HOME}/Downloads/onnxruntime-linux-x64-gpu-1.15.1.tgz
${PROJECT_SOURCE_DIR}/onnxruntime-linux-x64-gpu-1.15.1.tgz
${PROJECT_BINARY_DIR}/onnxruntime-linux-x64-gpu-1.15.1.tgz
/tmp/onnxruntime-linux-x64-gpu-1.15.1.tgz
/star-fj/fangjun/download/github/onnxruntime-linux-x64-gpu-1.15.1.tgz
$ENV{HOME}/Downloads/onnxruntime-linux-x64-gpu-1.16.0.tgz
${PROJECT_SOURCE_DIR}/onnxruntime-linux-x64-gpu-1.16.0.tgz
${PROJECT_BINARY_DIR}/onnxruntime-linux-x64-gpu-1.16.0.tgz
/tmp/onnxruntime-linux-x64-gpu-1.16.0.tgz
/star-fj/fangjun/download/github/onnxruntime-linux-x64-gpu-1.16.0.tgz
)

foreach(f IN LISTS possible_file_locations)
Expand Down
19 changes: 8 additions & 11 deletions cmake/onnxruntime-linux-x86_64-static.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,19 @@ if(BUILD_SHARED_LIBS)
message(FATAL_ERROR "This file is for building static libraries. BUILD_SHARED_LIBS: ${BUILD_SHARED_LIBS}")
endif()

# TODO(fangjun): update the URL
set(onnxruntime_URL "https://huggingface.co/csukuangfj/sherpa-onnx-cmake-deps/resolve/main/onnxruntime-linux-x64-static_lib-1.15.1.tgz")
set(onnxruntime_URL2 "https://huggingface.co/csukuangfj/sherpa-onnx-cmake-deps/resolve/main/onnxruntime-linux-x64-static_lib-1.15.1.tgz")
set(onnxruntime_HASH "SHA256=b64fcf4115e3d02193c7406461d582703ccc1f0c24ad320ef74b07e5f71681c6")
set(onnxruntime_URL "https://huggingface.co/csukuangfj/sherpa-onnx-cmake-deps/resolve/main/onnxruntime-linux-x64-static_lib-1.16.0.tgz")
set(onnxruntime_URL2 )
set(onnxruntime_HASH "SHA256=a36e989c9a07f12bf16f63acb2217b02a0cf4ac75aa7bc27de76ae08706a5c1f")

# If you don't have access to the Internet,
# please download onnxruntime to one of the following locations.
# You can add more if you want.
set(possible_file_locations
${PROJECT_SOURCE_DIR}/onnxruntime-linux-x64-static_lib-1.15.1.tgz

$ENV{HOME}/Downloads/onnxruntime-linux-x64-static_lib-1.15.1.tgz
${PROJECT_SOURCE_DIR}/onnxruntime-linux-x64-static_lib-1.15.1.tgz
${PROJECT_BINARY_DIR}/onnxruntime-linux-x64-static_lib-1.15.1.tgz
/tmp/onnxruntime-linux-x64-static_lib-1.15.1.tgz
/star-fj/fangjun/download/github/onnxruntime-linux-x64-static_lib-1.15.1.tgz
$ENV{HOME}/Downloads/onnxruntime-linux-x64-static_lib-1.16.0.tgz
${PROJECT_SOURCE_DIR}/onnxruntime-linux-x64-static_lib-1.16.0.tgz
${PROJECT_BINARY_DIR}/onnxruntime-linux-x64-static_lib-1.16.0.tgz
/tmp/onnxruntime-linux-x64-static_lib-1.16.0.tgz
/star-fj/fangjun/download/github/onnxruntime-linux-x64-static_lib-1.16.0.tgz
)

foreach(f IN LISTS possible_file_locations)
Expand Down
16 changes: 8 additions & 8 deletions cmake/onnxruntime-linux-x86_64.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ if(NOT BUILD_SHARED_LIBS)
message(FATAL_ERROR "This file is for building shared libraries. BUILD_SHARED_LIBS: ${BUILD_SHARED_LIBS}")
endif()

set(onnxruntime_URL "https://github.com/microsoft/onnxruntime/releases/download/v1.15.1/onnxruntime-linux-x64-1.15.1.tgz")
set(onnxruntime_URL2 "https://huggingface.co/csukuangfj/sherpa-onnx-cmake-deps/resolve/main/onnxruntime-linux-x64-1.15.1.tgz")
set(onnxruntime_HASH "SHA256=5492f9065f87538a286fb04c8542e9ff7950abb2ea6f8c24993a940006787d87")
set(onnxruntime_URL "https://huggingface.co/csukuangfj/sherpa-onnx-cmake-deps/resolve/main/onnxruntime-linux-x64-1.16.0.tgz")
set(onnxruntime_URL2 )
set(onnxruntime_HASH "SHA256=02bcd1e4fef295dacc3b232774efeaa0a83527f439f29147c3badade4df1f6dc")

# If you don't have access to the Internet,
# please download onnxruntime to one of the following locations.
# You can add more if you want.
set(possible_file_locations
$ENV{HOME}/Downloads/onnxruntime-linux-x64-1.15.1.tgz
${PROJECT_SOURCE_DIR}/onnxruntime-linux-x64-1.15.1.tgz
${PROJECT_BINARY_DIR}/onnxruntime-linux-x64-1.15.1.tgz
/tmp/onnxruntime-linux-x64-1.15.1.tgz
/star-fj/fangjun/download/github/onnxruntime-linux-x64-1.15.1.tgz
$ENV{HOME}/Downloads/onnxruntime-linux-x64-1.16.0.tgz
${PROJECT_SOURCE_DIR}/onnxruntime-linux-x64-1.16.0.tgz
${PROJECT_BINARY_DIR}/onnxruntime-linux-x64-1.16.0.tgz
/tmp/onnxruntime-linux-x64-1.16.0.tgz
/star-fj/fangjun/download/github/onnxruntime-linux-x64-1.16.0.tgz
)

foreach(f IN LISTS possible_file_locations)
Expand Down
14 changes: 7 additions & 7 deletions cmake/onnxruntime-osx-arm64.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
message(FATAL_ERROR "This file is for macOS only. Given: ${CMAKE_SYSTEM_NAME}")
endif()

set(onnxruntime_URL "https://github.com/microsoft/onnxruntime/releases/download/v1.15.1/onnxruntime-osx-arm64-1.15.1.tgz")
set(onnxruntime_URL2 "https://huggingface.co/csukuangfj/sherpa-onnx-cmake-deps/resolve/main/onnxruntime-osx-arm64-1.15.1.tgz")
set(onnxruntime_HASH "SHA256=df97832fc7907c6677a6da437f92339d84a462becb74b1d65217fcb859ee9460")
set(onnxruntime_URL "https://huggingface.co/csukuangfj/sherpa-onnx-cmake-deps/resolve/main/onnxruntime-osx-arm64-1.16.0.tgz")
set(onnxruntime_URL2 )
set(onnxruntime_HASH "SHA256=fec3b70ca4f642a5c6d5c3a6f3a4eddd4c1b9281893fe2c7ae03a3086e20c316")

# If you don't have access to the Internet,
# please download onnxruntime to one of the following locations.
# You can add more if you want.
set(possible_file_locations
$ENV{HOME}/Downloads/onnxruntime-osx-arm64-1.15.1.tgz
${PROJECT_SOURCE_DIR}/onnxruntime-osx-arm64-1.15.1.tgz
${PROJECT_BINARY_DIR}/onnxruntime-osx-arm64-1.15.1.tgz
/tmp/onnxruntime-osx-arm64-1.15.1.tgz
$ENV{HOME}/Downloads/onnxruntime-osx-arm64-1.16.0.tgz
${PROJECT_SOURCE_DIR}/onnxruntime-osx-arm64-1.16.0.tgz
${PROJECT_BINARY_DIR}/onnxruntime-osx-arm64-1.16.0.tgz
/tmp/onnxruntime-osx-arm64-1.16.0.tgz
)

foreach(f IN LISTS possible_file_locations)
Expand Down
14 changes: 7 additions & 7 deletions cmake/onnxruntime-osx-universal.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
message(FATAL_ERROR "This file is for macOS only. Given: ${CMAKE_SYSTEM_NAME}")
endif()

set(onnxruntime_URL "https://github.com/microsoft/onnxruntime/releases/download/v1.15.1/onnxruntime-osx-universal2-1.15.1.tgz")
set(onnxruntime_URL2 "https://huggingface.co/csukuangfj/sherpa-onnx-cmake-deps/resolve/main/onnxruntime-osx-universal2-1.15.1.tgz")
set(onnxruntime_HASH "SHA256=ecb7651c216fe6ffaf4c578e135d98341bc5bc944c5dc6b725ef85b0d7747be0")
set(onnxruntime_URL "https://huggingface.co/csukuangfj/sherpa-onnx-cmake-deps/resolve/main/onnxruntime-osx-universal2-1.16.0.tgz")
set(onnxruntime_URL2 )
set(onnxruntime_HASH "SHA256=e5b69ece634cf1cd5cf4b45ab478417199a5e8ab5775f6f12560e09dc5ef7749")

# If you don't have access to the Internet,
# please download onnxruntime to one of the following locations.
# You can add more if you want.
set(possible_file_locations
$ENV{HOME}/Downloads/onnxruntime-osx-universal2-1.15.1.tgz
${PROJECT_SOURCE_DIR}/onnxruntime-osx-universal2-1.15.1.tgz
${PROJECT_BINARY_DIR}/onnxruntime-osx-universal2-1.15.1.tgz
/tmp/onnxruntime-osx-universal2-1.15.1.tgz
$ENV{HOME}/Downloads/onnxruntime-osx-universal2-1.16.0.tgz
${PROJECT_SOURCE_DIR}/onnxruntime-osx-universal2-1.16.0.tgz
${PROJECT_BINARY_DIR}/onnxruntime-osx-universal2-1.16.0.tgz
/tmp/onnxruntime-osx-universal2-1.16.0.tgz
)

foreach(f IN LISTS possible_file_locations)
Expand Down
14 changes: 7 additions & 7 deletions cmake/onnxruntime-osx-x86_64.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
message(FATAL_ERROR "This file is for macOS only. Given: ${CMAKE_SYSTEM_NAME}")
endif()

set(onnxruntime_URL "https://github.com/microsoft/onnxruntime/releases/download/v1.15.1/onnxruntime-osx-x86_64-1.15.1.tgz")
set(onnxruntime_URL2 "https://huggingface.co/csukuangfj/sherpa-onnx-cmake-deps/resolve/main/onnxruntime-osx-x86_64-1.15.1.tgz")
set(onnxruntime_HASH "SHA256=4b66ebbca24b8b96f6b74655fee3610a7e529b4e01f6790632f24ee82b778e5a")
set(onnxruntime_URL "https://huggingface.co/csukuangfj/sherpa-onnx-cmake-deps/resolve/main/onnxruntime-osx-x86_64-1.16.0.tgz")
set(onnxruntime_URL2 )
set(onnxruntime_HASH "SHA256=3d639a269af4e97a455f23cff363a709ef3a5f3e086162e65e3395c339122285")

# If you don't have access to the Internet,
# please download onnxruntime to one of the following locations.
# You can add more if you want.
set(possible_file_locations
$ENV{HOME}/Downloads/onnxruntime-osx-x86_64-1.15.1.tgz
${PROJECT_SOURCE_DIR}/onnxruntime-osx-x86_64-1.15.1.tgz
${PROJECT_BINARY_DIR}/onnxruntime-osx-x86_64-1.15.1.tgz
/tmp/onnxruntime-osx-x86_64-1.15.1.tgz
$ENV{HOME}/Downloads/onnxruntime-osx-x86_64-1.16.0.tgz
${PROJECT_SOURCE_DIR}/onnxruntime-osx-x86_64-1.16.0.tgz
${PROJECT_BINARY_DIR}/onnxruntime-osx-x86_64-1.16.0.tgz
/tmp/onnxruntime-osx-x86_64-1.16.0.tgz
)

foreach(f IN LISTS possible_file_locations)
Expand Down
14 changes: 7 additions & 7 deletions cmake/onnxruntime-win-x64-gpu.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ if(NOT SHERPA_ONNX_ENABLE_GPU)
message(FATAL_ERROR "This file is for NVIDIA GPU only. Given SHERPA_ONNX_ENABLE_GPU: ${SHERPA_ONNX_ENABLE_GPU}")
endif()

set(onnxruntime_URL "https://github.com/microsoft/onnxruntime/releases/download/v1.15.1/onnxruntime-win-x64-gpu-1.15.1.zip")
set(onnxruntime_URL2 "https://huggingface.co/csukuangfj/sherpa-onnx-cmake-deps/resolve/main/onnxruntime-win-x64-gpu-1.15.1.zip")
set(onnxruntime_HASH "SHA256=dcc3a385b415dd2e4a813018b71da5085d9b97774552edf17947826a255a3732")
set(onnxruntime_URL "https://github.com/microsoft/onnxruntime/releases/download/v1.16.0/onnxruntime-win-x64-gpu-1.16.0.zip")
set(onnxruntime_URL2 "https://huggingface.co/csukuangfj/sherpa-onnx-cmake-deps/resolve/main/onnxruntime-win-x64-gpu-1.16.0.zip")
set(onnxruntime_HASH "SHA256=2a824d2a98fe7328980fcd27016fe797137f7050b047eecf3a3f6b82a24f63c1")

# If you don't have access to the Internet,
# please download onnxruntime to one of the following locations.
# You can add more if you want.
set(possible_file_locations
$ENV{HOME}/Downloads/onnxruntime-win-x64-gpu-1.15.1.zip
${PROJECT_SOURCE_DIR}/onnxruntime-win-x64-gpu-1.15.1.zip
${PROJECT_BINARY_DIR}/onnxruntime-win-x64-gpu-1.15.1.zip
/tmp/onnxruntime-win-x64-gpu-1.15.1.zip
$ENV{HOME}/Downloads/onnxruntime-win-x64-gpu-1.16.0.zip
${PROJECT_SOURCE_DIR}/onnxruntime-win-x64-gpu-1.16.0.zip
${PROJECT_BINARY_DIR}/onnxruntime-win-x64-gpu-1.16.0.zip
/tmp/onnxruntime-win-x64-gpu-1.16.0.zip
)

foreach(f IN LISTS possible_file_locations)
Expand Down
Loading

0 comments on commit cf199ad

Please sign in to comment.