Skip to content

[Bug] Conv3Dtranspose default kernel layout should be IODHW #14326

@rebel-jangys

Description

@rebel-jangys

Hi, I found some bugs in TVM relay type relation of conv3dtranspose.

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.

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.

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.

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triagePRs or issues that need to be investigated by maintainers to find the right assignees to address itstatus: help wantedtype: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions