Skip to content

Add ARM64 NEON support to compute benchmark suite#11

Draft
Copilot wants to merge 5 commits intomainfrom
copilot/migrate-repo-to-arm-yet-again
Draft

Add ARM64 NEON support to compute benchmark suite#11
Copilot wants to merge 5 commits intomainfrom
copilot/migrate-repo-to-arm-yet-again

Conversation

Copy link

Copilot AI commented Feb 4, 2026

Adds ARM64 NEON intrinsics alongside existing x86-64 SSE2 to enable native SIMD acceleration on both architectures.

Implementation

Architecture detection:

#if defined(__x86_64__) || defined(__amd64__)
  #include <immintrin.h>
  #define USE_X86_SIMD 1
  #define USE_ARM_NEON 0
#elif defined(__aarch64__) || defined(__ARM_NEON)
  #include <arm_neon.h>
  #define USE_X86_SIMD 0
  #define USE_ARM_NEON 1
#endif

SIMD operations migrated:

  • Matrix multiplication: _mm_mul_pd/_mm_add_pdvfmaq_f64 (fused multiply-add)
  • String search: _mm_cmpeq_epi8/_mm_movemask_epi8vceqq_u8 + array extraction
  • Memory copy: _mm_loadu_si128/_mm_storeu_si128vld1q_u8/vst1q_u8
  • Hashing: SSE2 byte extraction → NEON 16-byte vectorized processing
  • Polynomial eval: SSE2 horizontal operations → vaddvq_f64

Lane index fix:
Both SSE2 _mm_extract_epi16 and NEON vgetq_lane_u8 require compile-time constant indices. Replaced with:

// Store vector to array, then loop with runtime index
alignas(16) uint8_t bytes[16];
vst1q_u8(bytes, chunk);
for (int j = 0; j < 16; j++) {
    hash = ((hash << 5) + hash) + bytes[j];
}

Modified files:

  • 5 compute modules: matrix_operations, hash_operations, string_search, memory_operations, polynomial_eval
  • main.cpp: architecture banner detection
  • Dockerfile: multi-arch build support
  • README.md: ARM64 documentation

The codebase now compiles and runs natively on both x86-64 (SSE2) and ARM64 (NEON) with appropriate vectorization for each platform.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • esm.ubuntu.com
    • Triggering command: /usr/lib/apt/methods/https /usr/lib/apt/methods/https (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>migrate this repo to arm</issue_title>
<issue_description>use the arm mcp server.</issue_description>

Comments on the Issue (you are @copilot in this section)

Custom agent used: arm-migration-agent
Scan a project and migrate to ARM architecture


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits February 4, 2026 21:50
Co-authored-by: JoeStech <4088382+JoeStech@users.noreply.github.com>
Co-authored-by: JoeStech <4088382+JoeStech@users.noreply.github.com>
Co-authored-by: JoeStech <4088382+JoeStech@users.noreply.github.com>
Co-authored-by: JoeStech <4088382+JoeStech@users.noreply.github.com>
Copilot AI changed the title [WIP] Migrate repository to ARM architecture Add ARM64 NEON support to compute benchmark suite Feb 4, 2026
Copilot AI requested a review from JoeStech February 4, 2026 21:55
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.

migrate this repo to arm

2 participants