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

[SYSTEMDS-3541] Exploratory workload-aware compression on intermediates #2230

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

e-strauss
Copy link
Contributor

@e-strauss e-strauss commented Feb 17, 2025

This PR explores the aggressive compression on intermediates, explicitly for the kmeans builtin algorithm. This commit adds new compressed operations to avoid the decompression and minimize the compression time of intermediates.

The runtime of the kmeans algorithm on the census dataset was reduced from initially 50s with intermediate compression down to 17.5s with all the optimizations. Which is an overall improvement of 33% in comparison to the baseline runtime of workload-aware, non-aggressive compression of 27s.

A summary of the changes:

  • added config option for aggressive compression
  • removed scalars from possible compressible intermediate candidates
  • extended the compression workload analyzer to pick up aggregation operations if the input is compressed as a single column group
  • extended the compression workload analyzer to pick up binary matrix-vec op, if of both inputs have the same col indices
  • updated cost estimation for compression on already compressed inputs with single column group
  • added support for double compressed binary matrix-matrix op
  • single-threaded compressed binary matrix-vector operation with single column group encoding
  • multi threaded compressed binary matrix-vector operation with single column group encoding
  • added support for left binary matrix-vector operation for sparse outputs

Copy link

codecov bot commented Feb 18, 2025

Codecov Report

Attention: Patch coverage is 95.06579% with 15 lines in your changes missing coverage. Please review.

Project coverage is 72.58%. Comparing base (78b23cf) to head (db8820d).

Files with missing lines Patch % Lines
...ds/runtime/compress/workload/WorkloadAnalyzer.java 85.10% 0 Missing and 7 partials ⚠️
...sysds/runtime/frame/data/columns/HashMapToInt.java 73.91% 5 Missing and 1 partial ⚠️
...sysds/runtime/compress/lib/CLALibBinaryCellOp.java 99.13% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2230      +/-   ##
============================================
+ Coverage     72.46%   72.58%   +0.11%     
- Complexity    45453    45572     +119     
============================================
  Files          1469     1469              
  Lines        170893   171141     +248     
  Branches      33325    33377      +52     
============================================
+ Hits         123846   124221     +375     
+ Misses        37630    37516     -114     
+ Partials       9417     9404      -13     

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

@e-strauss e-strauss force-pushed the intermediate-compression branch 4 times, most recently from cb7e6a9 to 183fad5 Compare February 19, 2025 11:45
Copy link
Contributor

@Baunsgaard Baunsgaard left a comment

Choose a reason for hiding this comment

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

very good!

However, we can get a bit more performance out of it, via small optimizations.

Added a config option for aggressive compression and extended the compression workload analyzer to detect aggregation operations and binary matrix-vector operations when inputs are compressed as a single column group. Updated cost estimation for compression on already compressed inputs and removed scalars from compressible intermediate candidates. Added support for double compressed binary matrix-matrix operations and implemented both single-threaded and multithreaded compressed binary matrix-vector operations with single column group encoding. Removed the relaxed compression threshold and added a logging statement for potential improvements in compressed binary matrix-vector operations. Enabled always sampling for binary matrix-vector operations in CLALibBinaryCellOp, expanded test coverage, and introduced a new compression algorithm test case for k-means with intermediate compression enabled.
 I also extended the CLALibBinaryCellOp binary matrix-vector (sparse & dense) op task to support left and right operations.
@e-strauss e-strauss force-pushed the intermediate-compression branch from 183fad5 to db8820d Compare February 25, 2025 11:37
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.

2 participants