ibsidorenko commented on code in PR #13080:
URL: https://github.com/apache/tvm/pull/13080#discussion_r997234154


##########
python/tvm/topi/hexagon/tensor_intrin.py:
##########
@@ -73,6 +73,58 @@ def _q_multiply_shift_hexagon(op):
 )
 
 
+def _q_multiply_shift_per_axis_hexagon(op):
+    """
+    Implementation of q_multiply_shift_per_axis through hexagon intrinsics 
vmpyewuh and vmpyowh when
+    q == 31.
+
+    Please note that this is introducing a small round-up error for some 
corner cases when we do
+    right shift. This is because we are rounding twice instead than only once. 
I.e.:
+
+        * original q_multiply_shift: round(x*y*2^-s)
+        * hexagon q_multiply_shift: round(round(x*y)*2^-s)

Review Comment:
   I will add test to demonstrate issue with accuracy.



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