vvchernov commented on code in PR #13866:
URL: https://github.com/apache/tvm/pull/13866#discussion_r1091524232


##########
python/tvm/relay/frontend/onnx.py:
##########
@@ -6148,13 +6148,13 @@ def _impl_v11(cls, inputs, attr, params):
         return _expr.Tuple(inputs)
 
 
-class SequenceLength(OnnxOpConverter):
-    """Operator converter for sequence length op."""
+class SequenceEmpty(OnnxOpConverter):
+    """Operator converter for sequence empty op."""
 
     @classmethod
     def _impl_v11(cls, inputs, attr, params):
-        # Get length of input sequence
-        return _expr.const(len(inputs[0]), dtype="int64")
+        # Construct an empty tuple.
+        return _expr.Tuple([])

Review Comment:
   It is very strange attribute. If we skip mistakes in description of it, 
there is still a question why do we need it for empty sequence? The next step 
which can be done after creation of empty sequence to add some element to it, 
but SequenceInsert do not check type of new tensor with previous one.
   I checked and looks like unfortunately `_expr.Tuple(...)` does not allow to 
set dtype. I think we can skip this attribute because of its uselessness



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to