Skip to content

fix regression in GCC 12.1 + 12.2 with wrong warnings#18434

Merged
boegel merged 2 commits intoeasybuilders:developfrom
Flamefire:20230801145453_new_pr_GCCcore1210
Aug 2, 2023
Merged

fix regression in GCC 12.1 + 12.2 with wrong warnings#18434
boegel merged 2 commits intoeasybuilders:developfrom
Flamefire:20230801145453_new_pr_GCCcore1210

Conversation

@Flamefire
Copy link
Copy Markdown
Contributor

@Flamefire Flamefire commented Aug 1, 2023

(created using eb --new-pr)

This is basically https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105593 which is a regression in GCC 12 not present in GCC 11 and seemingly fixed in GCC 12.3

The issue is only diagnostics, no behavior change. But some software treats warnings as errors making them fail to compile without workarounds.
It also only affects x86 targets with AVX2 or AVX512.

Errors/Warnings fixed by this looked like:

/software/GCCcore/12.2.0/lib/gcc/x86_64-pc-linux-gnu/12.2.0/include/avx512fintrin.h:7027:53: Fehler: »__Y« könnte uninitialisiert verwendet werden [-Werror=maybe-uninitialized]
 7027 |   return (__m512i) __builtin_ia32_permvarsi512_mask ((__v16si) __Y,
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
 7028 |                                                      (__v16si) __X,
      |                                                      ~~~~~~~~~~~~~~
 7029 |                                                      (__v16si)
      |                                                      ~~~~~~~~~
 7030 |                                                      _mm512_undefined_epi32 (),
      |                                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~
 7031 |                                                      (__mmask16) -1);
      |                                                      ~~~~~~~~~~~~~~~
/software/GCCcore/12.2.0/lib/gcc/x86_64-pc-linux-gnu/12.2.0/include/avx512fintrin.h: In Funktion »void fbgemm::requantizeOutputProcessingGConvAvx512(uint8_t*, const int32_t*, const block_type_t&, int, int, const requantizationParams_t<BIAS_TYPE>&) [mit bool A_SYMMETRIC = false; bool B_SYMMETRIC = false; QuantizationGranularity Q_GRAN = fbgemm::QuantizationGranularity::GROUP; bool HAS_BIAS = true; bool FUSE_RELU = true; int C_PER_G = 16; BIAS_TYPE = float]«:
/software/GCCcore/12.2.0/lib/gcc/x86_64-pc-linux-gnu/12.2.0/include/avx512fintrin.h:206:11: Anmerkung: »__Y« wurde hier deklariert
  206 |   __m512i __Y = __Y;

See also pytorch/pytorch#77939 & pytorch/pytorch#104519

The patches are gcc-mirror/gcc@72af61b which requires gcc-mirror/gcc@732d744 which requires gcc-mirror/gcc@aabebf7

I combined the latter 2 into 1 patch file as they are basically the same and the last one mostly only required such that the 2nd applies cleanly although it fixes another issue.

@casparvl
Copy link
Copy Markdown
Contributor

casparvl commented Aug 1, 2023

@boegelbot please test @ generoso

@boegelbot
Copy link
Copy Markdown
Collaborator

@casparvl: Request for testing this PR well received on login1

PR test command 'EB_PR=18434 EB_ARGS= EB_CONTAINER= /opt/software/slurm/bin/sbatch --job-name test_PR_18434 --ntasks=4 ~/boegelbot/eb_from_pr_upload_generoso.sh' executed!

  • exit code: 0
  • output:
Submitted batch job 11348

Test results coming soon (I hope)...

Details

- notification for comment with ID 1660599405 processed

