Skip to content

feat(compression): add LUT mode to spec and DCM - #3758

Merged
veblush merged 1 commit into
tensorflow:mainfrom
rkuester:feat-decode/lut-mode
Sep 21, 2026
Merged

veblush merged 1 commit into
tensorflow:mainfrom
rkuester:feat-decode/lut-mode

Conversation

@rkuester

@rkuester rkuester commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Let a compression spec state whether a tensor gets one value
table or one table per channel along a given axis, instead of
that choice always coming from the tensor's quantization. Honor
the choice in the LUT compressor, let the spec builder state it,
parse it from a spec file when given, and add the mode to the DCM
as a new axis field in the decode header.

Name the mode in a spec file with a per_channel mapping that gives
the axis, or with a bare per_tensor key:

- lut:
    index_bitwidth: 4
    per_channel:
      axis: 0

- lut:
    index_bitwidth: 2
    per_tensor:

For an entry that names neither, keep the old behavior and take the
mode from the tensor's quantization.

BUG=part of #3256

@rkuester
rkuester requested a review from a team as a code owner September 19, 2026 03:49
@rkuester rkuester added the ci:full Triggers the comprehensive cross-platform test suite. label Sep 19, 2026
@rkuester
rkuester requested a review from veblush September 19, 2026 03:49
@rkuester
rkuester deployed to integration-test September 19, 2026 03:49 — with GitHub Actions Active

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is YAML syntax support for mode intentionally deferred to a follow-up PR, or should it be supported here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It was in the next commit, but you're right that there's no reason to defer it. I've pulled it into this PR.

Let a compression spec state whether a tensor gets one value
table or one table per channel along a given axis, instead of
that choice always coming from the tensor's quantization. Honor
the choice in the LUT compressor, let the spec builder state it,
parse it from a spec file when given, and add the mode to the DCM
as a new axis field in the decode header.

Name the mode in a spec file with a per_channel mapping that gives
the axis, or with a bare per_tensor key:

    - lut:
        index_bitwidth: 4
        per_channel:
          axis: 0

    - lut:
        index_bitwidth: 2
        per_tensor:

For an entry that names neither, keep the old behavior and take the
mode from the tensor's quantization.
@rkuester
rkuester force-pushed the feat-decode/lut-mode branch from 78061e2 to 711ba85 Compare September 21, 2026 19:32
@rkuester
rkuester deployed to integration-test September 21, 2026 19:32 — with GitHub Actions Active
@rkuester
rkuester requested a review from veblush September 21, 2026 19:56
@veblush
veblush added this pull request to the merge queue Sep 21, 2026
Merged via the queue into tensorflow:main with commit 6997b45 Sep 21, 2026
42 checks passed
@rkuester
rkuester deleted the feat-decode/lut-mode branch September 22, 2026 21:38

This branch was successfully deployed

1 active deployment
integration-test — 711ba857 Deployed Sep 21, 2026 by rkuester via approval-gate #917
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:full Triggers the comprehensive cross-platform test suite.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants