[Public] Snipped
> > > > In above log I get `2 instances of march`; logs `-march=native -mrtm > > -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -Wno-format- > truncation -Wno-address-of-packed-member - > DRTE_LOG_DEFAULT_LOGTYPE=pmd.net.i40e -DCC_AVX512_SUPPORT - > march=skylake-avx512`. > > > > Question-1: I think this is not expected right? The `-march=native` is > > populated > from `cflags` and `-march= skylake-avx512` is populated from ` > cc_avx512_flags`. > > The above command is correct. So long as the compiler supports AVX-512 we will > always compile the AVX-512 code paths for runtime selection. In practice, all > supported compilers have AVX-512 support, so in reality we have the two > scenarios > you tested: > > * The target architecture e.g. znver3 in your case, doesn't support avx512, > so the meson.build file adds on the necessary flags to add this support, > i.e. that file is compiled with -march=skylake=avx512, which is the > minimum ISA that gives you the necessary support. > * The target architecture, e.g. znver4, does support AVX-512, then no > additional flags are added and the files are compiled "as normal" > > In both these cases, whether the target architecture is specified as "native" > or > explicitly makes no difference. So, for files which needs avx512 support like acl_avx512, fib_tire_avx512 and others, we then only pass `cc_avx512_flags`. All other cases this is ignored. Thank you that makes sense. > > > Question-2: if the target is meet minimal ISA why not we use `-march=x86-64- > v4`? > > > > Good point, that would indeed be better. I'm just not sure whether it is > supported > widely enough on our compilers. Do you know what gcc and clang versions > support > that target? As I recollect we have been using `x86-64-v4` this from gcc 12.3 and clang-14. I am not sure if the older versions supports `avx512 that is x86-64-v4` > > > Note: I am yet to check for cross build. Will update on cross build how > > this comes > out. Shall we skip the check in cross build? > > > > > > > > > > > > Regards, > > > /Bruce