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 logical compare method - Part 4 #58343

Merged
merged 7 commits into from
Oct 30, 2023

Conversation

gouzil
Copy link
Member

@gouzil gouzil commented Oct 24, 2023

PR types

Others

PR changes

Others

Description

新增:

  • __eq__== (修改pir backward后添加)
  • __ne__!=
  • __lt__<
  • __le__<=
  • __gt__>
  • __ge__>=
  • __and__&
  • __or__|
  • __xor__^
  • __invert__~

修复:

相关链接:

@paddle-bot
Copy link

paddle-bot bot commented Oct 24, 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.

@gouzil gouzil changed the title [Hackathon 5th No.49][pir] add logical compare method [Hackathon 5th No.49][pir] add logical compare method - Part 4 Oct 25, 2023
@0x45f
Copy link
Contributor

0x45f commented Oct 26, 2023

对于__eq__ 方法,因为pir backward中有operand2value(value_list) & operand2value(value_set) 逻辑,set的&操作会调用到OpResult的__eq__方法,需要先修改pir backward的代码逻辑然后才能添加__eq__ 方法

Copy link
Contributor

@0x45f 0x45f left a comment

Choose a reason for hiding this comment

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

LGTM

# for logical compare
# TODO(gouzil): Open after deleting c++ logic
# (
# '__eq__',
Copy link
Contributor

Choose a reason for hiding this comment

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

这里的eq和c++里pybind的相等的语义不一样,是否需要把C++下的那个删掉还需要讨论一下

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

Successfully merging this pull request may close these issues.

3 participants