Commit 2109547
MLAS: use vmlaq_f32 for ARMv7 targets (microsoft#26161)
Use vmlaq_f32 on MLAS_TARGET_ARM (armv7) so builds on Linux/Android
arm32 don't attempt to use the armv8 (aarch64) vfmaq_f32 intrinsic.
Fixes build failures referencing vfmaq_f32 in arm_neon.h.
### Description
On ARMv7 targets (32-bit ARM with NEON) the vfmaq_f32 intrinsic is
unavailable and causes build failures like:
target specific option mismatch 1728 | vfmaq_f32 (float32x4_t __a,
float32x4_t __b, float32x4_t __c).
The previous code only fell back to vmlaq_f32 when __ANDROID__ was
defined, which fixes Android but not Linux ARM32 builds.
### Motivation and Context
The proposal is to change:
if defined(__ANDROID__) && defined(MLAS_TARGET_ARM)
to:
if defined(MLAS_TARGET_ARM)
This change ensures 32-bit ARM builds (Linux and Android) use vmlaq_f32
while 64-bit ARM uses vfmaq_f32.
This pr is related to issue microsoft#25949 which was opened also by me.
---------
Signed-off-by: Wei Du <wei.du@tpv-tech.com>
Co-authored-by: Hariharan Seshadri <shariharan91@gmail.com>
Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com>1 parent 4de3152 commit 2109547
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2305 | 2305 | | |
2306 | 2306 | | |
2307 | 2307 | | |
2308 | | - | |
2309 | | - | |
| 2308 | + | |
| 2309 | + | |
2310 | 2310 | | |
2311 | 2311 | | |
2312 | 2312 | | |
| |||
2863 | 2863 | | |
2864 | 2864 | | |
2865 | 2865 | | |
2866 | | - | |
| 2866 | + | |
0 commit comments