← Back to Pull requests

housekeeping: build fixes, dead-code removal, docs rewrite #40

Closed
unknown closed this pull request without merging on Aug 19, 2026 15:54 UTC
View on GitHub
unknown unknown commented on Aug 13, 2026 12:23 UTC
Author

This change cleans up the build, removes some dead code, updates the tests and examples, and brings the documentation in line with the current code. No kernel logic was changed.

README

The README was around 623 lines, so I cut it down to 82 and moved the extra detail into the relevant docs. Typically, the README should be a quick starting point, with the deeper material kept in other docs.

The old version had a number of things that no longer matched the code. It referred to RVSP_BACKEND_AUTO, options.dtype, RVSP_DTYPE_F32, and rvsp_csr_free, none of which exist. It also described an rvv_f32_tiled
kernel and tile-size macro that were never implemented, and presented the descriptor API as a future proposal using old names.

The API design notes are now in docs/api_design.md, and the repository layout is documented in docs/directory_structure.md.

The CSR walkthrough, execution model, and algorithm sections were removed from the README. The figures remain in
docs/figures/ and the material can go in a separate document or the paper. Benchmark results will go in the paper once the numbers are settled.

The README is now kept simple and focuses on

  • what rv-sparse is

  • how to build it

  • a small usage example

  • where to find the API and examples
  • Tests

    Three new test files replace the old coverage that only exercised the legacy kernels. The old tests were moved totests/legacy/ and are no longer run.

    All three new tests go through the public API in include/, so no build changes were needed.

    csr_fixtures.h

    Contains six A/B matrix pairs with hand-computed results covering

  • merging products

  • exact cancellation

  • empty rows

  • a 16-wide contiguous run

  • scattered columns

  • repeated-column accumulation
  • test_spgemm_reference_f32.c

    Runs every available strategy against the reference results.

    test_spgemm_descr_f32.c

    Covers the descriptor lifecycle, ordering rules, invalid arguments, and structure reuse.

    Examples

    Two descriptor examples were added

  • spgemm_csr_descr_f32.c shows the descriptor API

  • spgemm_csr_reuse_f32.c shows how structure analysis can be reused
  • The old spgemm_csr_f32_otf.c example was removed.

    Dead code

    One unused pipeline was removed completely.

  • src/matmul/AxBRowIP.c was the original prototype and had its own main().

  • scripts/cooTOcsr.py generated the input for that prototype. The existing assemble_csr_matrix in mtx_to_csr_formatter.c already handles the CSR conversion, so the script was no longer needed.

  • matrix_data/*.txt was output for that pipeline and was removed as well.

  • message.txt was also removed.
  • Documentation

    The remaining documentation was updated to match the current code.

  • Added bench/README.md.

  • Rewrote docs/api_design.md against the current public API.

  • Rewrote docs/directory_structure.md.

  • Removed docs/README.md.

  • Rewrote CONTRIBUTING.md for the current build, test, and kernel workflow.

  • Moved docs/rv-sparse-logo.png into docs/figures/.
  • Other

    matrices/getResources.sh was also cleaned up. It previously kept extra variants such as _nodename and _b from each archive. It now keeps only the .mtx file matching the archive name.

    The script also uses set -euo pipefail so a failed download or other command causes the script to stop instead of continuing with incomplete data.

    Diff: 433 lines (+324 / -109) across 5 files Reviewer: ayokunle321 Review duration: 8850m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 433 lines diff across 5 files
    0.45
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.363
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #40"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 45.2% (MEDIUM) · Higher = larger blast radius
    45.2%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 17.8% · Safe to merge
    17.8%