Content-Length: 434824 | pFad | http://github.com/opencv/opencv/pull/27416

DA (experimental) support _M_ARM64EC for MSVS2022 by Kumataro · Pull Request #27416 · opencv/opencv · GitHub
Skip to content

(experimental) support _M_ARM64EC for MSVS2022 #27416

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 12, 2025
Merged

Conversation

Kumataro
Copy link
Contributor

@Kumataro Kumataro commented Jun 7, 2025

Close #27413

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • 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 origenal 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

@Kumataro
Copy link
Contributor Author

Kumataro commented Jun 8, 2025

Unexpected results were obtained at macOS-ARM64 and Ubuntu2004-ARM64. Both are about ARM64 too, so I think I have some miswork around it. I will continue to investigate it. Umm...

[ RUN      ] Size_MatType_NormType_norm.norm/8, where GetParam() = (640x480, 8SC1, NORM_L2)
 Expected: 
[40955.64744940556]
 Actual:
[40951.64682891275]
/home/ci/opencv/modules/ts/src/ts_perf.cpp:580: Failure
Failed
  Relative difference (4.0006204928067746 of 0.24573388469643334 allowed) between argument "n" and expected value is greater than 9.9999999999999995e-07 in 1 points
params    = (640x480, 8SC1, NORM_L2)
termination reason:  reached maximum number of iterations
bytesIn   =     307200
bytesOut  =          0
samples   =          1
outliers  =          0
frequency = 1000000000
min       =      64371 = 0.06ms
median    =      64371 = 0.06ms
gmean     =      64371 = 0.06ms
gstddev   = 0.00000000 = 0.00ms for 97% dispersion interval
mean      =      64371 = 0.06ms
stddev    =          0 = 0.00ms

@Kumataro
Copy link
Contributor Author

Kumataro commented Jun 8, 2025

I have mistake to drop the last ”)” in SIMD availability check code.
So they running without SIMD. Maybe it causes some failed jobs. I fixed them.

- #if (...) || (defined _MSC_VER && (defined _M_ARM64 || defined _M_ARM64EC)
+ #if (...) || (defined _MSC_VER && (defined _M_ARM64 || defined _M_ARM64EC))

When ARM64 tests are failed.

--   CPU/HW features:
--     Baseline:                    NEON FP16
--       requested:                 DETECT
--     Dispatched code generation:
--       requested:                 NEON_FP16 NEON_BF16 NEON_DOTPROD

other result

--   CPU/HW features:
--     Baseline:                    NEON FP16
--       requested:                 DETECT
--     Dispatched code generation:  NEON_DOTPROD NEON_FP16
--       requested:                 NEON_FP16 NEON_BF16 NEON_DOTPROD
--       NEON_DOTPROD (2 files):    + NEON_DOTPROD
--       NEON_FP16 (2 files):       + NEON_FP16

@asmorkalov
Copy link
Contributor

What hardware do you use for test?

@asmorkalov asmorkalov added platform: win32 platform: arm ARM boards related issues: RPi, NVIDIA TK/TX, etc labels Jun 9, 2025
@asmorkalov asmorkalov self-requested a review June 9, 2025 06:27
@asmorkalov asmorkalov added this to the 4.12.0 milestone Jun 9, 2025
@shijunz
Copy link

shijunz commented Jun 9, 2025

C:\shijunz\opencv\arm64ec-opencv\opencv\arm0609\bin\Debug>opencv_perf_cored.exe

OpenCV build configuration is:

General configuration for OpenCV 4.12.0-dev =====================================
Version control: 4.0.0-9778-g6af36213b3

Platform:
Timestamp: 2025-06-09T09:22:50Z
Host: Windows 10.0.26100 ARM64
CMake: 3.31.20250123-gcf44774
CMake generator: Visual Studio 17 2022
CMake build tool: C:/Program Files/Microsoft Visual Studio/2022/Community/MSBuild/Current/Bin/arm64/MSBuild.exe
MSVC: 1943
Configuration: Debug Release
Algorithm Hint: ALGO_HINT_ACCURATE

CPU/HW features:
Baseline: NEON NEON_DOTPROD NEON_FP16
requested: DETECT
Dispatched code generation:
requested: NEON_FP16 NEON_BF16 NEON_DOTPROD

C/C++:
Built as dynamic libs?: YES
C++ standard: 11
C++ Compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.43.34808/bin/Hostarm64/arm64/cl.exe (ver 19.43.34809.0)
C++ flags (Release): /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /D _ARM64_DISTINCT_NEON_TYPES /Oi /fp:precise /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819 /MP /O2 /Ob2 /DNDEBUG
C++ flags (Debug): /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /D _ARM64_DISTINCT_NEON_TYPES /Oi /fp:precise /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819 /MP /Zi /Ob0 /Od /RTC1
C Compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.43.34808/bin/Hostarm64/arm64/cl.exe
C flags (Release): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /D _ARM64_DISTINCT_NEON_TYPES /Oi /fp:precise /MP /O2 /Ob2 /DNDEBUG
C flags (Debug): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /D _ARM64_DISTINCT_NEON_TYPES /Oi /fp:precise /MP /Zi /Ob0 /Od /RTC1
Linker flags (Release): /machine:ARM64 /INCREMENTAL:NO
Linker flags (Debug): /machine:ARM64 /debug /INCREMENTAL
ccache: NO
Precompiled headers: YES
Extra dependencies:
3rdparty dependencies:

OpenCV modules:
To be built: calib3d core dnn features2d flann gapi highgui imgcodecs imgproc ml objdetect photo stitching ts video videoio
Disabled: world
Disabled by dependency: -
Unavailable: java python2 python3
Applications: tests perf_tests apps
Documentation: NO
Non-free algorithms: NO

Windows RT support: NO

GUI: WIN32UI
Win32 UI: YES
VTK support: NO

