ashutosh-arm commented on code in PR #13484:
URL: https://github.com/apache/tvm/pull/13484#discussion_r1031733203


##########
src/relay/backend/contrib/cmsisnn/relay_to_tir.cc:
##########
@@ -309,6 +309,12 @@ class RelayToTIRVisitor : public MixedModeMutator {
       fc_call = requantize_input;
     }
 
+    int32_t dtype_bits = 
fc_call->args[0]->type_as<TensorTypeNode>()->dtype.bits();

Review Comment:
   nit: a comment maybe?



##########
src/relay/backend/contrib/cmsisnn/relay_to_tir.cc:
##########
@@ -341,8 +347,8 @@ class RelayToTIRVisitor : public MixedModeMutator {
       clip_min = clip_attrs->a_min;
       clip_max = clip_attrs->a_max;
     } else {
-      clip_min = -128;
-      clip_max = 127;
+      clip_min = -static_cast<int>(1 << dtype_bits);

Review Comment:
   Could you please also have a look at 
https://github.com/apache/tvm/blob/3680b3cb49f82a4dcff559ace509ed2ed3aa02da/src/relay/backend/contrib/cmsisnn/relay_to_tir.cc#L193?
 Looks incorrect there in the Conv2D implementation.



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