From 0a25225b7640cb55ec866b788dfce9b84efd63f2 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov <2536374+asmorkalov@users.noreply.github.com> Date: Mon, 13 Oct 2025 19:40:11 +0300 Subject: [PATCH] Merge pull request #27897 from asmorkalov:as/alernative_win_arm_neon_check Enabled fp16 conversions, but disabled NEON FP16 arithmetics on Windows for ARM for now #27897 ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [ ] The PR is proposed to the proper branch - [ ] There is a reference to the original bug report and related work - [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [ ] The feature is well documented and sample code can be built with the project CMake --- cmake/checks/cpu_neon_dotprod.cpp | 4 +++- cmake/checks/cpu_neon_fp16.cpp | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cmake/checks/cpu_neon_dotprod.cpp b/cmake/checks/cpu_neon_dotprod.cpp index 2db6c4b1cc..71f2cb3b38 100644 --- a/cmake/checks/cpu_neon_dotprod.cpp +++ b/cmake/checks/cpu_neon_dotprod.cpp @@ -1,6 +1,8 @@ #include -#if (defined __GNUC__ && (defined __arm__ || defined __aarch64__)) || (defined _MSC_VER && (defined _M_ARM64 || defined _M_ARM64EC)) +#if (defined __GNUC__ && (defined __arm__ || defined __aarch64__))/* || (defined _MSC_VER && (defined _M_ARM64 || defined _M_ARM64EC)) */ +// Windows + ARM64 case disabled: https://github.com/opencv/opencv/issues/25052 + #include "arm_neon.h" int test() { diff --git a/cmake/checks/cpu_neon_fp16.cpp b/cmake/checks/cpu_neon_fp16.cpp index 45f5b05906..3c3d5da1e3 100644 --- a/cmake/checks/cpu_neon_fp16.cpp +++ b/cmake/checks/cpu_neon_fp16.cpp @@ -1,6 +1,7 @@ #include -#if (defined __GNUC__ && (defined __arm__ || defined __aarch64__)) || (defined _MSC_VER && (defined _M_ARM64 || defined _M_ARM64EC)) +#if (defined __GNUC__ && (defined __arm__ || defined __aarch64__)) /* || (defined _MSC_VER && (defined _M_ARM64 || defined _M_ARM64EC)) */ +// Windows + ARM64 case disabled: https://github.com/opencv/opencv/issues/25052 #include "arm_neon.h" float16x8_t vld1q_as_f16(const float* src) @@ -36,7 +37,7 @@ void test() vprintreg("s1*s2[0]+s1*s2[1] + ... + s1*s2[7]", d); } #else -#error "FP16 is not supported" +#error "NEON FP16 is not supported" #endif int main()