You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by tq...@apache.org on 2020/11/29 15:06:34 UTC

[tvm] branch main updated: Include required CMSIS headers in Cortex-M micro kernel. (#6988)

This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new 64ca1cd  Include required CMSIS headers in Cortex-M micro kernel. (#6988)
64ca1cd is described below

commit 64ca1cd88be091359b93948af8f51616cbbbe541
Author: Andrew Reusch <ar...@octoml.ai>
AuthorDate: Sun Nov 29 07:06:25 2020 -0800

    Include required CMSIS headers in Cortex-M micro kernel. (#6988)
    
    * The existing kernels referenced CMSIS functions presuming that
       those functions were defined by user code. This was the case with
       the old blog post build flow. Add #include, since it's impossible
       to compile the kernels without it.
     * TODO: port those functions to the micro kernels and remove external dependency
---
 python/tvm/topi/arm_cpu/cortex_m7/micro_kernel/gemm.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/python/tvm/topi/arm_cpu/cortex_m7/micro_kernel/gemm.py b/python/tvm/topi/arm_cpu/cortex_m7/micro_kernel/gemm.py
index 943aee0..fb6f7a5 100644
--- a/python/tvm/topi/arm_cpu/cortex_m7/micro_kernel/gemm.py
+++ b/python/tvm/topi/arm_cpu/cortex_m7/micro_kernel/gemm.py
@@ -129,6 +129,9 @@ def gemm_MxKxN_impl(M, K, N, uniq_id):
 #ifdef __cplusplus
 extern "C"
 #endif
+#include <arm_math.h>
+#include <arm_nnsupportfunctions.h>
+
 __STATIC_FORCEINLINE int32_t gemm_{M}x{K}x{N}_body_{uniq_id}(
     int8_t *aa, int8_t *bb, int32_t *cc,
     int A_stride, int B_stride, int C_stride) {{