This is an automated email from the ASF dual-hosted git repository.

guberti pushed a commit to branch acc-tests-1
in repository https://gitbox.apache.org/repos/asf/tvm.git

commit f1f90f00b5ec4b3e6bb3618b4efc51a1f70d1731
Author: Gavin Uberti <[email protected]>
AuthorDate: Sat Jan 21 21:15:11 2023 -0800

    Another requantization
---
 vww/modified.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/vww/modified.c b/vww/modified.c
index 327ea0ab19..b35a22dd4e 100644
--- a/vww/modified.c
+++ b/vww/modified.c
@@ -30855,15 +30855,8 @@ TVM_DLL int32_t 
tvmgen_default_fused_nn_conv2d_add_cast_multiply_add_right_shift
           ((int16_t*)T_subtract)[cse_var_137] = (((int16_t) requant_0) - 
(int16_t)-128);
 
           int32_t sum_1 = ((int32_t*)conv)[(cse_var_136 + 1)] + 
((int32_t*)bias_8070086)[cse_var_138];
-          int32_t __7 = (
-                            (int32_t)(
-                                (
-                                    (
-                                        (sum_1) *
-                                        
((int64_t*)fused_nn_conv2d_add_cast_constant_2)[cse_var_138]
-                                    ) + 
((int64_t*)fused_nn_conv2d_add_cast_multiply_constant_3)[cse_var_138]
-                                ) >> 
((int64_t*)fused_nn_conv2d_add_cast_multiply_add_constant_4)[cse_var_138])
-                            );
+          int32_t __7 = (sum_1 * (int64_t) scale_val) >> 32;
+          __7 = (__7 + 1) >> 1;
           int32_t requant_1 = __ssat(__7 - 128, 8);
           ((int16_t*)T_subtract)[(cse_var_137 + 1)] = (((int16_t)requant_1) - 
(int16_t)-128);
         }

Reply via email to