-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
add autogen code support for logical_and, logical_not, logical_or and logical_xor #52451
add autogen code support for logical_and, logical_not, logical_or and logical_xor #52451
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
infer_meta : | ||
func : ElementwiseInferMeta | ||
kernel : | ||
func : logical_xor |
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.
添加data_type : x
,其他算子类似,对应于GetExpectedKernelType
paddle/phi/api/yaml/legacy_ops.yaml
Outdated
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.
删除paddle/fluid/operators/controlflow/logical_op.cc
。删除paddle/fluid/operators/controlflow/CMakeLists.txt
中的USE_OP_ITSELF(equal_all);\n
|
||
REGISTER_BINARY_LOGICAL_OP(logical_and, "$$Out = X \\&\\& Y$$"); | ||
REGISTER_BINARY_LOGICAL_OP(logical_or, "$$Out = X || Y$$"); | ||
REGISTER_UNARY_LOGICAL_OP(logical_not, "$$Out = !X$$"); |
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.
由于Python端的logical_not
引用了这里的comment,所以需要完善对应的Python API的comment。建议如下:
python/paddle/tensor/logic.py
文件下的def logical_not(x, out=None, name=None):
,去除装饰器@templatedoc()
,并做出修改:
Returns:
Tensor: ${out_comment}
修改为:
Returns:
N-D Tensor. A location into which the result is stored. It's dimension equals with ``x``.
并且@sunzhongkai588i,或@Ligoml进行review
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.
LGTM
@Ligoml,麻烦review一下PR |
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.
LGTM
hi, @ScottWong98
|
PR types
Others
PR changes
Others
Describe
add autogen code support for
logical_and
,logical_not
,logical_or
andlogical_xor
.#51842