ashutosh-arm commented on code in PR #13815:
URL: https://github.com/apache/tvm/pull/13815#discussion_r1086502205
##########
python/tvm/topi/arm_cpu/mprofile/dsp/micro_kernel/multi_channel_convolve.py:
##########
@@ -179,20 +179,26 @@ def _dual_int16_channel_convolve_impl(_tensor_h,
tensor_w, channels, kernel_h, k
extern "C"
#endif
int32_t {_get_func_name("int16", tensor_w, channels, kernel_h,
kernel_w, suffix)}(
- uint32_t *out,
- uint32_t *tensor,
- uint32_t *kernel) {{
+ int32_t *out,
+ int16_t *tensor,
+ int16_t *kernel) {{
- uint32_t sum_c0 = 0;
- uint32_t sum_c1 = 0;
+ int32_t sum_c0 = 0;
+ int32_t sum_c1 = 0;
+
+ int32_t kernel_i32[{kernel_h} * {kernel_w}];
+ memcpy(kernel_i32, kernel, {kernel_h} * {kernel_w} * 4);
+
+ int32_t tensor_length = {((kernel_w - 1) * (channels // 2) +
(kernel_h - 1) * tensor_w * (channels // 2)) + 1};
Review Comment:
The formulae don't look wrong. But it does not look like a C syntax. So, if
possible imho, we should drop braces.
--
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]