correct error (#4093)
authorLeyuan Wang <laurawly@gmail.com>
Thu, 10 Oct 2019 19:55:59 +0000 (12:55 -0700)
committerTianqi Chen <tqchen@users.noreply.github.com>
Thu, 10 Oct 2019 19:55:59 +0000 (12:55 -0700)
topi/python/topi/intel_graphics/conv2d.py

index f8bb16f..9b0ad0c 100644 (file)
@@ -237,7 +237,8 @@ def _alter_conv2d_layout(attrs, inputs, tinfo, F):
     if cfg.is_fallback:
         _get_default_config(cfg, data, kernel, strides, padding, out_dtype, is_depthwise)
 
-    ic_bn, oc_bn = cfg["tile_ic"].size[-1], cfg["tile_oc"].size[-1]
+    ic_bn = cfg["tile_ic"].val if hasattr(cfg["tile_ic"], "val") else cfg["tile_ic"].size[-1]
+    oc_bn = cfg["tile_oc"].val if hasattr(cfg["tile_oc"], "val") else cfg["tile_oc"].size[-1]
 
     new_attrs[layout_name] = 'NCHW%dc' % ic_bn
     new_attrs['out_layout'] = 'NCHW%dc' % oc_bn