armv8 march when building for armv7
GoldFeniks opened this issue · comments
Hi!
Why does XNNPACK specifies -march=armv8-a -mfpu=neon-fp-armv8
and -march=armv8.2-a+dotprod -mfpu=neon-fp-armv8
when building for armv7
?
Lines 4963 to 4974 in 758c7ca
armv7
really means ARM v7 or higher
Sure, but wouldn't it mean that compiler should only use instructions available for armv7
I guess my question is, does the binary built this way work on armv7
machine?
If we don't specify any flags, compiler will target ARMv7. XNNPACK has microkernels targeting higher ISA levels, but it checks if the CPU supports them before calling. Therefore, the resulting binary works fine on ARMv7 CPU.