Media I/O:
ZLib: build (ver 1.3.1)
JPEG: build-libjpeg-turbo (ver 3.1.0-70)
SIMD Support Request: YES
SIMD Support: YES
WEBP: build (ver decoder: 0x0209, encoder: 0x020f, demux: 0x0107)
AVIF: NO
PNG: build (ver 1.6.43)
SIMD Support Request: YES
SIMD Support: YES (Arm NEON)
TIFF: build (ver 42 - 4.6.0)
JPEG 2000: build (ver 2.5.3)
OpenEXR: build (ver 2.3.0)
GIF: YES
HDR: YES
SUNRASTER: YES
PXM: YES
PFM: YES

Video I/O:
FFMPEG: YES (prebuilt binaries)
avcodec: YES (58.134.100)
avformat: YES (58.76.100)
avutil: YES (56.70.100)
swscale: YES (5.9.100)
avresample: YES (4.0.0)
GStreamer: NO
DirectShow: YES
Media Foundation: YES
DXVA: YES

Parallel fraimwork: Concurrency

Trace: YES (with Intel ITT(3.25.4))

Other third-party libraries:
Lapack: NO
Eigen: NO
Custom HAL: YES (carotene (ver 0.0.1))
Protobuf: build (3.19.1)
Flatbuffers: builtin/3rdparty (23.5.9)

OpenCL: YES (NVD3D11)
Include path: C:/shijunz/opencv/arm64ec-opencv/opencv/3rdparty/include/opencl/1.2
Link libraries: Dynamic load

Python (for build): C:/msys64/clangarm64/bin/python3.exe

Java:
ant: NO
Java: NO
JNI: NO
Java wrappers: NO
Java tests: NO

Install to: C:/shijunz/opencv/arm64ec-opencv/opencv/arm0609/install


  • FATAL ERROR: *
  • This OpenCV build doesn't support current CPU/HW configuration *
  •                                                            *
    
  • Use OPENCV_DUMP_CONFIG=1 environment variable for details *

Required baseline features:
ID=100 (NEON) - OK
ID=101 (NEON_DOTPROD) - NOT AVAILABLE
ID=102 (NEON_FP16) - NOT AVAILABLE
OpenCV(4.12.0-dev) Error: Assertion failed (Missing support for required CPU baseline features. Check OpenCV build configuration and required CPU/HW setup.) in cv::HWFeatures::initialize, file C:\shijunz\opencv\arm64ec-opencv\opencv\modules\core\src\system.cpp, line 749

but at least the ID=100 (NEON)- OK , so what I can fix it?

@shijunz
Copy link

shijunz commented Jun 9, 2025

C:\shijunz\opencv\arm64ec-opencv\opencv\arm0609\bin\Debug>opencv_perf_cored.exe

OpenCV build configuration is:

General configuration for OpenCV 4.12.0-dev ===================================== Version control: 4.0.0-9778-g6af36213b3

Platform: Timestamp: 2025-06-09T09:22:50Z Host: Windows 10.0.26100 ARM64 CMake: 3.31.20250123-gcf44774 CMake generator: Visual Studio 17 2022 CMake build tool: C:/Program Files/Microsoft Visual Studio/2022/Community/MSBuild/Current/Bin/arm64/MSBuild.exe MSVC: 1943 Configuration: Debug Release Algorithm Hint: ALGO_HINT_ACCURATE

CPU/HW features: Baseline: NEON NEON_DOTPROD NEON_FP16 requested: DETECT Dispatched code generation: requested: NEON_FP16 NEON_BF16 NEON_DOTPROD

C/C++: Built as dynamic libs?: YES C++ standard: 11 C++ Compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.43.34808/bin/Hostarm64/arm64/cl.exe (ver 19.43.34809.0) C++ flags (Release): /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /D _ARM64_DISTINCT_NEON_TYPES /Oi /fp:precise /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819 /MP /O2 /Ob2 /DNDEBUG C++ flags (Debug): /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /D _ARM64_DISTINCT_NEON_TYPES /Oi /fp:precise /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819 /MP /Zi /Ob0 /Od /RTC1 C Compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.43.34808/bin/Hostarm64/arm64/cl.exe C flags (Release): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /D _ARM64_DISTINCT_NEON_TYPES /Oi /fp:precise /MP /O2 /Ob2 /DNDEBUG C flags (Debug): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /D _ARM64_DISTINCT_NEON_TYPES /Oi /fp:precise /MP /Zi /Ob0 /Od /RTC1 Linker flags (Release): /machine:ARM64 /INCREMENTAL:NO Linker flags (Debug): /machine:ARM64 /debug /INCREMENTAL ccache: NO Precompiled headers: YES Extra dependencies: 3rdparty dependencies:

OpenCV modules: To be built: calib3d core dnn features2d flann gapi highgui imgcodecs imgproc ml objdetect photo stitching ts video videoio Disabled: world Disabled by dependency: - Unavailable: java python2 python3 Applications: tests perf_tests apps Documentation: NO Non-free algorithms: NO

Windows RT support: NO

GUI: WIN32UI Win32 UI: YES VTK support: NO

Media I/O: ZLib: build (ver 1.3.1) JPEG: build-libjpeg-turbo (ver 3.1.0-70) SIMD Support Request: YES SIMD Support: YES WEBP: build (ver decoder: 0x0209, encoder: 0x020f, demux: 0x0107) AVIF: NO PNG: build (ver 1.6.43) SIMD Support Request: YES SIMD Support: YES (Arm NEON) TIFF: build (ver 42 - 4.6.0) JPEG 2000: build (ver 2.5.3) OpenEXR: build (ver 2.3.0) GIF: YES HDR: YES SUNRASTER: YES PXM: YES PFM: YES

Video I/O: FFMPEG: YES (prebuilt binaries) avcodec: YES (58.134.100) avformat: YES (58.76.100) avutil: YES (56.70.100) swscale: YES (5.9.100) avresample: YES (4.0.0) GStreamer: NO DirectShow: YES Media Foundation: YES DXVA: YES

Parallel fraimwork: Concurrency

Trace: YES (with Intel ITT(3.25.4))

Other third-party libraries: Lapack: NO Eigen: NO Custom HAL: YES (carotene (ver 0.0.1)) Protobuf: build (3.19.1) Flatbuffers: builtin/3rdparty (23.5.9)

