Skip to content

About ConvTransposeOpPattern2 matchAndRewrite Impl ==> error "Channel Out (M) must be a multiple of the number of groups" #3326

@aijyo

Description

@aijyo

When running onnx-mlir.exe --EmitLib I get the error "Channel Out (M) must be a multiple of the number of groups". After inspecting the source I found that the onnx-mlir I built (commit/branch: 72b796c) performs the following in ConvTransposeOpPattern2::matchAndRewrite for ConvTranspose's weight W:

auto reversed_w = onnx_mlir::reverseWeightTensor(rewriter, odsLoc, (*w.begin())); and then passes reversed_w to ::mlir::ONNXConvOp::create.

From documentation I understand that ConvTranspose2d weight shape = (C_in, C_out / g, K_h, K_w) while Conv2d weight shape = (C_out, C_in / g, K_h, K_w). The way ConvTransposeOpPattern2::matchAndRewrite handles reversed_w looks like it may not correctly implement the corresponding transformation between these weight layouts.

Could you please review this logic and confirm whether the implementation of ConvTransposeOpPattern2 is correct? Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions