From 635496708826c5a77110d83d5e7e03f6e6354c72 Mon Sep 17 00:00:00 2001
From: zhifu gao <zhifu.gzf@alibaba-inc.com>
Date: 星期六, 29 四月 2023 00:57:32 +0800
Subject: [PATCH] Merge pull request #444 from zhaomingwork/add-offline-websocket-srv
---
funasr/bin/lm_inference.py | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/funasr/bin/lm_inference.py b/funasr/bin/lm_inference.py
index 15c56ca..76de6df 100644
--- a/funasr/bin/lm_inference.py
+++ b/funasr/bin/lm_inference.py
@@ -89,10 +89,9 @@
**kwargs,
):
assert check_argument_types()
- logging.basicConfig(
- level=log_level,
- format="%(asctime)s (%(module)s:%(lineno)d) %(levelname)s: %(message)s",
- )
+ ncpu = kwargs.get("ncpu", 1)
+ torch.set_num_threads(ncpu)
+
if ngpu >= 1 and torch.cuda.is_available():
device = "cuda"
--
Gitblit v1.9.1