[Relax] Add conv3d_transpose and ONNX ConvTranspose 3D support#18948
Merged
tlopex merged 2 commits intoapache:mainfrom Mar 29, 2026
Merged
[Relax] Add conv3d_transpose and ONNX ConvTranspose 3D support#18948tlopex merged 2 commits intoapache:mainfrom
tlopex merged 2 commits intoapache:mainfrom
Conversation
Introduce relax.nn.conv3d_transpose (attrs, C++ inference/layout, Python API) and lower it to TOPI group_conv3d_transpose_ncdhw when using NCDHW/IODHW with dilation 1, matching the conv2d_transpose legalization policy. Wire the Relax ONNX frontend to emit conv3d_transpose for 5D inputs. Extend tests for ONNX, struct info, LegalizeOps, and TVMScript round-trip; fix ConvTranspose test output spatial size to include output_padding.
Contributor
There was a problem hiding this comment.
Code Review
This pull request implements the conv3d_transpose operator in TVM Relax, including its C++ and Python APIs, attribute definitions, and ONNX frontend support. It also provides legalization logic to TOPI and comprehensive unit tests for shape inference and frontend integration. The review feedback identifies a typo in the Python docstring, suggests a more idiomatic dilation check in the legalization pass, and points out a redundant, unreachable logic block in the C++ struct info inference code.
- Fix conv3d_transpose out_dtype docstring wording - Use any(d != 1 for d in dilation) in conv2d/conv3d transpose legalize - Remove unreachable output_padding else-if in conv2d/conv3d transpose infer
Contributor
Author
|
cc @tlopex |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce relax.nn.conv3d_transpose (attrs, C++ inference/layout, Python API) and lower it to TOPI group_conv3d_transpose_ncdhw when using NCDHW/IODHW with dilation 1, matching the conv2d_transpose legalization policy.
Wire the Relax ONNX frontend to emit conv3d_transpose for 5D inputs. Extend tests for ONNX, struct info, LegalizeOps, and TVMScript round-trip; fix ConvTranspose test output spatial size to include output_padding.#18945