From d351b9c0097cb8a6d8461adae41bebdb09bab773 Mon Sep 17 00:00:00 2001 From: Andrew Reusch Date: Fri, 24 Apr 2020 23:41:22 +0000 Subject: [PATCH] address logan's comments --- src/runtime/micro/openocd_low_level_device.cc | 4 ++-- topi/python/topi/arm_cpu/conv2d_spatial_pack.py | 2 +- topi/python/topi/arm_cpu/cortex_m7/micro_kernel/gemm.py | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/runtime/micro/openocd_low_level_device.cc b/src/runtime/micro/openocd_low_level_device.cc index 68c036a89301..0f21d6674740 100644 --- a/src/runtime/micro/openocd_low_level_device.cc +++ b/src/runtime/micro/openocd_low_level_device.cc @@ -207,8 +207,8 @@ class OpenOCDLowLevelDevice final : public LowLevelDevice { /*! \brief number of bytes in a word on the target device (64-bit) */ static const constexpr ssize_t kWordSize = 8; - // NOTE: OpenOCD will call any request larger than this constant an "absurd - // request". + // NOTE: The OS pipe buffer must be able to handle a line long enough to + // print this transfer request. /*! \brief maximum number of bytes allowed in a single memory transfer */ static const constexpr ssize_t kMemTransferLimit = 8000; /*! \brief number of milliseconds to wait for function execution to halt */ diff --git a/topi/python/topi/arm_cpu/conv2d_spatial_pack.py b/topi/python/topi/arm_cpu/conv2d_spatial_pack.py index b4f8e7cf836d..a4d7ad83b1c8 100644 --- a/topi/python/topi/arm_cpu/conv2d_spatial_pack.py +++ b/topi/python/topi/arm_cpu/conv2d_spatial_pack.py @@ -173,7 +173,7 @@ def schedule_conv2d_spatial_pack_nchw(cfg, s, data_vec, kernel_vec, axis_lens=[cfg['tile_oh'].size[-1], cfg['tile_ow'].size[-1], cfg['tile_co'].size[-1]], - max_unroll=None, + max_unroll=16, cfg=cfg) s[conv].compute_at(s[last], ow) diff --git a/topi/python/topi/arm_cpu/cortex_m7/micro_kernel/gemm.py b/topi/python/topi/arm_cpu/cortex_m7/micro_kernel/gemm.py index 70cd46bb32c2..2169176c0711 100644 --- a/topi/python/topi/arm_cpu/cortex_m7/micro_kernel/gemm.py +++ b/topi/python/topi/arm_cpu/cortex_m7/micro_kernel/gemm.py @@ -34,7 +34,7 @@ def intrin_gemm_MxKxN(M, K, N, in_dtype, out_dtype): # collisions in the generated source (e.g., if there are multiple operators # in the same module that use the same intrinsic) # - # TODO to cut down on memory usage, we should cache each intrinsic + # TODO(areusch): to cut down on memory usage, we should cache each intrinsic # instantiation and include it only once, eliminating the need for unique # IDs UNIQ_ID_LEN = 8 @@ -47,7 +47,7 @@ def intrin_gemm_MxKxN(M, K, N, in_dtype, out_dtype): if isinstance(N, tvm.tir.IntImm): N = N.value assert K % 4 == 0 - # TODO support more dtypes? + # TODO(areusch): support more dtypes? assert in_dtype == 'int8' assert out_dtype == 'int32' A = te.placeholder((M, K), name='a', dtype=in_dtype) @@ -124,7 +124,7 @@ def _body(): def gemm_MxKxN_impl(M, K, N, uniq_id): """Emit C code for gemm impl.""" - # TODO are there any SIMD tricks to zero out arrays quickly? + # TODO(areusch): are there any SIMD tricks to zero out arrays quickly? aa_pad_size = M * K bb_pad_size = N * K # code reference: CMSIS-NN paper (https://arxiv.org/abs/1801.06601)