Skip to content

Commit ec431ee

Browse files
Address comments
Change-Id: I6f6d6f766b097a8fc0aadbcd3929ce068e3fea9d
1 parent 3a556bd commit ec431ee

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

python/tvm/topi/arm_cpu/mprofile/dsp/micro_kernel/multi_channel_convolve.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,11 @@ def _dual_int16_channel_convolve_impl(_tensor_h, tensor_w, channels, kernel_h, k
187187
int32_t sum_c1 = 0;
188188
189189
int32_t kernel_i32[{kernel_h} * {kernel_w}];
190-
memcpy(kernel_i32, kernel, {kernel_h} * {kernel_w} * 4);
190+
memcpy(kernel_i32, kernel, {kernel_h} * {kernel_w} * sizeof(int32_t));
191191
192192
int32_t tensor_length = {((kernel_w - 1) * (channels // 2) + (kernel_h - 1) * tensor_w * (channels // 2)) + 1};
193193
int32_t tensor_i32[tensor_length];
194-
memcpy(tensor_i32, tensor, tensor_length * 4);
194+
memcpy(tensor_i32, tensor, tensor_length * sizeof(int32_t));
195195
196196
#pragma GCC unroll 3
197197
for (int i = 0; i < {kernel_h}; i++) {{

tests/python/relay/aot/corstone300.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ PKG_CFLAGS = ${PKG_COMPILE_OPTS} \
6464
CMAKE_FLAGS = -DCMAKE_TOOLCHAIN_FILE=${TVM_ROOT}/tests/python/contrib/test_ethosu/reference_system/arm-none-eabi-gcc.cmake \
6565
-DCMAKE_SYSTEM_PROCESSOR=${MCPU}
6666

67+
# -fdata-sections together with --gc-section may lead to smaller statically-linked executables
6768
PKG_LDFLAGS = -lm -specs=nosys.specs -static -Wl,--gc-sections -T ${AOT_TEST_ROOT}/corstone300.ld
6869

6970
$(ifeq VERBOSE,1)
@@ -113,6 +114,7 @@ ${build_dir}/libcmsis_startup.a: $(CMSIS_STARTUP_SRCS)
113114
$(QUIET)$(AR) -cr $(abspath $(build_dir)/libcmsis_startup.a) $(abspath $(build_dir))/libcmsis_startup/*.o
114115
$(QUIET)$(RANLIB) $(abspath $(build_dir)/libcmsis_startup.a)
115116

117+
# -fdata-sections together with --gc-section may lead to smaller statically-linked executables
116118
${build_dir}/libcmsis_nn.a: $(CMSIS_NN_SRCS)
117119
$(QUIET)mkdir -p $(abspath $(build_dir)/libcmsis_nn)
118120
$(QUIET)cd $(abspath $(build_dir)/libcmsis_nn) && $(CC) -c $(PKG_CFLAGS) -ffunction-sections -fdata-sections -D${ARM_CPU} $^

0 commit comments

Comments
 (0)