Workaround PyTorch debug build crash using old GCC (#47805)
Summary:
gcc-7.4.x or older fails to compile XNNPACK in debug mode with internal compiler error
Workaround this in a build script by pasing -O1 optimisation flag to XNNPACK if compiled on older compilers
Fixes https://github.com/pytorch/pytorch/issues/47292
Pull Request resolved: https://github.com/pytorch/pytorch/pull/47805
Reviewed By: seemethere
Differential Revision: D24905758
Pulled By: malfet
fbshipit-source-id: 93f4e3b3b5c10b69734627c50e36b2eb544699c8