How to decide the tiling size?

In the tutorial “convolution_opt.py”, why are the tiling sizes 128,16,7 as following:

//Let’s define tiling sizes
b_block = 1 // env.BATCH
oc_block = 128 // env.BLOCK_OUT
ic_block = 16 // env.BLOCK_IN
h_block = 7
w_block = 14

So after I change the sizes from 128,16 to other sizes, the errors emerge.

I assume you’re targeting VTA? You may want to change the label of the post to include [VTA]

Right now the IR passes that target VTA are a little rigid, and can break easily. What I recommend is trying autotuning to find a configuration that works automatically.

See the conv2d scheduling template: https://github.com/dmlc/tvm/blob/master/vta/python/vta/top/vta_conv2d.py#L109-L118

To tune any given layer, you can try this: https://github.com/dmlc/tvm/blob/master/vta/scripts/tune_conv2d.py

Thanks! But I want to match the VTA hardware config (like BLOCK from 4 to 5) via modifying the complier statically rather than autotune. So are there some good solutions?

I see, right now the manual solution consists of trial and error, although I agree the process could be improved.