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

Fix performance trap for sparse view multiplication #476

Merged
merged 9 commits into from
Jan 7, 2024
Merged

Conversation

dkarrasch
Copy link
Member

@dkarrasch dkarrasch commented Nov 23, 2023

It turns out that for non-triangular sparse matrices, getcolptr, which can be easily computed from the parent array, is not used. But all the other get* functions don't require a unit range as the second slicing argumnet in column views, so the fast multiplication kernels also apply to that situation.

Fixes #475.

@dkarrasch dkarrasch changed the title Fix getcolptr for sparse matrix views Fix performance trap for sparse view multiplication Nov 23, 2023
Copy link

codecov bot commented Nov 23, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (c73d6e3) 85.17% compared to head (b6a8802) 85.17%.
Report is 1 commits behind head on main.

Files Patch % Lines
src/linalg.jl 93.33% 1 Missing ⚠️
src/sparsematrix.jl 87.50% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #476   +/-   ##
=======================================
  Coverage   85.17%   85.17%           
=======================================
  Files          12       12           
  Lines        8865     8866    +1     
=======================================
+ Hits         7551     7552    +1     
  Misses       1314     1314           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dkarrasch
Copy link
Member Author

There's an opportunity here to bikeshed about names of internal aliases... just in case things can be improved for more clarity. I was not very creative.

src/sparsematrix.jl Outdated Show resolved Hide resolved
src/sparsematrix.jl Show resolved Hide resolved
@dkarrasch dkarrasch merged commit 75081bc into main Jan 7, 2024
5 of 8 checks passed
@dkarrasch dkarrasch deleted the dk/colptr_view branch January 7, 2024 19:11
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

Successfully merging this pull request may close these issues.

Using @view leads to 100x performance loss
2 participants