- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 9
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
svd/svdvals slow on Mac #501
Comments
I've found that the MacOS system Python is faster at matrix ops than even Anaconda with MKL. I'm guessing it is using the Accelerate framework. Would it be worth trying to link Julia to that library and testing? |
So all of the slowdown happens during the reduction to bidiagonal (LAPACK's ...
187 .../julia/libopenblas64_.dylib:?; dlarf_64_
5 .../julia/libopenblas64_.dylib:?; dgemv_64_
1 .../julia/libopenblas64_.dylib:?; dgemv_n_HASWELL
1 .../julia/libopenblas64_.dylib:?; dgemv_kernel_4x4
1 .../julia/libopenblas64_.dylib:?; dgemv_t_HASWELL
1 .../julia/libopenblas64_.dylib:?; dgemv_kernel_4x4
1 .../julia/libopenblas64_.dylib:?; dgemv_thread_n
1 .../julia/libopenblas64_.dylib:?; exec_blas
2 .../julia/libopenblas64_.dylib:?; dscal_k_HASWELL
2 .../julia/libopenblas64_.dylib:?; dscal_kernel_8_zero
181 .../julia/libopenblas64_.dylib:?; dger_64_
171 ...julia/libopenblas64_.dylib:?; dger_k_HASWELL
170 ...julia/libopenblas64_.dylib:?; daxpy_k_HASWELL
169 ...ulia/libopenblas64_.dylib:?; daxpy_kernel_8
10 ...julia/libopenblas64_.dylib:?; dger_thread
10 ...julia/libopenblas64_.dylib:?; exec_blas
9 ...julia/libopenblas64_.dylib:?; ger_kernel
9 ...julia/libopenblas64_.dylib:?; daxpy_k_HASWELL
9 ...ulia/libopenblas64_.dylib:?; daxpy_kernel_8 but a similar computation on Linux gives ...
24 .../julia-d386e40c17/bin/../lib/julia/libopenblas64_.so:?; dlarf_64_
16 .../julia-d386e40c17/bin/../lib/julia/libopenblas64_.so:?; dgemv_64_
5 .../julia-d386e40c17/bin/../lib/julia/libopenblas64_.so:?; dgemv_n_HASWELL
5 ...julia-d386e40c17/bin/../lib/julia/libopenblas64_.so:?;
6 .../julia-d386e40c17/bin/../lib/julia/libopenblas64_.so:?; dgemv_t_HASWELL
5 ...julia-d386e40c17/bin/../lib/julia/libopenblas64_.so:?;
2 .../julia-d386e40c17/bin/../lib/julia/libopenblas64_.so:?; dgemv_thread_n
2 ...julia-d386e40c17/bin/../lib/julia/libopenblas64_.so:?; exec_blas
2 ...julia-d386e40c17/bin/../lib/julia/libopenblas64_.so:?;
2 ...julia-d386e40c17/bin/../lib/julia/libopenblas64_.so:?; dgemv_n_HASWELL
2 ...ulia-d386e40c17/bin/../lib/julia/libopenblas64_.so:?;
1 .../julia-d386e40c17/bin/../lib/julia/libopenblas64_.so:?; dgemv_thread_t
1 ...julia-d386e40c17/bin/../lib/julia/libopenblas64_.so:?; exec_blas
1 ...julia-d386e40c17/bin/../lib/julia/libopenblas64_.so:?; exec_blas_async_wait
1 .../julia-d386e40c17/bin/../lib/julia/libopenblas64_.so:?; dscal_k_HASWELL
8 .../julia-d386e40c17/bin/../lib/julia/libopenblas64_.so:?; dger_64_
5 .../julia-d386e40c17/bin/../lib/julia/libopenblas64_.so:?; dger_k_HASWELL
5 ...julia-d386e40c17/bin/../lib/julia/libopenblas64_.so:?; daxpy_k_HASWELL
2 ...julia-d386e40c17/bin/../lib/julia/libopenblas64_.so:?;
3 .../julia-d386e40c17/bin/../lib/julia/libopenblas64_.so:?; dger_thread
3 ...julia-d386e40c17/bin/../lib/julia/libopenblas64_.so:?; exec_blas
2 ...julia-d386e40c17/bin/../lib/julia/libopenblas64_.so:?;
2 ...julia-d386e40c17/bin/../lib/julia/libopenblas64_.so:?; daxpy_k_HASWELL
1 ...julia-d386e40c17/bin/../lib/julia/libopenblas64_.so:?; exec_blas_async_wait
1 ...libc-2.26/posix/../sysdeps/unix/syscall-template.S:84; |
Yup, that's it.
Gives:
|
OpenBLAS issue upstream? |
Verified:
|
Not sure what is going on here, but
takes about 20ms on a Mac, vs about 1.5ms inside a Linux VM on the same machine.
Mac versioninfo:
(from https://discourse.julialang.org/t/svdvals-is-alarmingly-slow/9259)
The text was updated successfully, but these errors were encountered: