Просмотр исходного кода

Merge pull request #344 from alibaba-damo-academy/dev_tmp

fix cpu decoding
zhifu gao 2 лет назад
Родитель
Сommit
a793038752

+ 3 - 0
funasr/bin/asr_inference_launch.py

@@ -2,6 +2,9 @@
 # Copyright ESPnet (https://github.com/espnet/espnet). All Rights Reserved.
 #  Apache 2.0  (http://www.apache.org/licenses/LICENSE-2.0)
 
+import torch
+torch.set_num_threads(1)
+
 import argparse
 import logging
 import os

+ 3 - 0
funasr/bin/diar_inference_launch.py

@@ -2,6 +2,9 @@
 # Copyright FunASR (https://github.com/alibaba-damo-academy/FunASR). All Rights Reserved.
 #  MIT License  (https://opensource.org/licenses/MIT)
 
+import torch
+torch.set_num_threads(1)
+
 import argparse
 import logging
 import os

+ 3 - 0
funasr/bin/lm_inference_launch.py

@@ -2,6 +2,9 @@
 # Copyright ESPnet (https://github.com/espnet/espnet). All Rights Reserved.
 #  Apache 2.0  (http://www.apache.org/licenses/LICENSE-2.0)
 
+import torch
+torch.set_num_threads(1)
+
 import argparse
 import logging
 import os

+ 3 - 0
funasr/bin/punc_inference_launch.py

@@ -2,6 +2,9 @@
 # Copyright ESPnet (https://github.com/espnet/espnet). All Rights Reserved.
 #  Apache 2.0  (http://www.apache.org/licenses/LICENSE-2.0)
 
+import torch
+torch.set_num_threads(1)
+
 import argparse
 import logging
 import os

+ 3 - 0
funasr/bin/sv_inference_launch.py

@@ -2,6 +2,9 @@
 # Copyright FunASR (https://github.com/alibaba-damo-academy/FunASR). All Rights Reserved.
 #  MIT License  (https://opensource.org/licenses/MIT)
 
+import torch
+torch.set_num_threads(1)
+
 import argparse
 import logging
 import os

+ 3 - 0
funasr/bin/tp_inference_launch.py

@@ -2,6 +2,9 @@
 # Copyright ESPnet (https://github.com/espnet/espnet). All Rights Reserved.
 #  Apache 2.0  (http://www.apache.org/licenses/LICENSE-2.0)
 
+import torch
+torch.set_num_threads(1)
+
 import argparse
 import logging
 import os

+ 3 - 0
funasr/bin/vad_inference_launch.py

@@ -2,6 +2,9 @@
 # Copyright ESPnet (https://github.com/espnet/espnet). All Rights Reserved.
 #  Apache 2.0  (http://www.apache.org/licenses/LICENSE-2.0)
 
+import torch
+torch.set_num_threads(1)
+
 import argparse
 import logging
 import os