-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
添加主函数后运行test_gcd.py可得到结果
然后就是持续的running,可能存在死循环 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(): |
There was a problem hiding this comment.
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 可以复用旧静态图构图分支。这里可以复原
if in_dynamic_or_pir_mode(): | |
if in_dynamic_mode(): |
gcd 的适配有另一个开发者(“敏师傅”)已经完成了,#59600 ~ 当前 PR 就先关掉了,有空的时候可以推进一下其他的 pr 😄 |
PR types
Others
PR changes
APIs
Description
#58067
PIR API 推全升级
将算子迁移升级至 pir,并更新单测
paddle.Tensor.gcd(0/5):添加test_with_pir_api时单测卡住没有结果