-
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
[AMP OP&Test]Add fp16/bf16 support logical op #52112
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
cmake/inference_lib.cmake
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.
这个文件改动是?
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.
无改动,不影响
@@ -60,6 +60,8 @@ void LogicalNotKernel(const Context& dev_ctx, | |||
phi::Logical##func_type##Kernel, \ | |||
float, \ | |||
double, \ | |||
phi::dtype::float16, \ |
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.
无需改动CPU
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.
已去掉,Done.
@@ -160,6 +164,8 @@ def test(unit_test, use_gpu=False, test_error=False): | |||
np_result = np_op(meta_data['x_np'], meta_data['y_np']) | |||
else: | |||
np_result = np_op(meta_data['x_np']) | |||
if data_type == np.uint16: | |||
np_result = convert_float_to_uint16(np_result) |
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.
由于结果是bool类型的,所以这里无需convert
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.
Done.
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
PR types
Performance optimization
PR changes
OPs
Describe