You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/12/01 12:19:42 UTC

[GitHub] [tvm] lhutton1 commented on a change in pull request #9589: [microNPU] Add support for TFLite concatenate

lhutton1 commented on a change in pull request #9589:
URL: https://github.com/apache/tvm/pull/9589#discussion_r760131562



##########
File path: python/tvm/relay/op/contrib/ethosu.py
##########
@@ -915,6 +915,59 @@ def abs_pattern() -> tvm.relay.dataflow_pattern.DFPattern:
     return pattern
 
 
+class ConcatParams:
+    """
+    This class will parse a call to a ethos-u.concat composite function
+    and extract the parameter information.
+    """
+
+    composite_name = "ethos-u.concat"
+
+    def __init__(self, func_body):
+        self.concat = func_body
+        self.input_tensors = [TensorParams(tensor) for tensor in list(func_body.args[0])]
+        self.input_scales = [s.data.asnumpy() for s in list(func_body.args[1])]
+        self.input_zero_points = [zp.data.asnumpy() for zp in list(func_body.args[2])]
+        self.axis = func_body.attrs.axis
+
+    def is_valid(self):
+        """Checks whether Concatenate has compatible attributes with the hardware"""
+        if not check_valid_dtypes(self.input_tensors, supported_dtypes=[np.int8]):

Review comment:
       Make sense, thanks for clarifying :)




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