From b7364b42488ef2ae7b5a39122ae5ca55b28432d4 Mon Sep 17 00:00:00 2001 From: Leyuan Wang Date: Mon, 10 Feb 2020 14:13:35 -0800 Subject: [PATCH] reverse changes in pr #4849 (#4853) --- topi/python/topi/intel_graphics/conv2d.py | 40 +++++++++++------------ 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/topi/python/topi/intel_graphics/conv2d.py b/topi/python/topi/intel_graphics/conv2d.py index 4d1a4b3370db..f02eb497f519 100644 --- a/topi/python/topi/intel_graphics/conv2d.py +++ b/topi/python/topi/intel_graphics/conv2d.py @@ -50,27 +50,27 @@ def _get_default_config(cfg, data, kernel, strides, padding, out_dtype, is_depth oc_bn = i break - if HSTR == 2: - if out_channel + hkernel == 515: - block_oh = 4 - block_ow = 4 - else: - block_oh = 4 - block_ow = 5 - elif hkernel == 3: - if out_channel == 512: - block_oh = 2 - block_ow = 7 - else: - block_oh = 2 - block_ow = 14 + if HSTR == 2: + if out_channel + hkernel == 515: + block_oh = 4 + block_ow = 4 else: - block_oh = 1 - block_ow = 16 - cfg["tile_ic"] = SplitEntity([in_channel // ic_bn, ic_bn]) - cfg["tile_oc"] = SplitEntity([out_channel // oc_bn, oc_bn]) - cfg["block_oh"] = OtherOptionEntity(block_oh) - cfg["block_ow"] = OtherOptionEntity(block_ow) + block_oh = 4 + block_ow = 5 + elif hkernel == 3: + if out_channel == 512: + block_oh = 2 + block_ow = 7 + else: + block_oh = 2 + block_ow = 14 + else: + block_oh = 1 + block_ow = 16 + cfg["tile_ic"] = SplitEntity([in_channel // ic_bn, ic_bn]) + cfg["tile_oc"] = SplitEntity([out_channel // oc_bn, oc_bn]) + cfg["block_oh"] = OtherOptionEntity(block_oh) + cfg["block_ow"] = OtherOptionEntity(block_ow) def _create_schedule_template(cfg, data, kernel, strides, padding, dilation, layout):