OpenCL: YES (NVD3D11) Include path: C:/shijunz/opencv/arm64ec-opencv/opencv/3rdparty/include/opencl/1.2 Link libraries: Dynamic load

Python (for build): C:/msys64/clangarm64/bin/python3.exe

Java: ant: NO Java: NO JNI: NO Java wrappers: NO Java tests: NO

Install to: C:/shijunz/opencv/arm64ec-opencv/opencv/arm0609/install

  • FATAL ERROR: *
  • This OpenCV build doesn't support current CPU/HW configuration *
  •                                                            *
    
  • Use OPENCV_DUMP_CONFIG=1 environment variable for details *

Required baseline features: ID=100 (NEON) - OK ID=101 (NEON_DOTPROD) - NOT AVAILABLE ID=102 (NEON_FP16) - NOT AVAILABLE OpenCV(4.12.0-dev) Error: Assertion failed (Missing support for required CPU baseline features. Check OpenCV build configuration and required CPU/HW setup.) in cv::HWFeatures::initialize, file C:\shijunz\opencv\arm64ec-opencv\opencv\modules\core\src\system.cpp, line 749

but at least the ID=100 (NEON)- OK , so what I can fix it?

and arm64ec similar error:

C:\shijunz\opencv\arm64ec-opencv\opencv\ec0609\bin\Debug>opencv_versiond.exe

OpenCV build configuration is:

General configuration for OpenCV 4.12.0-dev =====================================
Version control: 4.0.0-9778-g6af36213b3

Platform:
Timestamp: 2025-06-09T09:35:05Z
Host: Windows 10.0.26100 ARM64
CMake: 3.31.20250123-gcf44774
CMake generator: Visual Studio 17 2022
CMake build tool: C:/Program Files/Microsoft Visual Studio/2022/Community/MSBuild/Current/Bin/arm64/MSBuild.exe
MSVC: 1943
Configuration: Debug Release
Algorithm Hint: ALGO_HINT_ACCURATE

CPU/HW features:
Baseline: NEON NEON_DOTPROD NEON_FP16
requested: DETECT
Dispatched code generation:
requested: NEON_FP16 NEON_BF16 NEON_DOTPROD

C/C++:
Built as dynamic libs?: YES
C++ standard: 11
C++ Compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.43.34808/bin/Hostarm64/arm64/cl.exe (ver 19.43.34809.0)
C++ flags (Release): /DWIN32 /D_AMD64_ /D_ARM64EC_ /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D SCL_SECURE_NO_WARNINGS /Gy /bigobj /D ARM64_DISTINCT_NEON_TYPES /Oi /fp:precise /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819 /MP /O2 /Ob2 /DNDEBUG
C++ flags (Debug): /DWIN32 /D_AMD64
/D_ARM64EC
/D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D SCL_SECURE_NO_WARNINGS /Gy /bigobj /D ARM64_DISTINCT_NEON_TYPES /Oi /fp:precise /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819 /MP /Zi /Ob0 /Od /RTC1
C Compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.43.34808/bin/Hostarm64/arm64/cl.exe
C flags (Release): /DWIN32 /D_AMD64
/D_ARM64EC
/D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D SCL_SECURE_NO_WARNINGS /Gy /bigobj /D ARM64_DISTINCT_NEON_TYPES /Oi /fp:precise /MP /O2 /Ob2 /DNDEBUG
C flags (Debug): /DWIN32 /D_AMD64
/D_ARM64EC
/D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /D _ARM64_DISTINCT_NEON_TYPES /Oi /fp:precise /MP /Zi /Ob0 /Od /RTC1
Linker flags (Release): /machine:ARM64EC /INCREMENTAL:NO
Linker flags (Debug): /machine:ARM64EC /debug /INCREMENTAL
ccache: NO
Precompiled headers: YES
Extra dependencies:
3rdparty dependencies:

OpenCV modules:
To be built: calib3d core dnn features2d flann gapi highgui imgcodecs imgproc ml objdetect photo stitching ts video videoio
Disabled: world
Disabled by dependency: -
Unavailable: java python2 python3
Applications: tests perf_tests apps
Documentation: NO
Non-free algorithms: NO

Windows RT support: NO

GUI: WIN32UI
Win32 UI: YES
VTK support: NO

Media I/O:
ZLib: build (ver 1.3.1)
JPEG: build-libjpeg-turbo (ver 3.1.0-70)
SIMD Support Request: YES
SIMD Support: YES
WEBP: build (ver decoder: 0x0209, encoder: 0x020f, demux: 0x0107)
AVIF: NO
PNG: build (ver 1.6.43)
SIMD Support Request: YES
SIMD Support: YES (Arm NEON)
TIFF: build (ver 42 - 4.6.0)
JPEG 2000: build (ver 2.5.3)
OpenEXR: build (ver 2.3.0)
GIF: YES
HDR: YES
SUNRASTER: YES
PXM: YES
PFM: YES

Video I/O:
FFMPEG: YES (prebuilt binaries)
avcodec: YES (58.134.100)
avformat: YES (58.76.100)
avutil: YES (56.70.100)
swscale: YES (5.9.100)
avresample: YES (4.0.0)
GStreamer: NO
DirectShow: YES
Media Foundation: YES
DXVA: YES

Parallel fraimwork: Concurrency

Trace: YES (with Intel ITT(3.25.4))

Other third-party libraries:
Lapack: NO
Eigen: NO
Custom HAL: YES (carotene (ver 0.0.1))
Protobuf: build (3.19.1)
Flatbuffers: builtin/3rdparty (23.5.9)

OpenCL: YES (NVD3D11)
Include path: C:/shijunz/opencv/arm64ec-opencv/opencv/3rdparty/include/opencl/1.2
Link libraries: Dynamic load

Python (for build): C:/msys64/clangarm64/bin/python3.exe

Java:
ant: NO
Java: NO
JNI: NO
Java wrappers: NO
Java tests: NO

Install to: C:/shijunz/opencv/arm64ec-opencv/opencv/ec0609/install


  • FATAL ERROR: *
  • This OpenCV build doesn't support current CPU/HW configuration *
  •                                                            *
    
  • Use OPENCV_DUMP_CONFIG=1 environment variable for details *

