ibsidorenko opened a new pull request, #13332: URL: https://github.com/apache/tvm/pull/13332
This commit fixes the following issue: For the sequence of `qnn.dequantize -> avg_pool2d -> conv2d -> qnn.quantize` FQ2I pass inserts `qnn.requantize` (or cast) to int32 unconditionally before AvgPool2d. As a result fake quantized `qnn.conv2d` gets input as int32 dtype, but it is forbidden for `qnn.conv2d` (supports only uint8/int8/int16). This commit adds the following: 1) Add cast back to input data type after AvgPool2d. This preserve output data type as input data type. 2) Support int8/uint8/int16/uint16 as input data type in AvgPool2d compute function (but still use int32 for intermediate computation). Also this commit fixes issue[#12381](https://github.com/apache/tvm/issues/12381). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
