jverma-quic commented on code in PR #11417:
URL: https://github.com/apache/tvm/pull/11417#discussion_r883864069


##########
tests/python/contrib/test_hexagon/infrastructure.py:
##########
@@ -228,3 +227,18 @@ def compute(n, ho, wo, ko, hi, wi, ki):
         )
 
     return output_shape, compute
+
+
+# Transpose and reshape numpy array according to the specified layout
+def transform_numpy(arr_np, layout):

Review Comment:
   > The function seems to assume that the supplied layout is NHWC. Is that a 
safe assumption for all expected uses of the function?
   > 
   > If no, then should we put `nhwc` into the function name, or perhaps change 
its argument list to something like `(arr_np, current_layout, new_layout)`?
   
   You're right that this function is making an assumption about the supplied 
layout which can transform the input incorrectly. I will include the 
current_layout as an argument. Thanks for the suggestion.



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