-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
performance improvement for Symmetric/Hermitian of sparse times vector #30018
Conversation
The immense improvement factor implies widening the realm of solvable matrix calculations on a given hardware enormously. I think, in the case "performance improvement" is a slight understatement - I am wondering, why I cannot attract more attention. (@StefanKarpinski, @andreasnoack). |
I'm with you! I wish there was a regular linear algebra triage call. |
Please see #22200. It's always a good idea to ask before implementing.
I'd okay with trying that out. I think the main limiting factor is still reviews though. |
FWIW, comparing the speed improvement against something that hits the abstractarray fallback is not terribly interesting since you can gain arbitrary speedup by changing the sparsity density. Comparing to the non-symmetric sparse case is perhaps more relevant. |
I don't think so, because currently there is no good way to get the job done.
In consequence the user is forced avoid the Symmetric/Hermitian wrappers of sparse matrices, if he wants good performance. But that is not desirable or possible in all cases.
Of course that is true. But I don't think, the example is unrealistic. Actually I looked for an example, which clearly demonstrates the difference between
|
I looked at #22200 and it is a pity, that I didn't see it before. I would not have started my efforts, though, if that PR had been merged to master before I was stopped in my own project by the missing linalg operation on wrapped sparse matrices. I do not know, what prevented #22200 from accepted. Now we have 2 implementations for |
…into krc/symmsparsevmul
…into krc/symmsparsevmul
@KlausC Please bump often to make sure we get this done, if you don't mind. |
@andreasnoack Do we have a preference over which of the two PRs to merge? Perhaps this one is newer and may be lesser work? |
Bump |
I will do... |
humbly knocking at the door... |
This looks good to me. |
I guess we can backport this to 1.1. |
If
A
is a sparse matrix (Float64, 10_000x10_000, nnz=10^6) andB
a dense vector, we have currently an execution time forSymmetric(A) * B
of 3 s. This PR reduces execution time to 1.8 ms, which is a factor of more than 1500!For element type
BigFloat
the times are 19.8 s and 360 ms, which is still factor 55.Same situation for all variants of
Symmetric/Hermitian
,:U/:L
, andReal/Complex
.Benchmark values current situation:
Benchmark with this PR included: