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

Fix Python IndexError of case2-3 #49986

Merged
merged 5 commits into from
Feb 1, 2023
Merged

Fix Python IndexError of case2-3 #49986

merged 5 commits into from
Feb 1, 2023

Conversation

RedContritio
Copy link
Contributor

@RedContritio RedContritio commented Jan 21, 2023

PR types

Bug fixes

PR changes

APIs

Describe

解决了 Case2 和 Case3

Solution

  • 限制 x 的 ndim == 3

@paddle-bot
Copy link

paddle-bot bot commented Jan 21, 2023

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot paddle-bot bot added contributor External developers status: proposed labels Jan 21, 2023
@RedContritio RedContritio changed the title Fix Python IndexError of case2: paddle.incubate.nn.FusedMultiHeadAttention Fix Python IndexError of case2-3 Jan 21, 2023
@luotao1 luotao1 mentioned this pull request Jan 22, 2023
wanghuancoder
wanghuancoder previously approved these changes Jan 30, 2023
Comment on lines 618 to 624
if x.ndim == 3:
pass
else:
raise ValueError(
f"The rank of the x should be 3, but received {x.ndim}."
)

Copy link
Contributor

Choose a reason for hiding this comment

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

用!=吧

Copy link
Contributor

@wanghuancoder wanghuancoder left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@JamesLim-sy JamesLim-sy left a comment

Choose a reason for hiding this comment

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

LGTM

@luotao1 luotao1 merged commit fd5b8ee into PaddlePaddle:develop Feb 1, 2023
pangengzheng pushed a commit to pangengzheng/Paddle that referenced this pull request Feb 2, 2023
* add shape check for fused_multi_head_attention

* use raise for coverage test

* add unittest

* remove unnecessary pass

* add unittest
@RedContritio RedContritio deleted the fused_multi_head_attention branch February 13, 2023 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants