Skip to content

AppleAccelerate SVD is slower than libopenblas64 #80

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

Open
OliverDudgeon opened this issue Feb 21, 2025 · 0 comments
Open

AppleAccelerate SVD is slower than libopenblas64 #80

OliverDudgeon opened this issue Feb 21, 2025 · 0 comments

Comments

@OliverDudgeon
Copy link

I was benchmarking this on my M4 Pro Macbook Pro (10 core) and I noticed that although I get benefits for some BLAS operations (matrix multiplications etc) SVD is a fair bit slower than libopenblas64. Here's the results I get on my machine:

  • AppleAccelerate
In [1]: using LinearAlgebra, BenchmarkTools, AppleAccelerate

In [2]: A = rand(ComplexF32, 2000, 2000);

In [3]: @btime svd(A);
  1.548 s (21 allocations: 169.04 MiB)
  • 10 BLAS threads
In [1]: using LinearAlgebra, BenchmarkTools

In [2]: BLAS.get_num_threads()
Out[2]: 10

In [3]: A = rand(ComplexF32, 2000, 2000);

In [4]: @btime svd(A);
  841.862 ms (21 allocations: 169.04 MiB)
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