modelscope / FunASR

A Fundamental End-to-End Speech Recognition Toolkit and Open Source SOTA Pretrained Models, Supporting Speech Recognition, Voice Activity Detection, Text Post-processing etc.
https://www.funasr.com
Other
6.17k stars 657 forks source link

请教cpp如何设置 decoder-thread-num io-thread-num 最大化利用CPU算力? #1048

Closed mdys closed 11 months ago

mdys commented 11 months ago

感谢大佬,我这边是离线语音转文字场景,服务器配置为 一台 Intel(R) Xeon(R) Platinum 8352Y CPU @ 2.20GHz 32核心 64线程 X2 也就是 64核心 128线程。 想最大化利用CPU算力我这边 使用 /workspace/FunASR/funasr/runtime/websocket/build/bin/funasr-wss-server --model-dir /workspace/models/damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-onnx --punc-dir /workspace/models/damo/punc_ct-transformer_zh-cn-common-vocab272727-onnx --vad-dir /workspace/models/damo/speech_fsmn_vad_zh-cn-16k-common-onnx --decoder-thread-num 64 --io-thread-num 32
设置为多少能最大化利用呢? 试过设置 128 ,可性能还不如64 。 经过长久测试 就 只能64跑的最快了。。是不是只能按核心算最大进程 而不能算线程? 比较困惑 为何 不能利用 128线程?CPU占用率 也长久低于50% 。也就是只利用了一颗CPU 。

e456ed4dc4430ada71805ab756067ed5 9868d3ea64b431359d5f13ec00a903be

LauraGPT commented 11 months ago

The performance ranges to the cpu. We suggest you to test it on you cpu for a range of configurations. Generally speaking, the optimal concurrency performance is equal to the number of CPU threads.