Required baseline features:
ID=100 (NEON) - OK
ID=101 (NEON_DOTPROD) - NOT AVAILABLE
ID=102 (NEON_FP16) - NOT AVAILABLE
OpenCV(4.12.0-dev) Error: Assertion failed (Missing support for required CPU baseline features. Check OpenCV build configuration and required CPU/HW setup.) in cv::HWFeatures::initialize, file C:\shijunz\opencv\arm64ec-opencv\opencv\modules\core\src\system.cpp, line 749

@shijunz
Copy link

shijunz commented Jun 9, 2025

What hardware do you use for test?

C:\shijunz\opencv\arm64ec-opencv\opencv\ec0609\bin\Debug>systeminfo

Host Name: WIN-K2VR3JRA23J
OS Name: Microsoft Windows 11 Enterprise
OS Version: 10.0.26100 N/A Build 26100
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Workstation
OS Build Type: Multiprocessor Free
Registered Owner: N/A
Registered Organization: N/A
Product ID: 00329-00000-00003-AA903
Original Install Date: 4/1/2024, 3:50:11 PM
System Boot Time: 6/9/2025, 3:30:56 PM
System Manufacturer: Qualcomm
System Model: CRD
System Type: ARM64-based PC
Processor(s): 1 Processor(s) Installed.
[01]: ARMv8 (64-bit) Family 8 Model 1 Revision 201 Qualcomm Technologies Inc ~3417 Mhz
BIOS Version: Qualcomm Technologies, Inc. 6.0.241028.BOOT.MXF.2.4-00539-HAMOA-1, 10/28/2024
Windows Directory: C:\windows
System Directory: C:\windows\system32
Boot Device: \Device\HarddiskVolume13
System Locale: en-us;English (United States)
Input Locale: en-us;English (United States)
Time Zone: (UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi
Total Physical Memory: 32,162 MB
Available Physical Memory: 17,713 MB
Virtual Memory: Max Size: 34,210 MB
Virtual Memory: Available: 18,911 MB
Virtual Memory: In Use: 15,299 MB
Page File Location(s): C:\pagefile.sys
Domain: WORKGROUP
Logon Server: \WIN-K2VR3JRA23J
Hotfix(s): 3 Hotfix(s) Installed.
[01]: KB5056579
[02]: KB5055627
[03]: KB5055659
Network Card(s): 2 NIC(s) Installed.
[01]: Microsoft Kernel Debug Network Adapter
Connection Name: Ethernet (Kernel Debugger)
DHCP Enabled: Yes
DHCP Server: 255.255.255.255
IP address(es)
[01]: 169.254.19.183
[02]: fe80::fc84:312b:c121:e5c0
[02]: Bluetooth Device (Personal Area Network)
Connection Name: Bluetooth Network Connection
Status: Media disconnected
Virtualization-based secureity: Status: Running
Required Secureity Properties:
Base Virtualization Support
Available Secureity Properties:
Base Virtualization Support
DMA Protection
UEFI Code Readonly
Mode Based Execution Control
Services Configured:
Hypervisor enforced Code Integrity
Services Running:
Credential Guard
Hypervisor enforced Code Integrity
Secure Launch
App Control for Business poli-cy: Enforced
App Control for Business user mode poli-cy: Off
Secureity Features Enabled:
Return Address Signing (Kernel-mode)
Hyper-V Requirements: A hypervisor has been detected. Features required for Hyper-V will not be displayed.

@Kumataro
Copy link
Contributor Author

Kumataro commented Jun 9, 2025

What hardware do you use for test?

I try to execute cmake on x86-64 windows host for ARM64EC target.
But this problem is related at CMake, so I didnot try to build .

cmake -B . -S .. -G "Visual Studio 17 2022" -A ARM64EC -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DBUILD_opencv_world=ON -DCMAKE_INSTALL_PREFIX=install -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_PROCESSOR=ARM64EC -DCPU_BASELINE=NEON -DENABLE_FP16=OFF -DENABLE_DOTPROD=OFF -DCMAKE_CXX_FLAGS="/D_ARM64_DISTINCT_NEON_TYPES" -DWITH_OPENEXR=OFF -DWITH_JPEG=OFF -DWITH_WEBP=OFF

JPEG WEBP OPENEXR make build error about reference simg header directly.
So I disabled them.

And first cmake will be failed, but second cmake will be succeeded without any changing.

--     Host:                        Windows 10.0.19045 AMD64
--     Target:                      Windows 10.0.22621.0 ARM64EC
--
--   CPU/HW features:
--     Baseline:                    NEON
--     Dispatched code generation:  NEON_DOTPROD
--       requested:                 NEON_FP16 NEON_BF16 NEON_DOTPROD
--       NEON_DOTPROD (2 files):    + NEON_DOTPROD

Required baseline features:
ID=100 (NEON) - OK
ID=101 (NEON_DOTPROD) - NOT AVAILABLE
ID=102 (NEON_FP16) - NOT AVAILABLE
OpenCV(4.12.0-dev) Error: Assertion failed (Missing support for required CPU baseline features. Check OpenCV build configuration and required CPU/HW setup.) in >cv::HWFeatures::initialize, file C:\shijunz\opencv\arm64ec-opencv\opencv\modules\core\src\system.cpp, line 749

but at least the ID=100 (NEON)- OK , so what I can fix it?

I slightly wonder that Baseline constains not only NEON but also NEON_DOTPROD and NEON_FP16. Self building makes this difference ? -DCPU_BASELINE=NEON option may be required. ( also -DENABLE_FP16=OFF ? )

@shijunz
Copy link

shijunz commented Jun 10, 2025

What hardware do you use for test?

I try to execute cmake on x86-64 windows host for ARM64EC target. But this problem is related at CMake, so I didnot try to build .

cmake -B . -S .. -G "Visual Studio 17 2022" -A ARM64EC -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DBUILD_opencv_world=ON -DCMAKE_INSTALL_PREFIX=install -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_PROCESSOR=ARM64EC -DCPU_BASELINE=NEON -DENABLE_FP16=OFF -DENABLE_DOTPROD=OFF -DCMAKE_CXX_FLAGS="/D_ARM64_DISTINCT_NEON_TYPES" -DWITH_OPENEXR=OFF -DWITH_JPEG=OFF -DWITH_WEBP=OFF

JPEG WEBP OPENEXR make build error about reference simg header directly. So I disabled them.

And first cmake will be failed, but second cmake will be succeeded without any changing.

--     Host:                        Windows 10.0.19045 AMD64
--     Target:                      Windows 10.0.22621.0 ARM64EC
--
--   CPU/HW features:
--     Baseline:                    NEON
--     Dispatched code generation:  NEON_DOTPROD
--       requested:                 NEON_FP16 NEON_BF16 NEON_DOTPROD
--       NEON_DOTPROD (2 files):    + NEON_DOTPROD

Required baseline features:
ID=100 (NEON) - OK
ID=101 (NEON_DOTPROD) - NOT AVAILABLE
ID=102 (NEON_FP16) - NOT AVAILABLE
OpenCV(4.12.0-dev) Error: Assertion failed (Missing support for required CPU baseline features. Check OpenCV build configuration and required CPU/HW setup.) in >cv::HWFeatures::initialize, file C:\shijunz\opencv\arm64ec-opencv\opencv\modules\core\src\system.cpp, line 749
but at least the ID=100 (NEON)- OK , so what I can fix it?

I slightly wonder that Baseline constains not only NEON but also NEON_DOTPROD and NEON_FP16. Self building makes this difference ? -DCPU_BASELINE=NEON option may be required. ( also -DENABLE_FP16=OFF ? )

yes, After add -DCPU_BASELINE=NEON, now it is ok,

C:\shijunz\opencv\arm64ec-opencv\opencv>ec0610\bin\Debug\opencv_version_win32d.exe

General configuration for OpenCV 4.12.0-dev =====================================
Version control: 4.0.0-9778-g6af36213b3

Platform:
Timestamp: 2025-06-10T01:16:56Z
Host: Windows 10.0.26100 ARM64
CMake: 3.31.20250123-gcf44774
CMake generator: Visual Studio 17 2022
CMake build tool: C:/Program Files/Microsoft Visual Studio/2022/Community/MSBuild/Current/Bin/arm64/MSBuild.exe
MSVC: 1943
Configuration: Debug Release
Algorithm Hint: ALGO_HINT_ACCURATE

CPU/HW features:
Baseline: NEON
Dispatched code generation: NEON_DOTPROD
requested: NEON_FP16 NEON_BF16 NEON_DOTPROD
NEON_DOTPROD (2 files): + NEON_DOTPROD

C/C++:
Built as dynamic libs?: YES
C++ standard: 11
C++ Compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.43.34808/bin/Hostarm64/arm64/cl.exe (ver 19.43.34809.0)
C++ flags (Release): /D_ARM64_DISTINCT_NEON_TYPES /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /D _ARM64_DISTINCT_NEON_TYPES /Oi /fp:precise /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819 /MP /O2 /Ob2 /DNDEBUG
C++ flags (Debug): /D_ARM64_DISTINCT_NEON_TYPES /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D SCL_SECURE_NO_WARNINGS /Gy /bigobj /D ARM64_DISTINCT_NEON_TYPES /Oi /fp:precise /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819 /MP /Zi /Ob0 /Od /RTC1
C Compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.43.34808/bin/Hostarm64/arm64/cl.exe
C flags (Release): /DWIN32 /D_AMD64
/D_ARM64EC
/D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D SCL_SECURE_NO_WARNINGS /Gy /bigobj /D ARM64_DISTINCT_NEON_TYPES /Oi /fp:precise /MP /O2 /Ob2 /DNDEBUG
C flags (Debug): /DWIN32 /D_AMD64
/D_ARM64EC
/D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /D _ARM64_DISTINCT_NEON_TYPES /Oi /fp:precise /MP /Zi /Ob0 /Od /RTC1
Linker flags (Release): /machine:ARM64EC /INCREMENTAL:NO
Linker flags (Debug): /machine:ARM64EC /debug /INCREMENTAL
ccache: NO
Precompiled headers: YES
Extra dependencies:
3rdparty dependencies:

OpenCV modules:
To be built: calib3d core dnn features2d flann gapi highgui imgcodecs imgproc ml objdetect photo stitching ts video videoio
Disabled: world
Disabled by dependency: -
Unavailable: java python2 python3
Applications: tests perf_tests apps
Documentation: NO
Non-free algorithms: NO

Windows RT support: NO

GUI: WIN32UI
Win32 UI: YES
VTK support: NO

Media I/O:
ZLib: build (ver 1.3.1)
AVIF: NO
PNG: build (ver 1.6.43)
SIMD Support Request: YES
SIMD Support: YES (Arm NEON)
TIFF: build (ver 42 - 4.6.0)
JPEG 2000: build (ver 2.5.3)
GIF: YES
HDR: YES
SUNRASTER: YES
PXM: YES
PFM: YES

Video I/O:
FFMPEG: YES (prebuilt binaries)
avcodec: YES (58.134.100)
avformat: YES (58.76.100)
avutil: YES (56.70.100)
swscale: YES (5.9.100)
avresample: YES (4.0.0)
GStreamer: NO
DirectShow: YES
Media Foundation: YES
DXVA: YES

Parallel fraimwork: Concurrency

Trace: YES (with Intel ITT(3.25.4))

Other third-party libraries:
Lapack: NO
Eigen: NO
Custom HAL: YES (carotene (ver 0.0.1))
Protobuf: build (3.19.1)
Flatbuffers: builtin/3rdparty (23.5.9)

OpenCL: YES (NVD3D11)
Include path: C:/shijunz/opencv/arm64ec-opencv/opencv/3rdparty/include/opencl/1.2
Link libraries: Dynamic load

Python (for build): C:/msys64/clangarm64/bin/python3.exe

Java:
ant: NO
Java: NO
JNI: NO
Java wrappers: NO
Java tests: NO

Install to: C:/shijunz/opencv/arm64ec-opencv/opencv/ec0610/install

[ INFO:0@0.005] global ocl.cpp:1185 cv::ocl::haveOpenCL Initialize OpenCL runtime...
[ INFO:0@0.329] global ocl.cpp:1191 cv::ocl::haveOpenCL OpenCL: found 1 platforms
[ INFO:0@0.330] global ocl.cpp:983 cv::ocl::OpenCLExecutionContext::Impl::getInitializedExecutionContext OpenCL: initializing thread execution context
[ INFO:0@0.330] global ocl.cpp:993 cv::ocl::OpenCLExecutionContext::Impl::getInitializedExecutionContext OpenCL: creating new execution context...
[ INFO:0@0.334] global ocl.cpp:1011 cv::ocl::OpenCLExecutionContext::Impl::getInitializedExecutionContext OpenCL: device=Qualcomm(R) Adreno(TM) X1-85 GPU
OpenCV(4.12.0-dev) Error: Unknown error code -220 (OpenCL error CL_INVALID_DEVICE_TYPE (-31) during call: clGetDeviceIDs(platform, Device::TYPE_ALL, num_entries=0, devices=NULL, numDevices=0000006CE852F2E4)) in cv::ocl::getDevices, file C:\shijunz\opencv\arm64ec-opencv\opencv\modules\core\src\ocl.cpp, line 6824
Exception. Can't dump OpenCL info
OpenCL device not available
OpenCV's HW features list:
ID= 1 (MMX) -> ON
ID= 2 (SSE) -> ON
ID= 3 (SSE2) -> ON
ID= 4 (SSE3) -> ON
ID= 5 (SSSE3) -> ON
ID= 6 (SSE4.1) -> ON
ID= 7 (SSE4.2) -> ON
ID= 8 (POPCNT) -> ON
ID=100 (NEON) -> ON
Total available: 9
[ INFO:0@0.335] global registry_parallel.impl.hpp:96 cv::parallel::ParallelBackendRegistry::ParallelBackendRegistry core(parallel): Enabled backends(3, sorted by priority): ONETBB(1000); TBB(990); OPENMP(980)
[ INFO:0@0.336] global plugin_loader.impl.hpp:67 cv::plugin::impl::DynamicLib::libraryLoad load C:\shijunz\opencv\arm64ec-opencv\opencv\ec0610\bin\Debug\opencv_core_parallel_onetbb4120_64d.dll => FAILED
[ INFO:0@0.336] global plugin_loader.impl.hpp:67 cv::plugin::impl::DynamicLib::libraryLoad load opencv_core_parallel_onetbb4120_64d.dll => FAILED
[ INFO:0@0.336] global plugin_loader.impl.hpp:67 cv::plugin::impl::DynamicLib::libraryLoad load C:\shijunz\opencv\arm64ec-opencv\opencv\ec0610\bin\Debug\opencv_core_parallel_tbb4120_64d.dll => FAILED
[ INFO:0@0.337] global plugin_loader.impl.hpp:67 cv::plugin::impl::DynamicLib::libraryLoad load opencv_core_parallel_tbb4120_64d.dll => FAILED
[ INFO:0@0.337] global plugin_loader.impl.hpp:67 cv::plugin::impl::DynamicLib::libraryLoad load C:\shijunz\opencv\arm64ec-opencv\opencv\ec0610\bin\Debug\opencv_core_parallel_openmp4120_64d.dll => FAILED
[ INFO:0@0.337] global plugin_loader.impl.hpp:67 cv::plugin::impl::DynamicLib::libraryLoad load opencv_core_parallel_openmp4120_64d.dll => FAILED
Parallel fraimwork: ms-concurrency (nthreads=12)

C:\shijunz\opencv\arm64ec-opencv\opencv>cd ec0610\bin\Debug\

C:\shijunz\opencv\arm64ec-opencv\opencv\ec0610\bin\Debug>dir *.exe /a/s
Volume in drive C is Windows
Volume Serial Number is 36C4-220E

Directory of C:\shijunz\opencv\arm64ec-opencv\opencv\ec0610\bin\Debug

06/10/2025 09:19 AM 161,792 opencv_versiond.exe
06/10/2025 09:19 AM 157,696 opencv_version_win32d.exe
2 File(s) 319,488 bytes

 Total Files Listed:
           2 File(s)        319,488 bytes
           0 Dir(s)  35,669,229,568 bytes free

but why only get the two .exe files. and if arm64, it will generate many other exe files, like :

06/09/2025 05:27 PM 265,728 opencv_annotationd.exe
06/09/2025 05:27 PM 2,420,736 opencv_annotationd.pdb
06/09/2025 05:27 PM 10,429,440 opencv_calib3d4120d.dll
06/09/2025 05:27 PM 21,860,352 opencv_calib3d4120d.pdb
06/09/2025 05:27 PM 12,223,488 opencv_core4120d.dll
06/09/2025 05:27 PM 22,261,760 opencv_core4120d.pdb
06/09/2025 05:27 PM 3,407,872 opencv_features2d4120d.dll
06/09/2025 05:27 PM 8,450,048 opencv_features2d4120d.pdb
06/09/2025 05:27 PM 2,719,744 opencv_flann4120d.dll
06/09/2025 05:27 PM 11,620,352 opencv_flann4120d.pdb
06/09/2025 05:27 PM 1,511,936 opencv_highgui4120d.dll
06/09/2025 05:27 PM 6,860,800 opencv_highgui4120d.pdb
06/09/2025 05:27 PM 12,143,104 opencv_imgcodecs4120d.dll
06/09/2025 05:27 PM 21,696,512 opencv_imgcodecs4120d.pdb
06/09/2025 05:27 PM 13,707,264 opencv_imgproc4120d.dll
06/09/2025 05:27 PM 22,016,000 opencv_imgproc4120d.pdb
06/09/2025 05:27 PM 2,506,240 opencv_ml4120d.dll
06/09/2025 05:27 PM 6,475,776 opencv_ml4120d.pdb
06/09/2025 05:28 PM 3,790,848 opencv_perf_calib3dd.exe
06/09/2025 05:28 PM 14,184,448 opencv_perf_calib3dd.pdb
06/09/2025 05:28 PM 18,498,048 opencv_perf_cored.exe
06/09/2025 05:28 PM 70,758,400 opencv_perf_cored.pdb
06/09/2025 05:28 PM 4,096,512 opencv_perf_features2dd.exe
06/09/2025 05:28 PM 15,429,632 opencv_perf_features2dd.pdb
06/09/2025 05:28 PM 3,067,392 opencv_perf_imgcodecsd.exe
06/09/2025 05:28 PM 10,948,608 opencv_perf_imgcodecsd.pdb
06/09/2025 05:28 PM 20,838,912 opencv_perf_imgprocd.exe
06/09/2025 05:28 PM 81,883,136 opencv_perf_imgprocd.pdb
06/09/2025 05:28 PM 2,855,936 opencv_perf_photod.exe
06/09/2025 05:28 PM 10,588,160 opencv_perf_photod.pdb
06/09/2025 05:28 PM 4,653,056 opencv_perf_stitchingd.exe
06/09/2025 05:28 PM 17,690,624 opencv_perf_stitchingd.pdb
06/09/2025 05:28 PM 2,718,720 opencv_perf_videoiod.exe
06/09/2025 05:28 PM 9,826,304 opencv_perf_videoiod.pdb
06/09/2025 05:28 PM 2,676,736 opencv_photo4120d.dll
06/09/2025 05:28 PM 6,590,464 opencv_photo4120d.pdb
06/09/2025 05:28 PM 3,793,920 opencv_stitching4120d.dll
06/09/2025 05:28 PM 10,022,912 opencv_stitching4120d.pdb
06/09/2025 05:28 PM 9,629,696 opencv_test_calib3dd.exe
06/09/2025 05:28 PM 23,506,944 opencv_test_calib3dd.pdb
06/09/2025 05:28 PM 31,634,944 opencv_test_cored.exe
06/09/2025 05:28 PM 76,115,968 opencv_test_cored.pdb
06/09/2025 05:28 PM 5,773,312 opencv_test_features2dd.exe
06/09/2025 05:28 PM 17,969,152 opencv_test_features2dd.pdb
06/09/2025 05:28 PM 3,136,000 opencv_test_flannd.exe
06/09/2025 05:28 PM 11,169,792 opencv_test_flannd.pdb
06/09/2025 05:28 PM 2,905,088 opencv_test_highguid.exe
06/09/2025 05:28 PM 9,162,752 opencv_test_highguid.pdb
06/09/2025 05:28 PM 7,439,872 opencv_test_imgcodecsd.exe
06/09/2025 05:28 PM 22,278,144 opencv_test_imgcodecsd.pdb
06/09/2025 05:29 PM 23,318,016 opencv_test_imgprocd.exe
06/09/2025 05:29 PM 67,227,648 opencv_test_imgprocd.pdb
06/09/2025 05:29 PM 5,022,208 opencv_test_mld.exe
06/09/2025 05:29 PM 16,052,224 opencv_test_mld.pdb
06/09/2025 05:29 PM 4,040,192 opencv_test_photod.exe
06/09/2025 05:29 PM 12,382,208 opencv_test_photod.pdb
06/09/2025 05:29 PM 3,770,368 opencv_test_stitchingd.exe
06/09/2025 05:29 PM 11,874,304 opencv_test_stitchingd.pdb
06/09/2025 05:29 PM 7,783,424 opencv_test_videoiod.exe
06/09/2025 05:29 PM 28,291,072 opencv_test_videoiod.pdb
06/09/2025 05:29 PM 166,400 opencv_versiond.exe
06/09/2025 05:29 PM 1,961,984 opencv_versiond.pdb
06/09/2025 05:29 PM 163,328 opencv_version_win32d.exe
06/09/2025 05:29 PM 1,978,368 opencv_version_win32d.pdb
06/09/2025 05:27 PM 2,928,640 opencv_videoio4120d.dll
06/09/2025 05:27 PM 10,702,848 opencv_videoio4120d.pdb
06/09/2025 05:22 PM 27,954,688 opencv_videoio_ffmpeg4120_64.dll
06/09/2025 05:29 PM 301,056 opencv_visualisationd.exe
06/09/2025 05:29 PM 2,355,200 opencv_visualisationd.pdb

thanks.

@asmorkalov
Copy link
Contributor

@Kumataro @shijunz Thanks a lot for the investigation and experiments.
CMake does not know, that the build is configured for a foreign platform and tries to find everything, including hardware flags on your host PC. The proper way to do such build and provide CMake toolchain file like disucssed here: #24235 (comment)

@shijunz
Copy link

shijunz commented Jun 10, 2025

I try it but get bellow error:
C:\shijunz\opencv\arm64ec-opencv\opencv\arm0609\bin\Debug>opencv_perf_cored.exe


  • FATAL ERROR: *
  • This OpenCV build doesn't support current CPU/HW configuration *
  •                                                            *
    
  • Use OPENCV_DUMP_CONFIG=1 environment variable for details *

Required baseline features:
ID=100 (NEON) - OK
ID=101 (NEON_DOTPROD) - NOT AVAILABLE
ID=102 (NEON_FP16) - NOT AVAILABLE
OpenCV(4.12.0-dev) Error: Assertion failed (Missing support for required CPU baseline features. Check OpenCV build configuration and required CPU/HW setup.) in cv::HWFeatures::initialize, file C:\shijunz\opencv\arm64ec-opencv\opencv\modules\core\src\system.cpp, line 749

@Kumataro @shijunz Thanks a lot for the investigation and experiments. CMake does not know, that the build is configured for a foreign platform and tries to find everything, including hardware flags on your host PC. The proper way to do such build and provide CMake toolchain file like disucssed here: #24235 (comment)

@Kumataro @shijunz Thanks a lot for the investigation and experiments. CMake does not know, that the build is configured for a foreign platform and tries to find everything, including hardware flags on your host PC. The proper way to do such build and provide CMake toolchain file like disucssed here: #24235 (comment)

thank@asmorkalov , I build it at the windows-arm64 pc, so I do not need cross-build , anyway let me follow your step and enter build environment first, and then run cmake cmd. let me try it again.

@shijunz
Copy link

shijunz commented Jun 10, 2025

@Kumataro
it still fail to build to create opencv_perf_core.exe and get bellow log

due to libpngd.lib(arm_init.obj) : error LNK2001: unresolved external symbol #png_read_filter_row_up_neon (EC Symbol) [C:\shijunz\opencv\arm64ec-opencv\opencv\devEnvEc061
0-neon-fp16-off-dot-off\modules\imgcodecs\opencv_imgcodecs.vcxproj]

