Open romintomasetti opened 10 months ago
Please note that this might be a Kokkos
issue (@crtrott @dalg24 @masterleinad). I guess such bugs would be detected by the Kokkos
CICD...
Hum, CICD is not able to test all compiler, flag and optimization combinations so this sort of things can always happen. In my opinion this is more of a Kokkos Core issue since the usage (taking a division) is a supported feature, see Kokkos_Complex.hpp line 919 or so.
Just to follow up, I've just tested this with a few other flags
-mavx512f
-march=icelake-server
-march=saphhirerapids
In each case, we hit the same gcc bug as with -march=skylake-avx512
.
The fact that it happens for the newest architecture (sapphire rapids) could be a justification to try to forward this as an issue to the gcc developers.
Should we proceed with @romintomasetti 's reproducer from the description? Or do you have suggestion for how we could eliminate the dependency on Kokkos?
Description of the problem
It is a compiler internal failure that occurs only for
g++-12
with-O3 -march=skylake-avx512
. It works fine withg++-11
orclang++-17
. It also works withg++-12
if using-O2
instead of-O3
.I know it should be reported to
GCC
, but I need your help for making a reproducible example that does not depend onKokkos
.For now, I copy-pasted the offending code (
KokkosBlas::Impl::MV_Reciprocal_Generic
andKokkosBlas::Impl::MV_ReciprocalSelf_Functor
). This reproduces the error:I tried to isolate the operation that makes the compilation fail in the macro
FAILING_OPERATION
. If I keep the division as in the original code, it does not compile. Switching to a multiplication makes it work again.I tried to come with a simpler functor that does not depend on
Kokkos
, but it always compiles.The minimal reproducer code
This is the minimal reproducer I wrote.
Script for compiling
This is the
bash
script used to compile the code.Mentioning @kliegeois because you worked on the same machine in the past :wink: (and @maartenarnst of course)