For alter_op_layout, we will alter the weight layout, normally we will change the weight layout to 5D, the last dim is queried from our AutoTVM log file. For example:
if topi_tmpl == "conv2d_nchw_spatial_pack.arm_cpu":
assert data_layout == "NCHW" and kernel_layout == "OIHW"
N, CI, H, W = get_const_tuple(data.shape)
CO, _, KH, KW = get_const_tuple(kernel.shape)
VC = cfg['tile_co'].size[-1]
If there is no workload, we don’t want to change the layout. However, you could argue we could set one fixed value like 8, but if you do this, you need to change the compute logic of conv2d too (like def conv2d_spatial_pack_nchw). At there, we will say the VC is cfg['tile_co]`, not 8.
Default legalization will make sense.