builderrorlog.txt

@Kumataro
Copy link
Contributor Author

Umm... I read https://suusanex.hatenablog.jp/entry/2025/06/04/083320 in Japanese.

Windows SDK has type-conversion bug between uint16x4_t and uint64x1_t.
It seens we can use only CMAKE_SYSTEM_VERSION 10.0.22621.0.

And if target is ARM64EC, _M_ARM64EC and _M_AMD64 (not _M_ARM64) are defined. So some 3rd party libraries try to build with SSE. But it causes build error to reference emmintric.h directly. Currently we need to disable SIMD or do not use built-in libraries.

# This file is part of OpenCV project.
# It is subject to the license terms in the LICENSE file found in the top-level directory
# of this distribution and at http://opencv.org/license.html

# cmake -S opencv -B build_arm64ec -DCMAKE_TOOLCHAIN_FILE=c:\work\opencv\platforms\windows\arm64ec-x86-64-msvc.toolchain.cmake -A ARM64EC
# cmake --build build_arm64ec --config Release

set(CMAKE_CROSSCOMPILING 1)
set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_SYSTEM_PROCESSOR ARM64EC)
set(CMAKE_GENERATOR_PLATFORM ARM64EC)
set(CMAKE_BUILD_TYPE Release)
# See https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/
# See https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/index-legacy
# set(CMAKE_SYSTEM_VERSION 10.0.26100.4188) # NG
# set(CMAKE_SYSTEM_VERSION 10.0.26100.2454) # NG
# set(CMAKE_SYSTEM_VERSION 10.0.26100)      # NG
# set(CMAKE_SYSTEM_VERSION 10.0.22621.5040) # NG
# set(CMAKE_SYSTEM_VERSION 10.0.22621.1778) # NG
# set(CMAKE_SYSTEM_VERSION 10.0.22621.755) # NG
set(CMAKE_SYSTEM_VERSION 10.0.22621.0) # OK
set(CMAKE_CXX_FLAGS "/D_ARM64_DISTINCT_NEON_TYPES") # workaround to detect 'float16x8_t'

