Skip to content

[SYSTEMDS-3970] Obtain Nnz Information of Reads before Rewriting Main Program Block - #2606

Open
ywcb00 wants to merge 3 commits into
apache:mainfrom
ywcb00:feat/recompile/sparsity/read
Open

[SYSTEMDS-3970] Obtain Nnz Information of Reads before Rewriting Main Program Block#2606
ywcb00 wants to merge 3 commits into
apache:mainfrom
ywcb00:feat/recompile/sparsity/read

Conversation

@ywcb00

@ywcb00 ywcb00 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Hi,
This PR adds the rewriting functionality to split a permanent read operation into a separate, preceding statement block if the meta data of the read object does not provide information about its number of non-zeros beforehand. By performing the read separately, the sparsity information can already be leveraged when recompiling the main program block.

The PR also adds a flag to disable and enable this new feature (disabled by default) as well as unit tests to cover the functionality.

All the best,
David

ywcb00 added 3 commits August 28, 2026 16:18
…write rule to split off permanent reads into a dedicated statement block such that we can use the sparsity information about this data in the main statment block

feat(main/hops/rewrite/ProgramRewriter.java): add the new rewrite rule to the set of applied rewriters
…add unit test for splitting the statement block due to unknown sparsity of permanent read

feat(test/scripts/functions/rewrite/RewriteSplitDagUnknownNnz.dml): add dml script for unit test
@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.42424% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.38%. Comparing base (0a245ab) to head (ea7bbf7).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
...ds/hops/rewrite/RewriteSplitDagUnknownNnzRead.java 93.10% 1 Missing and 3 partials ⚠️
src/main/java/org/apache/sysds/hops/Hop.java 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2606      +/-   ##
============================================
- Coverage     71.39%   71.38%   -0.02%     
- Complexity    50539    50664     +125     
============================================
  Files          1632     1639       +7     
  Lines        196237   196864     +627     
  Branches      38201    38276      +75     
============================================
+ Hits         140113   140541     +428     
- Misses        45099    45259     +160     
- Partials      11025    11064      +39     

☔ View full report in Codecov by Harness.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

1 participant