ganler commented on code in PR #11174:
URL: https://github.com/apache/tvm/pull/11174#discussion_r861382672


##########
python/tvm/relay/frontend/onnx.py:
##########
@@ -324,6 +324,9 @@ def flatten_to_nd(x, x_shape, nd=3):
             0,
         )
         return _op.reshape(output, fold_constant(final_shape))
+    elif a_rank == 1:
+        return _op.multiply(inputs[0], inputs[1])

Review Comment:
   @masahi Oh sorry, I double-checked your comment and my previous fix of `op. 
multiply` is actually incorrect as its output shape is still `[3, 1]` not `[1]` 
(I passed the compile but the output shape is incorrect). Just fixed that with 
`_op.nn.matmul`.
   
   I also noticed that in TVM, the behaviour of matmul is more explicit than 
numpy that `vec` as `tensor_a` is unacceptable. Hence, I need to do unsqueeze 
and squeeze tricks here...



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