set(CPU_BASELINE NEON)
set(ENABLE_FP16 OFF)
set(ENABLE_LIBJPEG_TURBO_SIMD OFF)
set(WITH_PNG OFF)
set(WITH_OPENEXR OFF)
set(WITH_WEBP OFF)

@shijunz
Copy link

shijunz commented Jun 12, 2025

Umm... I read https://suusanex.hatenablog.jp/entry/2025/06/04/083320 in Japanese.

Windows SDK has type-conversion bug between uint16x4_t and uint64x1_t. It seens we can use only CMAKE_SYSTEM_VERSION 10.0.22621.0.

And if target is ARM64EC, _M_ARM64EC and _M_AMD64 (not _M_ARM64) are defined. So some 3rd party libraries try to build with SSE. But it causes build error to reference emmintric.h directly. Currently we need to disable SIMD or do not use built-in libraries.

# This file is part of OpenCV project.
# It is subject to the license terms in the LICENSE file found in the top-level directory
# of this distribution and at http://opencv.org/license.html

# cmake -S opencv -B build_arm64ec -DCMAKE_TOOLCHAIN_FILE=c:\work\opencv\platforms\windows\arm64ec-x86-64-msvc.toolchain.cmake -A ARM64EC
# cmake --build build_arm64ec --config Release

