Skip to content

housekeeping (sparse): split spmv kernels into submodules#1180

Open
jalvesz wants to merge 28 commits intofortran-lang:masterfrom
jalvesz:sparse_spmv_split
Open

housekeeping (sparse): split spmv kernels into submodules#1180
jalvesz wants to merge 28 commits intofortran-lang:masterfrom
jalvesz:sparse_spmv_split

Conversation

@jalvesz
Copy link
Copy Markdown
Contributor

@jalvesz jalvesz commented Apr 16, 2026

This PR splits the sparse spmv module into submodules for easier breakdown when working on individual formats.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR refactors the sparse SPMV implementation by splitting format-specific kernels (COO/CSR/CSC/ELL/SELLC) out of the monolithic stdlib_sparse_spmv module into separate submodules, enabling easier isolated development per storage format.

Changes:

  • Introduced new stdlib_sparse_spmv_* submodules implementing format-specific SPMV kernels.
  • Updated stdlib_sparse_spmv to expose interface-only module subroutine declarations for submodule implementations.
  • Updated build configuration and sparse spec documentation to reflect the new structure.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/sparse/stdlib_sparse_spmv_sellc.fypp Adds SELLC SPMV implementation as a submodule with chunked kernels.
src/sparse/stdlib_sparse_spmv_ell.fypp Adds ELL SPMV implementation as a submodule (rank-1 and rank-2 variants).
src/sparse/stdlib_sparse_spmv_csr.fypp Adds CSR SPMV implementation as a submodule (rank-1 and rank-2 variants).
src/sparse/stdlib_sparse_spmv_csc.fypp Adds CSC SPMV implementation as a submodule (rank-1 and rank-2 variants).
src/sparse/stdlib_sparse_spmv_coo.fypp Adds COO SPMV implementation as a submodule (rank-1 and rank-2 variants).
src/sparse/stdlib_sparse_spmv.fypp Replaces in-module implementations with interface declarations for submodules.
src/sparse/stdlib_sparse_kinds.fypp Removes trailing whitespace.
src/sparse/CMakeLists.txt Registers the new submodule fypp sources in the sparse build.
doc/specs/stdlib_sparse.md Clarifies add usage by splitting single-value vs block-value syntax.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/sparse/stdlib_sparse_spmv_csc.fypp
Comment thread src/sparse/stdlib_sparse_spmv_csc.fypp Outdated
Comment thread src/sparse/stdlib_sparse_spmv_coo.fypp Outdated
Comment thread src/sparse/stdlib_sparse_spmv_ell.fypp Outdated
Comment on lines +35 to +38
if( .not.any( ${CHUNKS}$ == cs ) ) then
print *, "error: sellc chunk size not supported."
return
end if
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.83%. Comparing base (a21a7d6) to head (303678e).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1180      +/-   ##
==========================================
+ Coverage   68.81%   68.83%   +0.01%     
==========================================
  Files         408      408              
  Lines       13726    13726              
  Branches     1552     1552              
==========================================
+ Hits         9446     9448       +2     
+ Misses       4280     4278       -2     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

jalvesz and others added 4 commits April 17, 2026 08:54
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@jalvesz jalvesz marked this pull request as ready for review April 20, 2026 21:21
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.

2 participants