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

【PIR API adaptor No.257】Migrate paddle.Tensor.gcd into pir #59452

Closed
wants to merge 1 commit into from

Conversation

Olive-2019
Copy link

@Olive-2019 Olive-2019 commented Nov 28, 2023

PR types

Others

PR changes

APIs

Description

#58067
PIR API 推全升级
将算子迁移升级至 pir,并更新单测
paddle.Tensor.gcd(0/5):添加test_with_pir_api时单测卡住没有结果

Copy link

paddle-bot bot commented Nov 28, 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 the contributor External developers label Nov 28, 2023
@Olive-2019
Copy link
Author

Olive-2019 commented Nov 28, 2023

添加主函数后运行test_gcd.py可得到结果

.I1128 11:47:14.457212 99842 program_interpreter.cc:202] New Executor is Running.
I1128 11:47:14.458194 99842 while_op.cc:171] [ControlFlow][WhileOp] New Executor is Running.

然后就是持续的running,可能存在死循环
p.s. 添加的主函数为

if __name__ == '__main__':
    unittest.main()

@Olive-2019 Olive-2019 marked this pull request as draft November 28, 2023 13:15
@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Nov 29, 2023
@MarioLulab
Copy link
Contributor

添加主函数后运行test_gcd.py可得到结果

.I1128 11:47:14.457212 99842 program_interpreter.cc:202] New Executor is Running.
I1128 11:47:14.458194 99842 while_op.cc:171] [ControlFlow][WhileOp] New Executor is Running.

然后就是持续的running,可能存在死循环 p.s. 添加的主函数为

if __name__ == '__main__':
    unittest.main()

问题已收到,我尝试本地复现一下~

@@ -5657,7 +5657,7 @@ def _gcd_body_fn(x, y):
)
return (paddle.where(x < y, y, x), paddle.where(x < y, x, y))

if in_dynamic_mode():
if in_dynamic_or_pir_mode():
Copy link
Contributor

@MarioLulab MarioLulab Dec 7, 2023

Choose a reason for hiding this comment

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

因为 pir 下与控制流相关的算子适配了静态图专用 api (比如下面的 paddle.static.nn.while_loop ),所以涉及控制流 api 可以复用旧静态图构图分支。这里可以复原

Suggested change
if in_dynamic_or_pir_mode():
if in_dynamic_mode():

@MarioLulab
Copy link
Contributor

MarioLulab commented Dec 7, 2023

gcd 的适配有另一个开发者(“敏师傅”)已经完成了,#59600 ~ 当前 PR 就先关掉了,有空的时候可以推进一下其他的 pr 😄

@MarioLulab MarioLulab closed this Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants