-
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
Fix set_value failure when source tensor is fp16 Dtype #46801
Conversation
你的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
@@ -724,6 +724,19 @@ KernelSignature SetValueOpArgumentMapping(const ArgumentMappingContext& ctx) { | |||
"shape", | |||
"bool_values"}, | |||
{"Out"}); | |||
} else if (ctx.HasAttr("fp16_values")) { | |||
// NOTE(LiuYang):Here any_cast doesn't support fp16 values. |
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.
fp16_values
是用std::vector<float>
存的,所以这里应该是any_cast<std::vector<float>>
?
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,Thanks
Fix set_value failure when source tensor is fp16 Dtype and destiny value is a number (dev PR link:#46801)
PR types
Bug fixes
PR changes
OPs
Describe
Fix set_value failure when source tensor is fp16 Dtype and destiny value is a number