-
Notifications
You must be signed in to change notification settings - Fork 26.3k
remove unnecessary -Wno= flags #9608
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
Conversation
|
Wmaybe-uninitialized is pretty flaky, especially since we use a variety of GCC versions. |
|
Maybe we should run Werror only on a single compiler configuration; either the latest (less likely to have bugs) or the compiler that all the devs use (so it's easy to repro locally). |
3ec9c3f to
cd8e0f6
Compare
|
@goldsborough thoughts on the comments of @colesbury and @ezyang ? |
cd8e0f6 to
c7501c3
Compare
c7501c3 to
969f6ff
Compare
test/cpp/api/modules.cpp
Outdated
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
|
@colesbury do you have examples of the flakiness? I quenched this warning in all of ATen/PyTorch a couple months ago and only had to add I personally think keeping warnings on in all CI is better because otherwise they'll just stay silent until someone builds with a particular configuration (e.g. on the FAIR cluster or on macOs) on their local machine, and then we'll have to fix the warning spew on those configurations anyway |
|
I consider this diff ready to merge |
|
It doesn't work well with tagged enums like in It also fails with things like
I'm not sure what The heuristics used depend on compiler version. For example, locally with GCC 4.8.1 I see warnings about that BatchNormalization line, but later versions of GCC are slightly smarter. The reverse is often true too. We work really hard to avoid flakiness in unit tests. We should take the same approach when dealing with compiler warnings, particularly when they are treated as errors. The |
|
Ok, sounds like good reasons to disable the warning. My brain also confused @anderspapitto please disable |
969f6ff to
df3ddb4
Compare
|
reintroduced -Wno-maybe-uninitialized |
facebook-github-bot
left a comment
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.
@anderspapitto has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
@goldsborough @colesbury maybe-uninitialized is twinging on @resistor's PR at #9640 so it sounds like it is not currently disabled for all code. |
|
@ezyang looks like that's in ATen, which has a separate cmake file, not related to this pr |
83f5627 to
ab62d38
Compare
ab62d38 to
7b5c6be
Compare
| target_compile_options(torch PRIVATE | ||
| # Considered to be flaky. See the discussion at | ||
| # https://github.com/pytorch/pytorch/pull/9608 | ||
| -Wno-maybe-uninitialized) |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
facebook-github-bot
left a comment
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.
@anderspapitto is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: Pull Request resolved: pytorch#9608 Differential Revision: D8946664 Pulled By: anderspapitto fbshipit-source-id: b05f10af58da25b2a2588f7153f393bb3637f29a
Summary: Pull Request resolved: pytorch#9608 Differential Revision: D8946664 Pulled By: anderspapitto fbshipit-source-id: b05f10af58da25b2a2588f7153f393bb3637f29a
No description provided.