tvm icon indicating copy to clipboard operation
tvm copied to clipboard

Confused about this line. Is it really correct?

Open moderato opened this issue 7 years ago • 2 comments

Hello! I'm a bit confused about this line:

https://github.com/dmlc/tvm/blob/84590063225e71eb12e90cf625aa54c3d790c620/topi/python/topi/cuda/conv2d_direct.py#L100

In an NCHW conv2d operation, the layout of the kernel is supposed to be OIHW. However, looks like this line is assuming the layout OHWI, which makes me confused, although this doesn't actually affect the flops calculation.

Anyone could explain? Thanks!

moderato avatar Mar 02 '19 01:03 moderato

You may be right about this; it currently does not affect the correctness as all three values are used in a commutative way anyway for the flop calculation. Can you show a simple example with a known workload (e.g., ResNet-18 layers) and see if the extracted values are incorrect?

eqy avatar Mar 02 '19 01:03 eqy

Thanks for bringing this up, it would be great to move discussions to https://discuss.tvm.ai/

tqchen avatar Mar 02 '19 03:03 tqchen