You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "rasagna-quic (via GitHub)" <gi...@apache.org> on 2023/08/21 10:15:22 UTC

[GitHub] [tvm] rasagna-quic opened a new pull request, #15599: F2qi avgpool bug fix

rasagna-quic opened a new pull request, #15599:
URL: https://github.com/apache/tvm/pull/15599

   We see an accuracy issue when FQ2I is enabled for the avg_pool2d op in the deeplab_v3 QAT model. The error seems to be happening because the underlying graph has the output of the avg_pool mapped directly to the conv2d without a quantize-dequantize layer in between.
   
   Graph of interest
   ```mermaid
   graph TD;
   W(dequantize: A_scale, A_zero_point) --> Conv2d;
   A(dequantize: B_scale, B_zero_point) --> avg_pool2d;
   avg_pool2d --> Conv2d;
   Conv2d --> Output(quantize: C_scale, C_zero_point);
   ```
   
   Quantization parameters after Fq2i pass:
   qnn.avg_pool2d	(Bs, Bz, Cs, Cz)
   qnn.conv2d	        (Cs, Cz, As, Az)
   qnn.requantize	(Cs*As, 0, Cs, Cz)
   
   Proposed fix for quantization parameters:
   qnn.avg_pool2d	(Bs, Bz, Bs, Bz)
   qnn.conv2d	        (Bs, Bz, As, Az)
   qnn.requantize	(Cs*As, 0, Cs, Cz)
   
   where quantized parameters As, Bs, Cs are scales and Az, Bz, Cz are zeropoints.
   
   


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] quic-sanirudh commented on pull request #15599: F2qi avgpool bug fix

Posted by "quic-sanirudh (via GitHub)" <gi...@apache.org>.
quic-sanirudh commented on PR #15599:
URL: https://github.com/apache/tvm/pull/15599#issuecomment-1698598177

   @tvm-bot rerun


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] kparzysz-quic commented on pull request #15599: [Hexagon] F2qi avgpool bug fix

Posted by "kparzysz-quic (via GitHub)" <gi...@apache.org>.
kparzysz-quic commented on PR #15599:
URL: https://github.com/apache/tvm/pull/15599#issuecomment-1721686813

   Thanks!


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] rasagna-quic commented on pull request #15599: F2qi avgpool bug fix

Posted by "rasagna-quic (via GitHub)" <gi...@apache.org>.
rasagna-quic commented on PR #15599:
URL: https://github.com/apache/tvm/pull/15599#issuecomment-1689785910

   @tvm-bot rerun


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] tvm-bot commented on pull request #15599: F2qi avgpool bug fix

Posted by "tvm-bot (via GitHub)" <gi...@apache.org>.
tvm-bot commented on PR #15599:
URL: https://github.com/apache/tvm/pull/15599#issuecomment-1686048215

   <!---bot-comment-->
   
   Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from [Reviewers](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#reviewers) by @-ing them in a comment.
   
   <!--bot-comment-ccs-start-->
    * No users to auto-tag found, no teams are specified in PR title <sub>See [#10317](https://github.com/apache/tvm/issues/10317) for details</sub><!--bot-comment-ccs-end-->
   
   <sub>Generated by [tvm-bot](https://github.com/apache/tvm/blob/main/ci/README.md#github-actions)</sub>


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] rasagna-quic commented on pull request #15599: F2qi avgpool bug fix

Posted by "rasagna-quic (via GitHub)" <gi...@apache.org>.
rasagna-quic commented on PR #15599:
URL: https://github.com/apache/tvm/pull/15599#issuecomment-1686049281

   cc: @quic-sanirudh @jverma-quic @kparzysz-quic 


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] kparzysz-quic merged pull request #15599: [Hexagon] F2qi avgpool bug fix

Posted by "kparzysz-quic (via GitHub)" <gi...@apache.org>.
kparzysz-quic merged PR #15599:
URL: https://github.com/apache/tvm/pull/15599


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org