Menooker commented on a change in pull request #5357:
URL: https://github.com/apache/incubator-tvm/pull/5357#discussion_r420067574



##########
File path: python/tvm/relay/op/strategy/x86.py
##########
@@ -128,6 +135,15 @@ def conv2d_strategy_cpu(attrs, inputs, out_type, target):
                     wrap_compute_conv2d(topi.nn.depthwise_conv2d_nchw),
                     
wrap_topi_schedule(topi.generic.schedule_depthwise_conv2d_nchw),
                     name="depthwise_conv2d_nchw.generic")
+        if layout == "NCHW":
+            assert kernel_layout == "OIHW"
+            channel_multiplier = get_const_tuple(inputs[1].shape)[1]
+            add_implementation_depthwise_nchw(channel_multiplier)
+        elif _NCHWc_matcher.match(layout): # check if layout is NCHWxc
+            assert _OIHWio_matcher.match(kernel_layout) # check if kernel is 
OIHWio
+            kernel_shape = get_const_tuple(inputs[1].shape)
+            channel_multiplier = kernel_shape[1] * kernel_shape[4]
+            add_implementation_depthwise_nchw(channel_multiplier)

Review comment:
       ok, now redirected to `depthwise_conv2d_NCHWc_strategy_cpu`




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to