ashutosh-arm commented on code in PR #14003:
URL: https://github.com/apache/tvm/pull/14003#discussion_r1112221540
##########
python/tvm/topi/arm_cpu/conv2d_spatial_pack.py:
##########
@@ -302,9 +303,27 @@ def conv2d_spatial_pack_nhwc(cfg, data, kernel, strides,
padding, dilation, out_
)
cfg.define_annotate("ann_reduce", [kh, kw], policy="try_unroll")
- cfg.define_annotate("ann_spatial", [ohi, owi, oci],
policy="try_unroll_vec")
+ cfg.define_annotate("ann_spatial", [owi, oci], policy="try_unroll_vec")
# ====================================================================
+ # If there are no tuning records, use this config
+ if cfg.is_fallback:
+
+ def _tile_size(axis, candidates):
+ for candidate in candidates:
+ tiles_divisible_by_candidate = axis % candidate == 0
+ if tiles_divisible_by_candidate:
+ return candidate
+ return 1
+
+ cfg["tile_oh"] = SplitEntity([-1, 1])
+ cfg["tile_ow"] = SplitEntity([-1, _tile_size(OW, [8, 4])])
+ cfg["tile_co"] = SplitEntity([-1, _tile_size(OC, [8, 4])])
Review Comment:
nit: can we add a comment about using those numbers?
--
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]