Skip to content

[SYSTEMDS-3993] Introduce the Sparsity Information Container - #2642

Closed
ywcb00 wants to merge 17 commits into
apache:mainfrom
ywcb00:feat/recompile/sparsity/optimizer/sparsityinformationcontainer2
Closed

ywcb00 wants to merge 17 commits into
apache:mainfrom
ywcb00:feat/recompile/sparsity/optimizer/sparsityinformationcontainer2

Conversation

@ywcb00

@ywcb00 ywcb00 commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Hi,
this PR introduces a common class for sparsity information. For now, the term sparsity information refers to known sparsity and sparsity estimates, but can be extended to bounds, certainty, etc. in the future. Also compatibility among different types of sparsity estimates can be implemented based on the sparsity information type.
This common parent class is intended to unify the core usage of sparsity estimates and improve the differentiation between known sparsity and estimated sparsity.
All the best,
David

…formation container for sparsity estimates

refactor(main/hops/estim/EstimatorMatrixHistogram.java): extend the matrix histogram class from the sparsity information container
@codecov

codecov Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 67.03540% with 149 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.15%. Comparing base (1a358e5) to head (77642ac).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...che/sysds/hops/estim/EstimatorMatrixHistogram.java 63.91% 28 Missing and 7 partials ⚠️
.../org/apache/sysds/hops/estim/EstimatorRowWise.java 69.09% 23 Missing and 11 partials ⚠️
...g/apache/sysds/hops/estim/EstimatorDensityMap.java 57.62% 20 Missing and 5 partials ⚠️
...g/apache/sysds/hops/estim/EstimatorBasicWorst.java 59.45% 7 Missing and 8 partials ⚠️
...org/apache/sysds/hops/estim/SparsityEstimator.java 56.00% 8 Missing and 3 partials ⚠️
...org/apache/sysds/hops/estim/EstimatorBasicAvg.java 80.00% 4 Missing and 5 partials ⚠️
...org/apache/sysds/hops/estim/EstimatorBitsetMM.java 59.09% 4 Missing and 5 partials ⚠️
...apache/sysds/hops/estim/EstimatorLayeredGraph.java 81.25% 2 Missing and 4 partials ⚠️
.../main/java/org/apache/sysds/hops/estim/MMNode.java 66.66% 1 Missing and 1 partial ⚠️
...g/apache/sysds/hops/estim/SparsityInformation.java 88.88% 1 Missing and 1 partial ⚠️
... and 1 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2642      +/-   ##
============================================
- Coverage     72.18%   72.15%   -0.03%     
- Complexity    51211    51223      +12     
============================================
  Files          2105     2106       +1     
  Lines        230158   230249      +91     
  Branches      38694    38720      +26     
============================================
+ Hits         166139   166140       +1     
- Misses        52813    52879      +66     
- Partials      11206    11230      +24     
Flag Coverage Δ
java 71.46% <67.03%> (-0.04%) ⬇️
python 76.59% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

…y map class from the sparsity information container
…red graph class from the sparsity information container

chore(main/hops/estim/SparsityInformation.java): rename the method getNonZeros to getNnz because it returns the NUMBER of non zero entries
@ywcb00
ywcb00 force-pushed the feat/recompile/sparsity/optimizer/sparsityinformationcontainer2 branch from 9183c62 to 1ec3dae Compare November 26, 2026 14:36
…e sparsity class to wrape the rowwise sparsity vector inside the sparsity information container
…formation in type and name

feat(main/hops/estim/SparsityInformation.java): create method to derive the data characteristics from the sparsity information

chore(main/hops/estim/Estimator**.java): obtain the data characteristics from the sparsity information object instead of deriving it seperately
…atrix class from the sparsity information container
…ty information

chore(main/hops/estim/Estimator**.java): adapt to name change of synopsis to sparsity information
…ity information class for scalar sparsity

	use the scalar sparsity information type in the basic average estimator
…of exact estimation to scalar sparsity object instead of data characteristics
… pointer error when the second data characteristics is null for a unary operation
… threshold so that the basic average case 1 test passes
…sity information type in the basic worst estimator

chore(main/hops/estim/Estimator**.java): use the cached sparsity information when available instead of re-estimating
…of main estimation method to sparsity information instead of data characteristics

refactor(main/hops/estim/Estimator**.java): adapt to above changes

fix(main/hops/estim/EstimatorRowWise.java): fix parenthization for expression to calculate the sparsity of the cbind operation

refactor(test/component/estim/**): adapt to return type change of the sparsity estimator
…ristics whenever setting the sparsity information
@ywcb00 ywcb00 changed the title [WIP][SYSTEMDS-3993] Introduce the Sparsity Information Container [SYSTEMDS-3993] Introduce the Sparsity Information Container Dec 1, 2026
…r left and right child node, as well as for the stored data object of a node
… of null value childs in the mm node hierarchy
@ywcb00 ywcb00 closed this in ed0cd13 Dec 2, 2026
@github-project-automation github-project-automation Bot moved this from In Progress to Done in SystemDS PR Queue Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant