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-3780] Compression-fused quantization #2226

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

anuunchin
Copy link

@anuunchin anuunchin commented Feb 13, 2025

This PR is part of the LDE project, addressing #3780.

What for?

To introduce a new instruction to fuse quantization and compression.

Given:

M2 = floor(M * S)
C = compress(M2)

This PR adds a rewrite and instruction that replaces the sequence with a new built-in function:
quantize_compress(M, S)

Currently covered

  • Rewrite detection - Identifies multiplication, floor, and compress sequences.quantize_compress()
  • Supports scalar and row-wise vector scale factors
  • New reader that directly quantizes input data
  • Some fast path compression scenarios that don't use readers
  • Bitmap encoding that takes into account quantization (not full)
  • Estimator that takes into account quantization (not full)

Further

  • Component tests
  • Extensive catches if not implemented on all levels
  • Missing fast path compression implementation
  • Enable full matrix scale factors
  • Docs

@anuunchin anuunchin marked this pull request as ready for review February 13, 2025 11:14
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.

Lots of very good things,

I have left a few comments, And i would like to see some performance numbers.

Specifically, with the fused operator vs without.

You can run it across various sizes, or distinct values after quantization.

Rewrite impovement and test

Rewrite test improved

Added some exceptions
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