Skip to content

Enable MSVC support for AArch64 code paths - #1305

Open
Harishmcw wants to merge 1 commit into
ARM-software:mainfrom
Harishmcw:win_arm64
Open

Enable MSVC support for AArch64 code paths#1305
Harishmcw wants to merge 1 commit into
ARM-software:mainfrom
Harishmcw:win_arm64

Conversation

@Harishmcw

@Harishmcw Harishmcw commented Jul 29, 2026

Copy link
Copy Markdown

Summary

  • This PR improves MSVC compatibility for Windows on Arm64 by extending AArch64-specific code paths to also recognize _M_ARM64.
  • The changes ensure that ARM64-specific declarations, lookup table types, and rounding policy selection are consistently enabled across Clang/GCC and MSVC builds.

Motivation

  • While building OpenVINO for Windows on Arm64 using MSVC, several compilation failures and runtime crashes were encountered in ARM Compute Library due to ARM64-specific code being guarded only by aarch64.
  • MSVC defines _M_ARM64 instead of aarch64, causing those code paths to be excluded.

This resulted in compilation errors such as:

error C2039: 'NEReorderLayer': is not a member of 'arm_compute'
error C3646: unknown override specifier
error C4430: missing type specifier

Fix

This PR updates ARM64-specific code paths to support both GCC/Clang and MSVC by replacing architecture guards of the form:

#ifdef __aarch64__

with

#if defined(__aarch64__) || defined(_M_ARM64)

The changes include:

  1. ActivationLayerInfo.h

    • Enables ARM64-specific members when compiling with MSVC.
    • Introduces an MSVC-compatible float16_t alias using uint16_t as a binary-compatible 2-byte type. This preserves the ActivationLayerInfo layout across Clang and MSVC builds, preventing ABI mismatches.
  2. LUTManager.h

    • Enables ARM64 lookup table definitions for MSVC, ensuring consistent lookup table types across toolchains.
  3. QuantizationInfo.h

    • Applies the ARM64 rounding policy for MSVC builds, matching the existing AArch64 behaviour.
  4. NEReorderLayer.h

    • Makes NEReorderLayer available when compiling with MSVC by enabling the ARM64 code path for _M_ARM64.

These changes ensure that both Clang/GCC and MSVC compile the same ARM64 code paths, providing consistent declarations, structure layouts, and behaviour across toolchains.

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.

1 participant