resolve profile penalty during GPU inference (sensevoice) - #1868
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a performance issue in SenseVoice GPU inference where profiling was always enabled, forcing synchronous execution on CUDA.
Changes:
- Only call
set_profile_mode()whenprofile=True. - Use
ailia.PROFILE_AVERAGEinstead ofTruefor the profile mode argument.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
kyakuno
approved these changes
Jun 2, 2026
Collaborator
|
なるほどです!対応、ありがとうございます。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SenseVoice の CUDA 推論が CPU よりも遅い問題に対処する RP です。
SenseVoice の推論スクリプトに
--profileオプションを指定しない場合も ailia のインスタンスを作成する際にset_profile_mode()を呼んで同期実行モードで動いている問題がありました。i7-11700 + NVIDIA RTX PRO 4000 Blackwell の環境で
--benchmark -i rd1457.mp3 -e 2( rd1457.mp3 ) 引数で推論した場合の消費時間が次のように変化し、評価環境では CPU よりも CUDA(FP32) の方が高速になります。-e 0)