Skip to content

Add support for building dlib on Windows ARM64 - #3164

Merged
davisking merged 4 commits into
davisking:masterfrom
MugundanMCW:windows_arm64
Oct 4, 2026
Merged

davisking merged 4 commits into
davisking:masterfrom
MugundanMCW:windows_arm64

Conversation

@MugundanMCW

Copy link
Copy Markdown
Contributor

PR Description:

  • The PR adds build and CI support for dlib library on Windows ARM64
  • The CMake script and setup.py file has been updated to support Windows ARM64 target
  • simd4f.h / simd4i.h : Added guard for the GCC supported attribute((aligned)) and the duplicate int32x4_t/uint32x4_t conversion operators for MSVC, where the NEON vector types are identical.

MugundanMCW and others added 4 commits September 30, 2026 08:33
MSVC aliases NEON vector types, so removing the float-to-integer conversion
operator makes simd4i construction copy floating-point bits into integer
lanes. Add explicit numeric construction and assignment, and enable raw
conversion overloads only when the underlying vector types differ. Use
standard alignas(16) instead of compiler-specific alignment guards. Keep
mixed float/integer arithmetic and existing x86 SIMD behavior intact.

Select SIMD options using the MSVC compiler's target architecture rather
than the host processor. Select the Python extension architecture through
sysconfig.get_platform(), preserving x64 builds when Python runs under
emulation on ARM64 Windows.

Add conversion, mixed-arithmetic, image-resizing, Python architecture, and
CMake target-selection regressions. Add a Windows ARM64 C++ CI job for SIMD
and FHOG, and select Python 3.13 for the Windows Python jobs.

Validation passed for native scalar/SSE2/AVX2, GCC ARM64 under QEMU, Clang
NEON with MSVC compatibility macros, and a model of MSVC's aliased vector
types under ASan/UBSan. Python and CMake target-selection tests also pass.
Native MSVC ARM64 verification remains pending. An existing ARM image
filtering tolerance failure reproduces on the original PR and is unchanged.
@davisking

Copy link
Copy Markdown
Owner

Thanks for the PR. I made some adjustments. Does it still work for you?

@MugundanMCW

Copy link
Copy Markdown
Contributor Author

Hi @davisking
Thanks for the response, yes, the changes are working fine: https://github.com/MugundanMCW/dlib/actions/runs/37172518518/job/111348216472

@davisking

Copy link
Copy Markdown
Owner

Cool, thanks for the PR :D

@davisking
davisking merged commit 51be591 into davisking:master Oct 4, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants