diff --git a/.gitea/workflows/build_and_test.yml b/.gitea/workflows/build_and_test.yml index 6973cca9..6d8c5b37 100644 --- a/.gitea/workflows/build_and_test.yml +++ b/.gitea/workflows/build_and_test.yml @@ -11,6 +11,13 @@ env: # than CPU-instruction-bound. It costs about 3x on an INCREMENTAL rebuild (one file plus link, # 9.8 s -> 30.1 s), which is why it belongs here and not in CMakeLists: CI always builds from # scratch and ships the result, so it pays the link once and a developer never pays it at all. + # + # Not CMAKE_INTERPROCEDURAL_OPTIMIZATION, which is the tidier spelling and would cover MSVC too: + # built and linked fine (CUDA included, and it does not reach .cu either way), but measured 3% + # MORE retired instructions than -flto=auto - 396.9 G vs 384.9 G over three runs each against a + # 0.45% run-to-run spread, so the gap is real. It also leaves two dependencies (FFTW, libzmq) out + # of LTO that the flag reaches, and it did not switch CMAKE_AR to gcc-ar here, so the one + # correctness argument for it did not materialise either. LINUX_CMAKE_FLAGS: '-DCMAKE_CXX_FLAGS="-march=x86-64-v3 -flto=auto" -DCMAKE_C_FLAGS="-march=x86-64-v3 -flto=auto"' # MSVC has no spelling for the x86-64-v2 level; /arch:AVX is the nearest and implies SSE4.1/4.2, # which is what matters here - without it Eigen has no vectorised round and falls back to a libm