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

Inspect and control the number of threads when BLAS is implemented by Apple Accelerate #136

Open
ogrisel opened this issue Mar 25, 2023 · 3 comments

Comments

@ogrisel
Copy link
Contributor

ogrisel commented Mar 25, 2023

Follow-up on #135.

I am not sure if it's possible or not.

@ogrisel
Copy link
Contributor Author

ogrisel commented Apr 4, 2023

I have not conducted an extensive evaluation yet, but it seems that we do not suffer from oversubscription problems when calling vecLib's GEMM under OpenMP threads (for instance, in scikit-learn's KMeans). So maybe there is some kind of automated mechanism in Grand Central Dispatch that prevents the usual oversubscription problem we observed with other threaded BLAS libraries.

@ogrisel
Copy link
Contributor Author

ogrisel commented Jan 15, 2024

At least we could detect that Accelerate is linked, even if we cannot inspect or set the number of threads.

@ogrisel
Copy link
Contributor Author

ogrisel commented Jan 15, 2024

Apparently it's possible to tell vecLib to not use all threads via an environment variable: VECLIB_MAXIMUM_THREADS.

EDIT: it does not seem to have much effect on numpy workloads (matmul & SVD) linked against Accelerate on a Mac M1 host.

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

No branches or pull requests

1 participant