Message to humans: this is just bookkeeping information for me,
it is of no use to you (unless you think I have a bug, which I don't).

@casparvl
Copy link
Copy Markdown
Contributor

casparvl commented Aug 1, 2023

@boegelbot please test @ jsc-zen2

@boegelbot
Copy link
Copy Markdown
Collaborator

@casparvl: Request for testing this PR well received on jsczen2l1.int.jsc-zen2.easybuild-test.cluster

PR test command 'EB_PR=18434 EB_ARGS= /opt/software/slurm/bin/sbatch --mem-per-cpu=4000M --job-name test_PR_18434 --ntasks=8 ~/boegelbot/eb_from_pr_upload_jsc-zen2.sh' executed!

  • exit code: 0
  • output:
Submitted batch job 3058

Test results coming soon (I hope)...

Details

- notification for comment with ID 1660645379 processed

Message to humans: this is just bookkeeping information for me,
it is of no use to you (unless you think I have a bug, which I don't).

@boegelbot
Copy link
Copy Markdown
Collaborator

Test report by @boegelbot
SUCCESS
Build succeeded for 2 out of 2 (2 easyconfigs in total)
jsczen2c1.int.jsc-zen2.easybuild-test.cluster - Linux Rocky Linux 8.5, x86_64, AMD EPYC 7742 64-Core Processor (zen2), Python 3.6.8
See https://gist.github.com/boegelbot/ce6d4ee55456f3e68cb9299a8761754a for a full test report.

@boegelbot
Copy link
Copy Markdown
Collaborator

Test report by @boegelbot
SUCCESS
Build succeeded for 2 out of 2 (2 easyconfigs in total)
cns2 - Linux Rocky Linux 8.5, x86_64, Intel(R) Xeon(R) CPU E5-2667 v3 @ 3.20GHz (haswell), Python 3.6.8
See https://gist.github.com/boegelbot/f4879433daab922e9bf7c92ed39c31e7 for a full test report.

@casparvl
Copy link
Copy Markdown
Contributor

casparvl commented Aug 1, 2023

Test report by @casparvl
SUCCESS
Build succeeded for 2 out of 2 (2 easyconfigs in total)
tcn149.local.snellius.surf.nl - Linux RHEL 8.6, x86_64, AMD EPYC 7H12 64-Core Processor, Python 3.6.8
See https://gist.github.com/casparvl/a1321705503c59288efd716f35e6e711 for a full test report.

@boegel boegel changed the title Fix GCC 12 regression with wrong warnings fix regression in GCC 12.1 + 12.2 with wrong warnings Aug 1, 2023
@easybuilders easybuilders deleted a comment from boegelbot Aug 1, 2023
@boegel boegel added the bug fix label Aug 1, 2023
@boegel boegel added this to the next release (4.8.1?) milestone Aug 1, 2023
@Flamefire
Copy link
Copy Markdown
Contributor Author

Test report by @Flamefire
SUCCESS
Build succeeded for 2 out of 2 (2 easyconfigs in total)
taurusi8010 - Linux CentOS Linux 7.9.2009, x86_64, AMD EPYC 7352 24-Core Processor (zen2), 8 x NVIDIA NVIDIA A100-SXM4-40GB, 470.57.02, Python 2.7.5
See https://gist.github.com/Flamefire/bfcc3c8dda700d49a09ba7bb867d60ec for a full test report.

@boegel
Copy link
Copy Markdown
Member

boegel commented Aug 1, 2023

Test report by @boegel
SUCCESS
Build succeeded for 2 out of 2 (2 easyconfigs in total)
node3106.skitty.os - Linux RHEL 8.6, x86_64, Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz (skylake_avx512), Python 3.6.8
See https://gist.github.com/boegel/d580be59c40c955d4ed5636daab0e237 for a full test report.

Copy link
Copy Markdown
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

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

lgtm

@boegel
Copy link
Copy Markdown
Member

boegel commented Aug 2, 2023

Going in, thanks @Flamefire!

@boegel boegel merged commit 56328ee into easybuilders:develop Aug 2, 2023
@Flamefire Flamefire deleted the 20230801145453_new_pr_GCCcore1210 branch August 2, 2023 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants