Skip to content

Commit 6da3069

Browse files
authored
Use vmlaq_f32 in MlasMultipleAddFloat32x4 for Android armeabi-v7a. (#25955)
### Description <!-- Describe your changes. --> Use vmlaq_f32 in MlasMultiplyAddFloat32x4 for Android armeabi-v7a. ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> Fix Android armeabi-v7a build where vfmaq_f32 is not available. Fix #25949
1 parent b49e69e commit 6da3069

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

onnxruntime/core/mlas/lib/mlasi.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2283,7 +2283,12 @@ MLAS_FLOAT32X4
22832283
MlasMultiplyAddFloat32x4(MLAS_FLOAT32X4 Vector1, MLAS_FLOAT32X4 Vector2, MLAS_FLOAT32X4 Vector3)
22842284
{
22852285
#if defined(MLAS_NEON_INTRINSICS)
2286+
#if defined(__ANDROID__) && defined(MLAS_TARGET_ARM)
2287+
// Android armeabi-v7a ABI doesn't have vfmaq_f32()
2288+
return vmlaq_f32(Vector3, Vector1, Vector2);
2289+
#else
22862290
return vfmaq_f32(Vector3, Vector1, Vector2);
2291+
#endif
22872292
#elif defined(MLAS_FMA3_INTRINSICS)
22882293
return _mm_fmadd_ps(Vector1, Vector2, Vector3);
22892294
#elif defined(MLAS_SSE2_INTRINSICS)

0 commit comments

Comments
 (0)