You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/11/24 16:39:37 UTC

[GitHub] [tvm] neildhickey opened a new pull request, #13484: [CMSIS-NN] Support for int16 in fully connected layer

neildhickey opened a new pull request, #13484:
URL: https://github.com/apache/tvm/pull/13484

   Support for int16 fully_connected via CMSIS-NN
   
   -Pattern matching and RelayToTIR introduce int16 support 
   -Added int16 variants to fully_connected tests


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] ashutosh-arm commented on a diff in pull request #13484: [CMSIS-NN] Support for int16 in fully connected layer

Posted by GitBox <gi...@apache.org>.
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] ashutosh-arm merged pull request #13484: [CMSIS-NN] Support for int16 in fully connected layer

Posted by GitBox <gi...@apache.org>.
ashutosh-arm merged PR #13484:
URL: https://github.com/apache/tvm/pull/13484


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] ashutosh-arm commented on pull request #13484: [CMSIS-NN] Support for int16 in fully connected layer

Posted by GitBox <gi...@apache.org>.
ashutosh-arm commented on PR #13484:
URL: https://github.com/apache/tvm/pull/13484#issuecomment-1326735954

   cc @lhutton1  @NicolaLancellotti 


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] tvm-bot commented on pull request #13484: [CMSIS-NN] Support for int16 in fully connected layer

Posted by GitBox <gi...@apache.org>.
tvm-bot commented on PR #13484:
URL: https://github.com/apache/tvm/pull/13484#issuecomment-1326668333

   <!---bot-comment-->
   
   Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from [Reviewers](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#reviewers) by @-ing them in a comment.
   
   <!--bot-comment-ccs-start-->
    * cc @areusch, @ashutosh-arm <sub>See [#10317](https://github.com/apache/tvm/issues/10317) for details</sub><!--bot-comment-ccs-end-->
   
   <sub>Generated by [tvm-bot](https://github.com/apache/tvm/blob/main/ci/README.md#github-actions)</sub>


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] ashutosh-arm commented on a diff in pull request #13484: [CMSIS-NN] Support for int16 in fully connected layer

Posted by GitBox <gi...@apache.org>.
ashutosh-arm commented on code in PR #13484:
URL: https://github.com/apache/tvm/pull/13484#discussion_r1031736047


##########
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org