siju-samuel commented on a change in pull request #5474:
URL: https://github.com/apache/incubator-tvm/pull/5474#discussion_r417851626



##########
File path: python/tvm/relay/frontend/tflite.py
##########
@@ -863,6 +845,21 @@ def convert_add(self, op):
             return self._convert_elemwise(_qnn.op.add, op)
         return self._convert_elemwise(_op.add, op)
 
+    def convert_add_n(self, op):
+        """Convert TFLite ADD_N"""
+        output_tensors = self.get_output_tensors(op)
+        assert len(output_tensors) == 1, "output tensors length should be 1"
+
+        input_tensors = self.get_input_tensors(op)
+        assert not input_tensors[0].qnn_params, "TFLite does not support 
quantized ADD_N."
+        lhs_expr = self.get_tensor_or_const_expr(input_tensors[0])
+        for rhs_tensor in input_tensors[1:]:

Review comment:
       assert if len(input_tensors) <2 ? Othersiwe input_tensors[1: ] will 
throw error.

##########
File path: tests/python/frontend/tflite/test_forward.py
##########
@@ -1142,6 +1142,43 @@ def test_all_elemwise():
         _test_forward_elemwise(_test_floor_divide)
         _test_forward_elemwise(_test_floor_mod)
 
+
+#######################################################################
+# AddN
+# ----------------------

Review comment:
       remove unnecessary dashes




----------------------------------------------------------------
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.

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


Reply via email to