From 77a7b40a7c98c102ec83d93de633179582e3b29e Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期一, 13 三月 2023 18:32:19 +0800
Subject: [PATCH] readme
---
funasr/runtime/onnxruntime/readme.md | 7 ++++++-
funasr/runtime/onnxruntime/third_party/install_openblas.sh | 39 +++++++++++++++++++++++++++++++++++++++
docs/images/damo.png | 0
3 files changed, 45 insertions(+), 1 deletions(-)
diff --git a/docs/images/damo.png b/docs/images/damo.png
index f4f7a89..4e692ed 100644
--- a/docs/images/damo.png
+++ b/docs/images/damo.png
Binary files differ
diff --git a/funasr/runtime/onnxruntime/readme.md b/funasr/runtime/onnxruntime/readme.md
index b47326b..20b4a37 100644
--- a/funasr/runtime/onnxruntime/readme.md
+++ b/funasr/runtime/onnxruntime/readme.md
@@ -29,6 +29,7 @@
## 渚濊禆
- fftw3
+- openblas
- onnxruntime
## 瀵煎嚭onnx鏍煎紡妯″瀷鏂囦欢
@@ -58,7 +59,11 @@
# onnxruntime-linux-x64-1.14.0 onnxruntime-linux-x64-1.14.0.tgz
#install fftw3-dev
-apt install libfftw3-dev
+ubuntu: apt install libfftw3-dev
+centos: yum install fftw fftw-devel
+
+#install openblas
+bash ./third_party/install_openblas.sh
# build
cmake -DCMAKE_BUILD_TYPE=release .. -DONNXRUNTIME_DIR=/mnt/c/Users/ma139/RapidASR/cpp_onnx/build/onnxruntime-linux-x64-1.14.0
diff --git a/funasr/runtime/onnxruntime/third_party/install_openblas.sh b/funasr/runtime/onnxruntime/third_party/install_openblas.sh
new file mode 100644
index 0000000..4a41012
--- /dev/null
+++ b/funasr/runtime/onnxruntime/third_party/install_openblas.sh
@@ -0,0 +1,39 @@
+#!/usr/bin/env bash
+
+OPENBLAS_VERSION=0.3.13
+
+WGET=${WGET:-wget}
+
+set -e
+
+if ! command -v gfortran 2>/dev/null; then
+ echo "$0: gfortran is not installed. Please install it, e.g. by:"
+ echo " apt-get install gfortran"
+ echo "(if on Debian or Ubuntu), or:"
+ echo " yum install gcc-gfortran"
+ echo "(if on RedHat/CentOS). On a Mac, if brew is installed, it's:"
+ echo " brew install gfortran"
+ exit 1
+fi
+
+
+tarball=OpenBLAS-$OPENBLAS_VERSION.tar.gz
+
+rm -rf xianyi-OpenBLAS-* OpenBLAS OpenBLAS-*.tar.gz
+
+if [ -d "$DOWNLOAD_DIR" ]; then
+ cp -p "$DOWNLOAD_DIR/$tarball" .
+else
+ url=$($WGET -qO- "https://api.github.com/repos/xianyi/OpenBLAS/releases/tags/v${OPENBLAS_VERSION}" | python -c 'import sys,json;print(json.load(sys.stdin)["tarball_url"])')
+ test -n "$url"
+ $WGET -t3 -nv -O $tarball "$url"
+fi
+
+tar xzf $tarball
+mv xianyi-OpenBLAS-* OpenBLAS
+
+make PREFIX=$(pwd)/OpenBLAS/install USE_LOCKING=1 USE_THREAD=0 -C OpenBLAS all install
+if [ $? -eq 0 ]; then
+ echo "OpenBLAS is installed successfully."
+ rm $tarball
+fi
\ No newline at end of file
--
Gitblit v1.9.1