Menooker commented on a change in pull request #5357:
URL: https://github.com/apache/incubator-tvm/pull/5357#discussion_r418919351
##########
File path: python/tvm/relay/op/strategy/x86.py
##########
@@ -84,8 +88,13 @@ def conv2d_strategy_cpu(attrs, inputs, out_type, target):
raise ValueError("dilation should be positive value")
if groups == 1:
- if layout == "NCHW":
- assert kernel_layout == "OIHW"
+ if layout.startswith("NCHW"):
Review comment:
Ok, changed. Extract the same part of code handling HCWH and NCHWc to an
nested function.
##########
File path: python/tvm/relay/op/strategy/x86.py
##########
@@ -113,8 +122,13 @@ def conv2d_strategy_cpu(attrs, inputs, out_type, target):
else:
raise RuntimeError("Unsupported conv2d layout {} for
x86".format(layout))
elif is_depthwise_conv2d(data.shape, layout, kernel.shape, kernel_layout,
groups):
- if layout == "NCHW":
- assert kernel_layout == "OIHW"
+ if layout.startswith("NCHW"):
Review comment:
changed as required
----------------------------------------------------------------
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]