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/08/23 20:02:20 UTC

[GitHub] [tvm] areusch commented on a diff in pull request #12512: [bug fix] fix split filter in conv1d and conv2d to avoid empty search space

areusch commented on code in PR #12512:
URL: https://github.com/apache/tvm/pull/12512#discussion_r953060785


##########
python/tvm/topi/arm_cpu/mprofile/dsp/conv2d.py:
##########
@@ -120,7 +121,12 @@ def conv2d_nhwc_dsp_compute(cfg, data, kernel, strides, padding, dilation, out_d
         policy="factors",
         num_outputs=2,
         # TODO: check case with in_channels.value % 4 != 0 with AutoTVM
-        filter=None if cfg.is_fallback else lambda x: x.size[-1] % 4 == 0,
+        # temp fix: if non of the splits are divisible by 4, don't filter them
+        # to prevent an empty search space, and allow autotuning to select the best one
+        filter=None
+        if cfg.is_fallback
+        else lambda x: x.size[-1] % 4 == 0

Review Comment:
   can you outline the lambda function into its own function here, if we wind up with this solution? generally speaking lambdas should be just 1-liners



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