feat(python): add alt decompression memory parameter to interpreter#3614
Open
rkuester wants to merge 1 commit into
Open
feat(python): add alt decompression memory parameter to interpreter#3614rkuester wants to merge 1 commit into
rkuester wants to merge 1 commit into
Conversation
Add alt_decompression_memory_size parameter to the Python interpreter API. When non-zero, allocates a separate memory region for DECODE operator outputs and calls SetDecompressionMemory before AllocateTensors. BUG=part of tensorflow#3256
veblush
reviewed
Jul 2, 2026
| AddConv2D(); | ||
| AddCos(); | ||
| AddCumSum(); | ||
| #ifdef USE_TFLM_COMPRESSION |
Collaborator
There was a problem hiding this comment.
Do we use this flag for Decode? I thought this was only for legacy compression that new Decode will replace?
veblush
reviewed
Jul 2, 2026
| size_t arena_size, int num_resource_variables, | ||
| InterpreterConfig config = InterpreterConfig::kAllocationRecording); | ||
| InterpreterConfig config = InterpreterConfig::kAllocationRecording, | ||
| size_t alt_decompression_memory_size = 0); |
Collaborator
There was a problem hiding this comment.
And maybe we should have a test for using this new alt_decompression_memory_size?
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.
Add an alt_decompression_memory_size parameter to the Python interpreter
API. When non-zero, the interpreter allocates a separate memory region
for DECODE operator outputs and calls SetDecompressionMemory before
AllocateTensors, keeping decompressed tensors out of the main arena.
Python and interpreter-wrapper only; additive with a default of 0 (no
behavior change when unset).
Part of the DECODE compression-tooling stack.
BUG=#3256