-
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
[GCC9][Werror]fix -Werror=maybe-uninitialized #52265
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
@zhiqiu CI 已经结束 |
@@ -256,7 +256,7 @@ class CPUROIPerspectiveTransformOpKernel : public framework::OpKernel<T> { | |||
auto transformed_width = ctx.Attr<int>("transformed_width"); | |||
auto spatial_scale = ctx.Attr<float>("spatial_scale"); | |||
|
|||
auto in_dims = in->dims(); | |||
auto in_dims = phi::vectorize(in->dims()); |
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.
auto in_dims = phi::vectorize(in->dims()); | |
const auto & in_dims = in->dims() |
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.
@zhiqiu 已经修改,本地编译通过
fix with auto&
b7ef838
to
2668153
Compare
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
Bug fixes
PR changes
Others
Describe
新出现的-Werror=maybe-uninitialized 错误
务必记得phi::vectorize 套用dims
不用vectorize 就会报错Werror
Log