feat(compression): add LUT mode to spec and DCM - #3758
Merged
Merged
Conversation
veblush
reviewed
Sep 21, 2026
Collaborator
There was a problem hiding this comment.
Is YAML syntax support for mode intentionally deferred to a follow-up PR, or should it be supported here?
Contributor
Author
There was a problem hiding this comment.
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
force-pushed
the
feat-decode/lut-mode
branch
from
September 21, 2026 19:32
78061e2 to
711ba85
Compare
veblush
approved these changes
Sep 21, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
For an entry that names neither, keep the old behavior and take the
mode from the tensor's quantization.
BUG=part of #3256