Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set number of OpenBLAS threads #1414

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

johngebbie
Copy link
Contributor

This sets the number of openblas threads in case openblas wasn't compiled with USE_LOCKING=1 USE_THREAD=0.

This slightly nicer version is untested, but simply adding the #include and openblas_set_num_threads(1); is what I patched for Alpine.

@johngebbie johngebbie marked this pull request as draft July 16, 2023 14:22
@johngebbie johngebbie marked this pull request as ready for review July 16, 2023 15:55
@dyustc
Copy link

dyustc commented Aug 27, 2024

Hi, just has some other thoughts. why the openblas threads has to be set to 1, wouldn't it be faster if there are more threads in computing with openblas?
in fact, I call the openblas_set_num_threads(4) in vosk, it seems it isn't working, the threads is always 1 here.

@johngebbie
Copy link
Contributor Author

Hi @dyustc, I dunno but iirc it was eating the CPU and absolutely chugging when I was using a system package of openblas without this.

@nshmyrev
Copy link
Collaborator

Most of the time system is doing search actually, not using openblas at all. So openblas threads likely have no effect. If you are looking for efficient multicore recognizer, check recent neural network systems like sherpa.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants