Skip to content

Fuse multiply(subtract_multiply(dot(..., invalid), a, b), c, d) to dequantize_dot. - #12098

Open
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_1026133819
Open

copybara-service[bot] wants to merge 1 commit into
masterfrom
test_1026133819

Conversation

@copybara-service

Copy link
Copy Markdown
Contributor

Fuse multiply(subtract_multiply(dot(..., invalid), a, b), c, d) to dequantize_dot.

Extend rewrite_dequantize_dot to also match when subtract_multiply is
applied after dot(..., YNN_INVALID_VALUE_ID) with int32 offsets, rather
than folded into dot's C input.

This pattern now appears sometimes when users of YNNPACK want to support non-integer zero points. We can't use dequantize_dot in that case, but the caller might use the pattern anyways.

…quantize_dot.

Extend rewrite_dequantize_dot to also match when subtract_multiply is
applied after dot(..., YNN_INVALID_VALUE_ID) with int32 offsets, rather
than folded into dot's C input.

This pattern now appears sometimes when users of YNNPACK want to support non-integer zero points. We can't use dequantize_dot in that case, but the caller might use the pattern anyways.

PiperOrigin-RevId: 1026133819
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant