Repository: pytorch
Issue: torch.compile error
Labels: needs reproduction,triaged,oncall: pt2

### 🐛 Describe the bug

_No response_

### Error logs

/usr/lib/gcc/x86_64-linux-gnu/12/include/avx512fintrin.h: In function ‘void fbgemm::requantizeOutputProcessingGConvAvx512(uint8_t*, const int32_t*, const block_type_t&, int, int, const requantizationParams_t<BIAS_TYPE>&) [with bool A_SYMMETRIC = false; bool B_SYMMETRIC = false; QuantizationGranularity Q_GRAN = fbgemm::QuantizationGranularity::OUT_CHANNEL; bool HAS_BIAS = false; bool FUSE_RELU = false; int C_PER_G = 16; BIAS_TYPE = int]’:
/usr/lib/gcc/x86_64-linux-gnu/12/include/avx512fintrin.h:206:11: note: ‘__Y’ was declared here
  206 |   __m512i __Y = __Y;
      |           ^~~
In function ‘__m128i _mm512_extracti32x4_epi32(__m512i, int)’,
    inlined from ‘__m128i _mm512_castsi512_si128(__m512i)’ at /usr/lib/gcc/x86_64-linux-gnu/12/include/avx512fintrin.h:15829:10,
    inlined from ‘void fbgemm::requantizeOutputProcessingGConvAvx512(uint8_t*, const int32_t*, const block_type_t&, int, int, const requantizationParams_t<BIAS_TYPE>&) [with bool A_SYMMETRIC = false; bool B_SYMMETRIC = false; QuantizationGranularity Q_GRAN = fbgemm::QuantizationGranularity::OUT_CHANNEL; bool HAS_BIAS = false; bool FUSE_RELU = false; int C_PER_G = 16; BIAS_TYPE = int]’ at /home/gnezdo/pytorch/third_party/fbgemm/src/QuantUtilsAvx512.cc:374:25:
/usr/lib/gcc/x86_64-linux-gnu/12/include/avx512fintrin.h:6045:53: error: ‘__Y’ may be used uninitialized [-Werror=maybe-uninitialized]
 6045 |   return (__m128i) __builtin_ia32_extracti32x4_mask ((__v16si) __A,
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
 6046 |                                                      __imm,
      |                                                      ~~~~~~
 6047 |                                                      (__v4si)
      |                                                      ~~~~~~~~
 6048 |                                                      _mm_undefined_si128 (),
      |                                                      ~~~~~~~~~~~~~~~~~~~~~~~
 6049 |                                                      (__mmask8) -1);
      |                                                      ~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-linux-gnu/12/include/emmintrin.h: In function ‘void fbgemm::requantizeOutputProcessingGConvAvx512(uint8_t*, const int32_t*, const block_type_t&, int, int, const requantizationParams_t<BIAS_TYPE>&) [with bool A_SYMMETRIC = false; bool B_SYMMETRIC = false; QuantizationGranularity Q_GRAN = fbgemm::QuantizationGranularity::OUT_CHANNEL; bool HAS_BIAS = false; bool FUSE_RELU = false; int C_PER_G = 16; BIAS_TYPE = int]’:
/usr/lib/gcc/x86_64-linux-gnu/12/include/emmintrin.h:788:11: note: ‘__Y’ was declared here
  788 |   __m128i __Y = __Y;
      |           ^~~
cc1plus: all warnings being treated as errors
ninja: build stopped: subcommand failed.


### Minified repro

_No response_

### Versions

Collecting environment information...
PyTorch version: 2.1.0+cu121
Is debug build: False
CUDA used to build PyTorch: 12.1
ROCM used to build PyTorch: N/A

OS: Debian GNU/Linux 12 (bookworm) (x86_64)
GCC version: (Debian 12.2.0-14) 12.2.0
Clang version: Could not collect
CMake version: version 3.25.1
Libc version: glibc-2.36

Python version: 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] (64-bit runtime)
Python platform: Linux-6.2.16-18-pve-x86_64-with-glibc2.36
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Architecture:                       x86_64
CPU op-mode(s):                     32-bit, 64-bit
Address sizes:                      40 bits physical, 48 bits virtual
Byte Order:                         Little Endian
CPU(s):                             24
On-line CPU(s) list:                0,2,4,8,9,11-13,15-17,19,20,22
Off-line CPU(s) list:               1,3,5-7,10,14,18,21,23
Vendor ID:                          GenuineIntel
Model name:                         Intel(R) Xeon(R) CPU           E5645  @ 2.40GHz
CPU family:                         6
Model:                              44
Thread(s) per core:                 2
Core(s) per socket:                 6
Socket(s):                          2
Stepping:                           2
Frequency boost:                    enabled
CPU(s) scaling MHz:                 94%
CPU max MHz:                        2401.0000
CPU min MHz:                        1600.0000
BogoMIPS:                           4799.64
Flags:                              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 popcnt lahf_lm epb pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid dtherm ida arat flush_l1d
Virtualization:                     VT-x
L1d cache:                          384 KiB (12 instances)
L1i cache:                          384 KiB (12 instances)
L2 cache:                           3 MiB (12 instances)
L3 cache:                           24 MiB (2 instances)
NUMA node(s):                       2
NUMA node0 CPU(s):                  0-5,12-17
NUMA node1 CPU(s):                  6-11,18-23
Vulnerability Gather data sampling: Not affected
Vulnerability Itlb multihit:        KVM: Mitigation: VMX disabled
Vulnerability L1tf:                 Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable
Vulnerability Mds:                  Vulnerable: Clear CPU buffers attempted, no microcode; SMT vulnerable
Vulnerability Meltdown:             Mitigation; PTI
Vulnerability Mmio stale data:      Unknown: No mitigations
Vulnerability Retbleed:             Not affected
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass:    Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:           Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:           Mitigation; Retpolines, IBPB conditional, IBRS_FW, STIBP conditional, RSB filling, PBRSB-eIBRS Not affected
Vulnerability Srbds:                Not affected
Vulnerability Tsx async abort:      Not affected

Versions of relevant libraries:
[pip3] numpy==1.26.1
[pip3] optree==0.10.0
[pip3] torch==2.1.0
[pip3] torchtext==0.14.1a0
[pip3] torchvision==0.16.0
[pip3] triton==2.1.0
[conda] Could not collect


cc @ezyang @msaroufim @bdhirsh @anijain2305 @chauhang @wconstab @zou3519