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

comparison between signed and unsigned integer #20428

Closed
pdnote99 opened this issue Jun 29, 2018 · 9 comments
Closed

comparison between signed and unsigned integer #20428

pdnote99 opened this issue Jun 29, 2018 · 9 comments
Labels
stat:contribution welcome Status - Contributions welcome

Comments

@pdnote99
Copy link

pdnote99 commented Jun 29, 2018

System information

No need. It is about comparison warning happening in cc/framework/ops.h
ops.h:153:27: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (t.NumElements() != v.size()) {

cc1plus: all warnings being treated as errors

Unfortunately, due to policy out of my control,
I cannot change the compiler option to treat warning as an error.
I hope this to be fixed so that I can compile.

Describe the problem

Same as above.

Source code / logs

tensorflow/cc/framework/ops.h

@tensorflowbutler tensorflowbutler added the stat:awaiting response Status - Awaiting response from author label Jun 30, 2018
@tensorflowbutler
Copy link
Member

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks.
Have I written custom code
OS Platform and Distribution
TensorFlow installed from
TensorFlow version
Bazel version
CUDA/cuDNN version
GPU model and memory
Exact command to reproduce

@pdnote99
Copy link
Author

pdnote99 commented Jul 2, 2018

Hi,
Those are not relevant.
Please consider them as N/A.

Thank you for your help!
JW

@reedwm
Copy link
Member

reedwm commented Jul 2, 2018

I'm slightly confused what the issue is. Is the issue that TensorFlow has compiler warnings, and someone has changed a BUILD or bzl file to treat warnings as errors? If so, what was done to treat warnings as errors?

Also for future reference, you should always fill out the form, since we might not respond to issues if the form is not filled out.

@tensorflowbutler tensorflowbutler removed the stat:awaiting response Status - Awaiting response from author label Jul 3, 2018
@reedwm reedwm added the stat:awaiting response Status - Awaiting response from author label Jul 3, 2018
@pdnote99
Copy link
Author

When used the compiler flag, -Werror, I cannot compile Tensorflow.
Because it is an enforced policy to use -Werror, which is out of my control,
yes, it is an issue for me.

JW

@tensorflowbutler tensorflowbutler removed the stat:awaiting response Status - Awaiting response from author label Jul 19, 2018
@reedwm
Copy link
Member

reedwm commented Jul 20, 2018

Unfortunately, there are lots of TensorFlow warnings, so it would be difficult to remove all of them.

/CC @gunan, any plans to remove the TensorFlow warnings? If not, can you mark as contributions welcome?

@reedwm
Copy link
Member

reedwm commented Aug 8, 2018

Marking as contributions welcome to remove warnings, since no one internally is working on it.

@reedwm reedwm added the stat:contribution welcome Status - Contributions welcome label Aug 8, 2018
@tensorflowbutler
Copy link
Member

Please remove the assignee, as this issue is inviting external contributions. Otherwise, remove the contributions welcome label. Thank you.

again4you added a commit to again4you/tensorflow that referenced this issue Aug 30, 2018
When building a CPP API application with "-Wall -Werror" option ,
`error: comparison between signed and unsigned integer expressions'
occurs since return type of num_elements() is 'int64' instead of
'size_t' in ops.h to express -1. This patch fixes this bug by explicit
type casting.

* related issue: tensorflow#20428

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
@reedwm reedwm removed their assignment Aug 31, 2018
again4you added a commit to again4you/tensorflow that referenced this issue Sep 3, 2018
When building a CPP API application with "-Wall -Werror" option ,
`error: comparison between signed and unsigned integer expressions'
occurs since return type of num_elements() is 'int64' instead of
'size_t' in ops.h to express -1. This patch fixes this bug by explicit
type casting.

* related issue: tensorflow#20428

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
@again4you
Copy link
Contributor

My RP is already merged so I think that this issue would be fixed. Could someone in charge close this issue?

@reedwm
Copy link
Member

reedwm commented Sep 10, 2018

Closing, as @again4you fixed this in #21966.

@reedwm reedwm closed this as completed Sep 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat:contribution welcome Status - Contributions welcome
Projects
None yet
Development

No branches or pull requests

4 participants