-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Change concatenation involving sparse matrices, sparse vectors and de… #16722
Conversation
@@ -967,3 +967,15 @@ for Tv in [Float32, Float64, Int64, Int32, Complex128] | |||
end | |||
end | |||
end | |||
|
|||
# Matrix vector cat not supported for sparse #13130 and #16661 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is now, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is. fixed below.
I added Should I write more efficient methods for all the different cats? I mean versions along the lines of julia/base/sparse/sparsevector.jl Line 701 in 6d6ad0b
Also, everything seems to work, but should I add |
Up to you, but one thing we should do is carefully check if there are any performance implications to non-sparse cases. Ref #16128 (comment), would your previous PR have influenced how dense |
That would be unfortunate! I did add these e280a27#diff-8cc03187983013adb308460f8365e1d0R720 could those be the reason? If so, I'm not sure how. I will have to checkout just before and after the merge to be sure. |
One commit before mine
mine
almost latest master (from yesterday I think)
It does seem that there's a doubling (ouch) from my commit. However, since then it seems to have gotten even worse (especially rand_mat_mul). This is just one run of |
The issue was most-of-the-way fixed by #16741, right? Does this PR's change make anything worse, or is it good to merge? |
I'll rebase and see if these changes introduce perf regressions. |
…nse vectors to return sparse arrays.
Is there a preferred way to test this? I got
With two runs on this brnach. That rand_mat_mul for example seem to vary by quite a bit! edit
I don't really see any perf regressions from this PR. There's still some way to go to get back to what it was, but I believe that is due to changes after my first sparse cat PR. |
The output there could use a header, but I think what it's printing is min, max, mean (?), variance. We can also ask |
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @jrevels |
Timing in the array setindex benchmark was slower. |
Does that setindex benchmark exercise any of the code you're changing here, or is that noise? |
I'm inclined to merge this. Dissenting opinions? |
Feel free to do so. They can be optimized, but I can come back to them at a later point in time. |
@ViralBShah what are you tagging this "backport pending 0.5" for, this was merged months ago |
…nse vectors to return sparse arrays.
Fixes #16661 and also makes sparse array dense vector return sparse arrays. This implementation makes some unnecessary allocations that I can take a look at before a merge.