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

[ARM] fix cast op when fp16_to_int32 #10082

Merged
merged 2 commits into from
Mar 10, 2023
Merged

[ARM] fix cast op when fp16_to_int32 #10082

merged 2 commits into from
Mar 10, 2023

Conversation

mjp9527
Copy link
Collaborator

@mjp9527 mjp9527 commented Mar 8, 2023

PR devices

Arm

PR types

Bug fixes

PR changes

Backends

Description

新增elementwise_div fp16实现后,cast的in_dtype并不会改成fp16的enum值,导致cast以fp32去读fp16
86db1b0ba1827449f96409d07a8e0d10

@paddle-bot
Copy link

paddle-bot bot commented Mar 8, 2023

Thanks for your contribution!

Copy link
Collaborator

@hong19860320 hong19860320 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@zhupengyang zhupengyang left a comment

Choose a reason for hiding this comment

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

更好的方式是在pass中处理这类问题

@@ -35,6 +35,11 @@ void CastCompute::Run() {
if (param.X->precision() == PrecisionType::kFloat) {
param.in_dtype = 5;
}
#if defined(ENABLE_ARM_FP16) && defined(LITE_WITH_ARM)
Copy link
Collaborator

Choose a reason for hiding this comment

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

不需要这里的宏

@mjp9527 mjp9527 merged commit ab2e835 into PaddlePaddle:develop Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants