Skip to content

feat(python): add alt decompression memory parameter to interpreter#3614

Open
rkuester wants to merge 1 commit into
tensorflow:mainfrom
rkuester:feat-decode-submit
Open

feat(python): add alt decompression memory parameter to interpreter#3614
rkuester wants to merge 1 commit into
tensorflow:mainfrom
rkuester:feat-decode-submit

Conversation

@rkuester

@rkuester rkuester commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

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

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
@rkuester rkuester requested a review from a team as a code owner July 1, 2026 16:39
@rkuester rkuester added the ci:full Triggers the comprehensive cross-platform test suite. label Jul 1, 2026
@rkuester rkuester temporarily deployed to integration-test July 1, 2026 16:39 — with GitHub Actions Inactive
@rkuester rkuester added ci:full Triggers the comprehensive cross-platform test suite. and removed ci:full Triggers the comprehensive cross-platform test suite. labels Jul 1, 2026
@rkuester rkuester deployed to integration-test July 1, 2026 21:48 — with GitHub Actions Active
@rkuester rkuester requested a review from veblush July 1, 2026 22:18
AddConv2D();
AddCos();
AddCumSum();
#ifdef USE_TFLM_COMPRESSION

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.

Do we use this flag for Decode? I thought this was only for legacy compression that new Decode will replace?

size_t arena_size, int num_resource_variables,
InterpreterConfig config = InterpreterConfig::kAllocationRecording);
InterpreterConfig config = InterpreterConfig::kAllocationRecording,
size_t alt_decompression_memory_size = 0);

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.

And maybe we should have a test for using this new alt_decompression_memory_size?

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