From 3987276e596356271c5c71263097db5fb63c6438 Mon Sep 17 00:00:00 2001
From: speech_asr <wucong.lyb@alibaba-inc.com>
Date: 星期三, 20 三月 2024 10:49:21 +0800
Subject: [PATCH] add C10_USE_GLOG for paraformer-torch

---
 runtime/onnxruntime/src/offline-stream.cpp |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/runtime/onnxruntime/src/offline-stream.cpp b/runtime/onnxruntime/src/offline-stream.cpp
index abe13ae..9a3b07a 100644
--- a/runtime/onnxruntime/src/offline-stream.cpp
+++ b/runtime/onnxruntime/src/offline-stream.cpp
@@ -38,6 +38,10 @@
         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