-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
Hi, I found some bugs in TVM relay type relation of conv3dtranspose.
tvm/src/relay/op/nn/convolution.cc
Line 597 in fe3fa9d
| static const Layout kOIDHW("OIDHW"); |
I believe the above line should be set to the IODHW layout, since the below conv3dtranspose kernel is made with the IODHW layout.
tvm/src/relay/op/nn/convolution.cc
Lines 629 to 630 in fe3fa9d
| Array<IndexExpr> wshape({dshape_ncdhw[1], indexdiv(param->channels, param->groups), | |
| param->kernel_size[0], param->kernel_size[1], param->kernel_size[2]}); |
Additionally, this line should use 'indexdiv(param->channels, param->groups)' like Conv2dTransposeRel instead of dividing the input channels by the number of groups.
tvm/src/relay/op/nn/convolution.cc
Line 663 in fe3fa9d
| ICHECK(reporter->AssertEQ(indexdiv(dshape_ncdhw[1], param->groups), wshape[0])); |
The weight of this test is treated as 'OIDHW' layout(the default kernel layout for conv3dtranspose is "OIDHW") despite having 10 input channels and 12 output channels.
tvm/tests/python/relay/test_op_level2.py
Lines 785 to 787 in fe3fa9d
| x = relay.var("x", relay.TensorType((n, c, d, h, w), "int8")) | |
| w = relay.var("w", relay.TensorType((10, 12, 3, 3, 3), "int8")) | |
| y = relay.nn.conv3d_transpose(x, w, out_dtype="int32") |
Correct me if I'm wrong. Once again, thanks for your wonderful framework!