Repository navigation
Use output zero point for SPACE_TO_BATCH_ND int8 padding - #3973
Merged
veblush merged 1 commit intoNov 5, 2026
Merged
Conversation
veblush
temporarily deployed
to
integration-test
November 5, 2026 18:13 — with
GitHub Actions
Inactive
SpaceToBatchNDPrepare never set SpaceToBatchParams::output_offset, so the reference kernel filled padded elements with 0 instead of the quantized value of real zero. For int8 tensors with a non-zero zero point (e.g. -128) the padded output was wrong. Set output_offset to the output zero point for int8 in Prepare, and add a padding test with zero point -128 that fails before this change. BUG=#3952
veblush
force-pushed
the
fix-space-to-batch-zero-point
branch
from
November 5, 2026 19:11
5c5ef45 to
d5331aa
Compare
veblush
temporarily deployed
to
integration-test
November 5, 2026 19:12 — with
GitHub Actions
Inactive
ddavis-2015
temporarily deployed
to
integration-test
November 5, 2026 20:24 — with
GitHub Actions
Inactive
This branch was previously 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.
Description
SpaceToBatchNDPreparenever setSpaceToBatchParams::output_offset, so the reference kernel filled padded elements with0instead of the quantized value of real zero. For int8 tensors with a non-zero zero point (for example-128), the padded part of the output was wrong.Preparenow setsoutput_offsetto the output zero point for int8 and to0otherwise.Added
SpaceToBatchPaddingInt8NonZeroZeroPoint, a padded int8 case with zero point-128, which fails before this change.BUG=#3952
🤖 Generated with Claude Code