-
Notifications
You must be signed in to change notification settings - Fork 54
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
Re-enable -Werror, with exceptions #3666
Conversation
We previously disabled compiling with `-Werror` due to a bug in GCC 12.2 which erroneously causes the compile to fail. The relevant warnings in that case were `-Wrestrict` and `-Wstringop-overflow`: ``` ... inlined from ‘nvfuser::Val* nvfuser::rules::distributeMul(nvfuser::Val*, const nvfuser::Context&)’ at /opt/pytorch/nvfuser/csrc/expr_simplifier.cpp:2414:32: /usr/include/c++/13/bits/stl_algobase.h:437:30: warning: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ accessing 9223372036854775800 bytes at offsets 0 and 0 overlaps 9223372036854775793 bytes at offset 7 [-Wrestrict] 437 | __builtin_memmove(__result, __first, sizeof(_Tp) * _Num); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ... inlined from ‘std::unique_ptr<nvfuser::executor_utils::caching::VectorizedTensorInfo> nvfuser::executor_utils::{anonymous}::getVectorizedTensorValidationInfo(nvfuser::kir::Kernel*)’ at /opt/pytorch/nvfuser/csrc/runtime/executor_utils.cpp:328:72: /usr/include/c++/13/bits/stl_construct.h:97:14: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 97 | { return ::new((void*)__location) _Tp(std::forward<_Args>(__args)...); } ``` In this PR, I'm adding `-Werror` back to the compile flags but also adding `-Wno-error=restrict -Wno-error=stringop-overflow`. With these, we will still get the warnings for these cases, but all other types of warnings will give us an error. This would have caught #3001 or #3664. Previous discussion: #3001 (comment)
!build |
Totally on board with this. Looks like CI is failing and I imagine we needed to relax quite a few more no-error in order to make CI and our build happy. |
Nah I just need to merge #3664. Then my local build succeeds at least. |
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.
stamping to unblock. Let's make sure that all CI builds are successful before merging.
Thanks a lot for updating this 💯
!test |
!test |
Stacked on #3664.
We previously disabled compiling with
-Werror
due to a bug in GCC 12.2 which erroneously causes the compile to fail. The relevant warnings in that case were-Wrestrict
and-Wstringop-overflow
:In this PR, I'm adding
-Werror
back to the compile flags but also adding-Wno-error=restrict -Wno-error=stringop-overflow
. With these, we will still get the warnings for these cases, but all other types of warnings will give us an error. This would have caught #3001 or #3664.Previous discussion: #3001 (comment)