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/04/14 15:18:18 UTC

[GitHub] [tvm] grant-arm opened a new pull request, #11013: [CMSIS-NN] Add Arm(R) Cortex(R)-M55 CPU and CMSIS-NN demo

grant-arm opened a new pull request, #11013:
URL: https://github.com/apache/tvm/pull/11013

   This PR adds a microTVM application that demonstrates compiling a model for Arm(R) Cortex(R)-M55 CPU and CMSIS-NN.
   
   In particular, the demo:
   - Downloads a quantized (int8) person detection model
   - Uses tvmc to compile the model for Cortex(R)-M55 CPU and CMSIS-NN
   - Downloads an image to run the model on
   - Creates a C header file inputs.c containing the image data as a C array
   - Builds the demo application
   - Runs the demo application on the FVP
   - Application reports whether a person was detected e.g. "Person detected"
   
   @Mousius @leandron @areusch @ashutosh-arm @manupa-arm 
   


-- 
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] NicolaLancellotti commented on a diff in pull request #11013: [CMSIS-NN] Add Arm(R) Cortex(R)-M55 CPU and CMSIS-NN demo

Posted by GitBox <gi...@apache.org>.
NicolaLancellotti commented on code in PR #11013:
URL: https://github.com/apache/tvm/pull/11013#discussion_r852919398


##########
apps/microtvm/cmsisnn/src/demo_bare_metal.c:
##########
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <stdio.h>
+#include <tvm_runtime.h>
+#include <tvmgen_detection.h>
+
+#include "uart.h"
+
+// Header files generated by convert_image.py
+#include "inputs.h"
+#include "outputs.h"
+
+int abs(int v) { return v * ((v > 0) - (v < 0)); }

Review Comment:
   Just for curiosity, is there a particular reason why abs is implemented this way?
   That is, for example, instead of `v >= 0 ? v : -v`.



-- 
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] areusch commented on pull request #11013: [CMSIS-NN] Add Arm(R) Cortex(R)-M55 CPU and CMSIS-NN demo

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

   thanks @grant-arm !


-- 
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] areusch merged pull request #11013: [CMSIS-NN] Add Arm(R) Cortex(R)-M55 CPU and CMSIS-NN demo

Posted by GitBox <gi...@apache.org>.
areusch merged PR #11013:
URL: https://github.com/apache/tvm/pull/11013


-- 
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] grant-arm commented on a diff in pull request #11013: [CMSIS-NN] Add Arm(R) Cortex(R)-M55 CPU and CMSIS-NN demo

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


##########
apps/microtvm/cmsisnn/src/demo_bare_metal.c:
##########
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <stdio.h>
+#include <tvm_runtime.h>
+#include <tvmgen_detection.h>
+
+#include "uart.h"
+
+// Header files generated by convert_image.py
+#include "inputs.h"
+#include "outputs.h"
+
+int abs(int v) { return v * ((v > 0) - (v < 0)); }

Review Comment:
   Thanks for drawing my attention to this @NicolaLancellotti.
   This code was copied from the microNPU demo and to be honest I'm not sure why it was done that way.
   I did notice though that the CMSIS-NN only demo doesn't make use of the abs() function, so I've removed it now.



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