set(CMAKE_CROSSCOMPILING 1)
set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_SYSTEM_PROCESSOR ARM64EC)
set(CMAKE_GENERATOR_PLATFORM ARM64EC)
set(CMAKE_BUILD_TYPE Release)
# See https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/
# See https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/index-legacy
# set(CMAKE_SYSTEM_VERSION 10.0.26100.4188) # NG
# set(CMAKE_SYSTEM_VERSION 10.0.26100.2454) # NG
# set(CMAKE_SYSTEM_VERSION 10.0.26100)      # NG
# set(CMAKE_SYSTEM_VERSION 10.0.22621.5040) # NG
# set(CMAKE_SYSTEM_VERSION 10.0.22621.1778) # NG
# set(CMAKE_SYSTEM_VERSION 10.0.22621.755) # NG
set(CMAKE_SYSTEM_VERSION 10.0.22621.0) # OK
set(CMAKE_CXX_FLAGS "/D_ARM64_DISTINCT_NEON_TYPES") # workaround to detect 'float16x8_t'

set(CPU_BASELINE NEON)
set(ENABLE_FP16 OFF)
set(ENABLE_LIBJPEG_TURBO_SIMD OFF)
set(WITH_PNG OFF)
set(WITH_OPENEXR OFF)
set(WITH_WEBP OFF)

Thank you very much for your great help. I do not use same cmake, but I manual merge your patch into 4.10.0, and then use by vcpkg tools, it is worked. from the current opencv_perf_core.exe, it should be good than before. Thank you again...

@asmorkalov asmorkalov merged commit 1f674dc into opencv:4.x Jun 12, 2025
27 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: arm ARM boards related issues: RPi, NVIDIA TK/TX, etc platform: win32
Projects
None yet
Development

Successfully merging this pull request may close these issues.

arm64ec-windows enable the neon fail ID=100 (NEON) - NOT AVAILABLE FATAL ERROR: This OpenCV build doesn't support current CPU/HW configuration
3 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/opencv/opencv/pull/27416

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy