-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add a way to change the number of openblas threads in ggml #452
Comments
This can also be configured with an environment variable, and ggml can use many different BLAS libraries, not only OpenBLAS. The goal in the long term is also to replace BLAS with our own matrix multiplication routines. Maybe we could add documentation about these environment variables rather than adding a temporary, library specific API? |
The main problem is that openblas defaults to max available threads. If control by user-code is not desirable, then maybe set it to physical cores minus the threads ggml needs? Environment variables are not very friendly to end-users.. |
Closing this since OpenBLAS does not seem to give any benefit at all anymore. |
Openblas defaults to the maximum available threads (not physical cores) which is usually not optimal. User code should be able to control this directly to get optimal performance.
The number of threads used by openblas can be changed using:
https://github.com/xianyi/OpenBLAS#setting-the-number-of-threads-at-runtime
The text was updated successfully, but these errors were encountered: