guberti commented on code in PR #12856:
URL: https://github.com/apache/tvm/pull/12856#discussion_r982148824
##########
python/tvm/topi/arm_cpu/conv2d_alter_op.py:
##########
@@ -121,7 +124,33 @@ def _alter_conv2d_layout(attrs, inputs, tinfos, out_type):
idxd = tvm.tir.indexdiv
- # We don't perform layout alteration for NHWC layout with real data types
+ if topi_tmpl == "depthwise_conv2d_nhwc_dsp.arm_cpu":
+ assert data_layout == "NHWC" and kernel_layout == "HWOI"
+ channels = get_const_tuple(data.shape)[3]
+ KH, KW, _, _ = get_const_tuple(kernel.shape)
+ simd_width = get_dtype_simd_width(data.dtype)
+
+ HWOI_kernel_np = inputs[1].data.numpy()
Review Comment:
Unfortunately, a clean fix is pretty hard. Inside `alter_conv2d_layout`, the
type signature allows us to easily check if the kernel is a constant:
```
--
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]