Skip to content

Add SPACE_TO_DEPTH support for STATIC_WI8_AI16 quantization#445

Open
nj-1015 wants to merge 1 commit into
google-ai-edge:mainfrom
nj-1015:add-space-to-depth-static-wi8-ai16
Open

Add SPACE_TO_DEPTH support for STATIC_WI8_AI16 quantization#445
nj-1015 wants to merge 1 commit into
google-ai-edge:mainfrom
nj-1015:add-space-to-depth-static-wi8-ai16

Conversation

@nj-1015
Copy link
Copy Markdown

@nj-1015 nj-1015 commented Mar 14, 2026

Summary

  • Add SPACE_TO_DEPTH to the static_wi8_ai16 operator list in the default policy
  • No algorithm changes needed — the operator already uses materialize_standard_op() with SAME_AS_INPUT_SCALE constraint (same as RESHAPE and TRANSPOSE which support 16-bit)
  • Add 16-bit activation test cases to architecture and E2E tests

Test plan

  • Architecture tests pass for both naive_min_max and octav with 16-bit activations
  • E2E test verifies quantization produces a valid model (interpreter-based accuracy validation skipped since the LiteRT runtime kernel does not yet support INT16 for SPACE_TO_DEPTH)
  • All existing 8-bit tests continue to pass

Add SPACE_TO_DEPTH to the static_wi8_ai16 operator list in the default
policy. The operator already uses the same materialize_standard_op()
with SAME_AS_INPUT_SCALE constraint as RESHAPE and TRANSPOSE, which
both support 16-bit activations, so no algorithm changes are needed.

Add 16-bit activation test cases to both the architecture test and E2E
test. The E2E test for INT16 verifies quantization succeeds without
interpreter-based accuracy validation, since the LiteRT runtime kernel
does not yet support INT16 for SPACE_TO_DEPTH.
Copy link
Copy Markdown
Contributor

@advaitjain advaitjain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

temporary approve. will review in more detail later.

@advaitjain advaitjain self-requested a review April 6, 2026 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants