manupa-arm commented on a change in pull request #9794:
URL: https://github.com/apache/tvm/pull/9794#discussion_r786059348



##########
File path: python/tvm/relay/backend/contrib/ethosu/tir/scheduler.py
##########
@@ -135,7 +135,17 @@ def _visit(tensor, reader, lut):
             if tensor not in planned:
                 planned.add(tensor)
                 if isinstance(tensor.op, tvm.te.PlaceholderOp) and tensor != 
lut:
-                    index = list(cached_func.inputs).index(tensor)
+                    # Find index of input using 'same_as' check to prevent 
equality
+                    # ambiguity when encountering a scalar.
+                    index = -1
+                    for i, var in enumerate(cached_func.inputs):

Review comment:
       nit : could use something like : 
   [input for input in cached_func.inputs if input.same_as(tensor)] and then 
checking the resulting list ?




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