From 39c622ec66d4da48d8c0d4b522e46a383d3e4d36 Mon Sep 17 00:00:00 2001 From: Wang Yao Date: Mon, 3 Jun 2019 13:30:46 -0700 Subject: [PATCH] Minor fix --- topi/python/topi/x86/conv2d.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/topi/python/topi/x86/conv2d.py b/topi/python/topi/x86/conv2d.py index 316be188e348..5775d80f9242 100644 --- a/topi/python/topi/x86/conv2d.py +++ b/topi/python/topi/x86/conv2d.py @@ -419,13 +419,14 @@ def _alter_conv2d_layout(attrs, inputs, tinfo, F): # only optimize for NCHW if layout != 'NCHW': return None - if groups != 1 and not is_depthwise: - return None assert attrs["kernel_layout"] == "OIHW" kshape = get_const_tuple(kernel.shape) is_depthwise = groups == kshape[0] and kshape[1] == 1 + if groups != 1 and not is_depthwise: + return None + dispatch_ctx = autotvm.task.DispatchContext.current target = tvm.target.current_target() # query schedule and fallback if necessary