Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ pass_enhance ]transpose_flatten_concat_fuse_pass #33744

Conversation

Wangzheee
Copy link
Contributor

PR types

Others

PR changes

Others

Describe

pass增强: transpose_flatten_concat_fuse_pass

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

Shixiaowei02
Shixiaowei02 previously approved these changes Jun 25, 2021
Copy link
Contributor

@winter-wang winter-wang left a comment

Choose a reason for hiding this comment

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

我们在 #33770 中,将transpose2的data_format属性由def移到了extra中,因此对transpose2的data_format属性不再需要兼容性检测。请在pr 33770 合入之后,移除data_format属性的兼容性检测,再合入。

.IsTensor()
.End()
.AddAttr("axis")
.IsIntIn({0, 1, 2, 3})
Copy link
Contributor

Choose a reason for hiding this comment

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

请确认一下axis这个约束是否正确?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

应该是0,1,2,3,4,5

.IsTensor()
.End()
.AddAttr("axis")
.IsIntIn({0, 1, 2, 3})
Copy link
Contributor

Choose a reason for hiding this comment

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

再确认一下这个axis的范围

Copy link
Contributor Author

Choose a reason for hiding this comment

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

应该是0,1

.AddInput("X") // Input("X"): vector<tensors>
.End()
.AddInput("AxisTensor")
.IsOptional()
Copy link
Contributor

Choose a reason for hiding this comment

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

需要一个IsTensor()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

.AddOutput("XShape")
.IsTensor()
.End()
.AddAttr("axis")
Copy link
Contributor

Choose a reason for hiding this comment

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

这个axis,我理解应该只需要大于等于0就可以,请确认一下

Copy link
Contributor Author

Choose a reason for hiding this comment

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

在fuse的实现中必须要求是0或1,因为flatten之后为2D

Copy link
Contributor

@winter-wang winter-wang left a comment

Choose a reason for hiding this comment

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

LGTM

@Shixiaowei02 Shixiaowei02 merged commit 2e97faf into PaddlePaddle:develop Jun 29, 2021
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.

3 participants