Skip to content

Fix missing quantizedBiasType setting for 16x8 requantization#3597

Merged
veblush merged 1 commit into
tensorflow:mainfrom
veblush:requan
Jun 16, 2026
Merged

Fix missing quantizedBiasType setting for 16x8 requantization#3597
veblush merged 1 commit into
tensorflow:mainfrom
veblush:requan

Conversation

@veblush

@veblush veblush commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

When a model is compiled without explicit bias tensors, requantize_flatbuffer_utils previously skipped the bias upgrade logic entirely. As a result, the quantizedBiasType hint in the operator's options was not updated. This caused TFLM to fall back to a 32-bit accumulator for these layers, which overflows.

This change explicitly injects op.builtinOptions.quantizedBiasType = int64 directly into the operator options for supported operators, fixing precision loss for bias-less layers running 16x8 kernels.

BUG=n/a

@veblush veblush requested a review from a team as a code owner June 15, 2026 17:50
@veblush veblush added the ci:full Triggers the comprehensive cross-platform test suite. label Jun 15, 2026
@veblush veblush requested a review from suleshahid June 15, 2026 17:50
@veblush

veblush commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator Author

cc: @rameshkunasi

@veblush veblush added this pull request to the merge queue Jun 16, 2026
Merged via the queue into tensorflow:main with commit b6ee3dc Jun 16, 2026
44 of 45 checks passed
@veblush veblush deleted the requan branch June 16, 2026 16:22
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