Skip to content

Conversation

@chaitanyakamarapu
Copy link
Collaborator

Simplifying the four phase conv merge in convtranspose phased decomposition

@chaitanyakamarapu chaitanyakamarapu marked this pull request as ready for review August 12, 2025 15:47
@chaitanyakamarapu chaitanyakamarapu changed the title Chaitany.simply convtranspose decomposition Simplifying the convtranspose decomposition Aug 13, 2025
Copy link

@jorickert jorickert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not verify the math behind it, but it looks technically fine.
Just make sure that we have a check that batch == 1

Copy link

@ehsan-toosi ehsan-toosi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The decomposition looks good to me but I have one question. Has it ever checked the convTranspose is 2d? I didn't see that check or maybe I overlooked it.

Comment on lines +30 to +33
// CHECK: %[[VAL_21:.*]] = "onnx.Slice"(%[[VAL_20]], %[[VAL_11]], %[[VAL_10]], %[[VAL_13]], %[[VAL_12]]) : (tensor<256x512x6x6xf32>, tensor<2xi64>, tensor<2xi64>, tensor<2xi64>, tensor<2xi64>) -> tensor<256x512x3x3xf32>
// CHECK: %[[VAL_22:.*]] = "onnx.Slice"(%[[VAL_20]], %[[VAL_9]], %[[VAL_8]], %[[VAL_13]], %[[VAL_12]]) : (tensor<256x512x6x6xf32>, tensor<2xi64>, tensor<2xi64>, tensor<2xi64>, tensor<2xi64>) -> tensor<256x512x3x3xf32>
// CHECK: %[[VAL_23:.*]] = "onnx.Slice"(%[[VAL_20]], %[[VAL_7]], %[[VAL_6]], %[[VAL_13]], %[[VAL_12]]) : (tensor<256x512x6x6xf32>, tensor<2xi64>, tensor<2xi64>, tensor<2xi64>, tensor<2xi64>) -> tensor<256x512x3x3xf32>
// CHECK: %[[VAL_24:.*]] = "onnx.Slice"(%[[VAL_20]], %[[VAL_5]], %[[VAL_4]], %[[VAL_13]], %[[VAL_12]]) : (tensor<256x512x6x6xf32>, tensor<2xi64>, tensor<2xi64>, tensor<2xi64>, tensor<2xi64>) -> tensor<256x512x3x3xf32>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could conv transpose have output some channel not multiple of 8?

…into chaitany.simply_convtransose_decomposition
@chaitanyakamarapu chaitanyakamarapu marked this pull request as draft August 13, 2025 09:30
@chaitanyakamarapu chaitanyakamarapu changed the title Simplifying the convtranspose decomposition [DO NOT MERGE] Simplifying the convtranspose decomposition Aug 13, 2025
@chaitanyakamarapu
Copy link
Collaborator Author

The decomposition looks good to me but I have one question. Has it ever checked the convTranspose is 2d? I didn't see that check or maybe I overlooked it.

We have a check for this.

if ((outputShape.size() != 4) || (stridesShape.size() != 2) ||

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants