From 7f51f6108eb0c92fa01d0bfc3592fbb8fc8ee838 Mon Sep 17 00:00:00 2001
From: 雾聪 <wucong.lyb@alibaba-inc.com>
Date: 星期二, 26 三月 2024 16:02:36 +0800
Subject: [PATCH] add bladedisc for funasr-onnx-offline
---
runtime/onnxruntime/src/offline-stream.cpp | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/runtime/onnxruntime/src/offline-stream.cpp b/runtime/onnxruntime/src/offline-stream.cpp
index 8941a05..9a3b07a 100644
--- a/runtime/onnxruntime/src/offline-stream.cpp
+++ b/runtime/onnxruntime/src/offline-stream.cpp
@@ -36,7 +36,13 @@
string seg_dict_path;
if(use_gpu){
+ #ifdef USE_GPU
asr_handle = make_unique<ParaformerTorch>();
+ #else
+ LOG(ERROR) <<"GPU is not supported! CPU will be used! If you want to use GPU, please add -DGPU=ON when cmake";
+ asr_handle = make_unique<Paraformer>();
+ use_gpu = false;
+ #endif
}else{
asr_handle = make_unique<Paraformer>();
}
--
Gitblit v1.9.1