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

[Hackathon 5th No.49][pir] add some operation - Part 3 #58219

Merged
merged 3 commits into from
Oct 23, 2023

Conversation

gouzil
Copy link
Member

@gouzil gouzil commented Oct 19, 2023

PR types

Others

PR changes

APIs

Description

新增:

  • __pow____rpow__** (前面这俩直接调用还有点问题)
  • __floordiv__//
  • __mod__%
  • __matmul__@

相关链接:

@paddle-bot
Copy link

paddle-bot bot commented Oct 19, 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 Oct 19, 2023
test/legacy_test/test_math_op_patch_pir.py Show resolved Hide resolved
test/legacy_test/test_math_op_patch_pir.py Outdated Show resolved Hide resolved
test/legacy_test/test_math_op_patch_pir.py Outdated Show resolved Hide resolved
@gouzil gouzil requested a review from 0x45f October 21, 2023 03:04
res_np_c = paddle.pow(paddle.to_tensor(x_np), 2)
# TODO(gouzil): solve paddle.fill_constant problem
# res_np_d = x_np.__pow__(2)
# res_np_e = x_np.__rpow__(2)
Copy link
Contributor

Choose a reason for hiding this comment

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

后续可以把一些没有用的注释删掉~

)
np.testing.assert_allclose(res_np_b, b_np, rtol=1e-05)
np.testing.assert_allclose(res_np_c, c_np, rtol=1e-05)
# np.testing.assert_allclose(res_np_d, d_np, rtol=1e-05)
Copy link
Contributor

Choose a reason for hiding this comment

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

同上

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants