From 7c4a0666c0e2666b5e9b3aac17d74910d8e9b4a1 Mon Sep 17 00:00:00 2001
From: Yabin Li <wucong.lyb@alibaba-inc.com>
Date: 星期二, 09 五月 2023 18:35:07 +0800
Subject: [PATCH] Merge pull request #481 from zhaomingwork/update-websocket-cpp
---
funasr/bin/sond_inference.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/funasr/bin/sond_inference.py b/funasr/bin/sond_inference.py
index 5a0a8e2..c55bc35 100755
--- a/funasr/bin/sond_inference.py
+++ b/funasr/bin/sond_inference.py
@@ -252,6 +252,8 @@
**kwargs,
):
assert check_argument_types()
+ ncpu = kwargs.get("ncpu", 1)
+ torch.set_num_threads(ncpu)
if batch_size > 1:
raise NotImplementedError("batch decoding is not implemented")
if ngpu > 1:
--
Gitblit v1.9.1