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 PIR Unittest No.276,342,395,377,435,445】Fix gather_nd/tree/histogramdd UT #65799

Merged
merged 9 commits into from
Jul 11, 2024

Conversation

Aurelius84
Copy link
Contributor

@Aurelius84 Aurelius84 commented Jul 8, 2024

PR Category

Execute Infrastructure

PR Types

Not User Facing

Description

Pcard-67164

关联Issue:#63740

Copy link

paddle-bot bot commented Jul 8, 2024

你的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.

@Aurelius84 Aurelius84 changed the title [PIR]Fix gather_nd/tree/hisgoram UT 【Fix PIR Unittest No.342,395,377,445】Fix gather_nd/tree/hisgoram UT Jul 8, 2024
@Aurelius84 Aurelius84 changed the title 【Fix PIR Unittest No.342,395,377,445】Fix gather_nd/tree/hisgoram UT 【Fix PIR Unittest No.276,342,395,377,435,445】Fix gather_nd/tree/hisgoram UT Jul 8, 2024
@Aurelius84 Aurelius84 changed the title 【Fix PIR Unittest No.276,342,395,377,435,445】Fix gather_nd/tree/hisgoram UT 【Fix PIR Unittest No.276,342,395,377,435,445】Fix gather_nd/tree/histogramdd UT Jul 8, 2024
@PaddlePaddle PaddlePaddle locked and limited conversation to collaborators Jul 10, 2024
@PaddlePaddle PaddlePaddle unlocked this conversation Jul 10, 2024
@Aurelius84 Aurelius84 closed this Jul 10, 2024
@Aurelius84 Aurelius84 reopened this Jul 10, 2024
@@ -221,6 +225,7 @@ def gather_tree(ids: Tensor, parents: Tensor) -> Tensor:
raise ValueError("The ids's shape must be the same as parents' shape. ")

if in_dynamic_or_pir_mode():
check_dtype(parents.dtype, "parents", ['int32', 'int64'], 'gather_tree')
Copy link
Contributor

Choose a reason for hiding this comment

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

这个最好加一个if in_pir_mode()更好的写法是:
if in_dynamic_mode():
_c_ops.xxx
if in_pir_mode():
check
_c_ops.xxx
这样不会影响动态图性能

Copy link
Contributor Author

Choose a reason for hiding this comment

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

check_xx系列的函数实现里已经内含了跳过动态图处理的判断,相对轻量级

@@ -5277,6 +5277,7 @@ def gather_nd(x: Tensor, index: Tensor, name: str | None = None) -> Tensor:

"""
if in_dynamic_or_pir_mode():
check_dtype(index.dtype, "index", ['int32', 'int64'], 'gather_nd')
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 Author

Choose a reason for hiding this comment

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

check_xx系列的函数实现里已经内含了跳过动态图处理的判断,相对轻量级

@Aurelius84 Aurelius84 merged commit 09f6b0b into PaddlePaddle:develop Jul 11, 2024
31 of 33 checks passed
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.

2 participants