Skip to content

Fix sequence_padding compile warning #7634

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

Merged
merged 2 commits into from
Jan 18, 2018

Conversation

Yancey0623
Copy link
Contributor

@Yancey0623 Yancey0623 commented Jan 18, 2018

Fixed #7635
Fixed #7408

@Yancey0623 Yancey0623 requested review from Xreki and luotao1 January 18, 2018 02:18
@luotao1
Copy link
Contributor

luotao1 commented Jan 18, 2018

I find there are still warnings in sequence_padding.cu from the teamcity log, can you help solve it at the same time ?

[10:33:52]	/paddle/paddle/operators/math/sequence_padding.cu: In instantiation of 'void paddle::operators::math::PaddingLoDTensorFunctor<paddle::platform::CUDADeviceContext, T>::operator()(const paddle::platform::CUDADeviceContext&, const paddle::framework::LoDTensor&, paddle::framework::Tensor&, bool) [with T = float]':
[10:33:52]	/paddle/paddle/operators/math/sequence_padding.cu:204:16: required from here
[10:33:52]	/paddle/paddle/operators/math/sequence_padding.cu:74:62: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
[10:33:52]	PADDLE_ENFORCE_EQ(seq_dims[0], abs_offset_lod[level].back(),
[10:33:52]	^
[10:33:52]	/paddle/paddle/operators/math/sequence_padding.cu:84:66: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
[10:33:52]	/paddle/paddle/operators/math/sequence_padding.cu:89:66: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
[10:33:52]	/paddle/paddle/operators/math/sequence_padding.cu:94:66: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
[10:33:52]	/paddle/paddle/operators/math/sequence_padding.cu: In instantiation of 'void paddle::operators::math::UnpaddingLoDTensorFunctor<paddle::platform::CUDADeviceContext, T>::operator()(const paddle::platform::CUDADeviceContext&, paddle::framework::LoDTensor&, const paddle::framework::Tensor&, bool) [with T = float]':
[10:33:52]	/paddle/paddle/operators/math/sequence_padding.cu:205:16: required from here
[10:33:52]	/paddle/paddle/operators/math/sequence_padding.cu:146:62: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
[10:33:52]	PADDLE_ENFORCE_EQ(seq_dims[0], abs_offset_lod[level].back(),
[10:33:52]	^
[10:33:52]	/paddle/paddle/operators/math/sequence_padding.cu:156:66: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
[10:33:52]	/paddle/paddle/operators/math/sequence_padding.cu:161:66: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
[10:33:52]	/paddle/paddle/operators/math/sequence_padding.cu:166:66: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

@Yancey0623
Copy link
Contributor Author

Yancey0623 commented Jan 18, 2018

@luotao1, sorry I forgot to fix the GPU implement, will do that.

Copy link
Contributor

@luotao1 luotao1 left a comment

Choose a reason for hiding this comment

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

LGTM!

@luotao1 luotao1 merged commit c73f00f into PaddlePaddle:develop Jan 18, 2018
@Yancey0623 Yancey0623 deleted the fix_compile_warning branch January 18, 2018 09:42
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.

2 participants