You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by gu...@apache.org on 2023/01/13 21:37:47 UTC

[tvm] 01/03: Extract sum values

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 f85abe44892a8c9d07fbfd1a24b0734bba832540
Author: Gavin Uberti <ga...@gmail.com>
AuthorDate: Fri Jan 13 12:58:46 2023 -0800

    Extract sum values
---
 vww/modified.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/vww/modified.c b/vww/modified.c
index 5b1294bd28..0060e5f867 100644
--- a/vww/modified.c
+++ b/vww/modified.c
@@ -30847,14 +30847,12 @@ TVM_DLL int32_t tvmgen_default_fused_nn_conv2d_add_cast_multiply_add_right_shift
           int32_t cse_var_138 = (cse_var_139 + 1);
           int32_t cse_var_137 = (((cse_var_140 + (ax2_outer * 64)) + (ax2_inner * 8)) + cse_var_139);
           int32_t cse_var_136 = (((cse_var_140 + (ax2_outer * 256)) + (ax3_outer * 64)) + (ax2_inner * 2));
+          int64_t sum_0 = ((int64_t)((int32_t*)conv)[cse_var_136]) + ((int64_t)((int32_t*)bias_8070086)[cse_var_139]);
           int32_t __1 = (
                             (int32_t) (
                                 (
                                     (
-                                        (
-                                            ((int64_t)((int32_t*)conv)[cse_var_136]) +
-                                            ((int64_t)((int32_t*)bias_8070086)[cse_var_139])
-                                        ) *
+                                        (sum_0) *
                                         ((int64_t*)fused_nn_conv2d_add_cast_constant_2)[cse_var_139]
                                     ) + ((int64_t*)fused_nn_conv2d_add_cast_multiply_constant_3)[cse_var_139]
                                 ) >> ((int64_t*)fused_nn_conv2d_add_cast_multiply_add_constant_4)[cse_var_139])
@@ -30862,14 +30860,12 @@ TVM_DLL int32_t tvmgen_default_fused_nn_conv2d_add_cast_multiply_add_right_shift
           int32_t requant_0 = __ssat(__1 - 128, 8);
           ((int16_t*)T_subtract)[cse_var_137] = (((int16_t) requant_0) - (int16_t)-128);
 
+          int64_t sum_1 = ((int64_t)((int32_t*)conv)[(cse_var_136 + 1)]) + ((int64_t)((int32_t*)bias_8070086)[cse_var_138]);
           int32_t __7 = (
                             (int32_t)(
                                 (
                                     (
-                                        (
-                                            ((int64_t)((int32_t*)conv)[(cse_var_136 + 1)]) +
-                                            ((int64_t)((int32_t*)bias_8070086)[cse_var_138])
-                                        ) *
+                                        (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])