Skip to content

Conversation

jincheng23
Copy link

@jincheng23 jincheng23 commented Nov 19, 2024

PR Category

User Experience

PR Types

New features

Description

Paddle Tensor 规范化:新增 Tensor.ror ,复用已有接口 Tensor.or

Copy link

paddle-bot bot commented Nov 19, 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.

@paddle-bot paddle-bot bot added the contributor External developers label Nov 19, 2024
@luotao1 luotao1 added the HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务 label Nov 19, 2024
@@ -1348,6 +1348,13 @@ def bitwise_or_(x: Tensor, y: Tensor, name: str | None = None) -> Tensor:
return _C_ops.bitwise_or_(x, y)


def __ror__(
x: Tensor,
y: Tensor,
Copy link
Contributor

Choose a reason for hiding this comment

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

y应该是python内置的多种数据类型,而不是Tensor

@@ -242,14 +243,16 @@ def test_bitwise_or(self):
b = x | y
c = x.bitwise_or(y)
d = x.__or__(y)
(b_np, c_np, d_np) = exe.run(
e = x.__ror__(y)
Copy link
Contributor

Choose a reason for hiding this comment

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

y.__ror__(x)

@HydrogenSulfate
Copy link
Contributor

Closed for #69463 has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants