Skip to content

Add Windows ARM64 wheels - #2086

Draft
ssss141414 wants to merge 2 commits into
OpenNMT:masterfrom
ssss141414:windows-arm64-wheels
Draft

Add Windows ARM64 wheels#2086
ssss141414 wants to merge 2 commits into
OpenNMT:masterfrom
ssss141414:windows-arm64-wheels

Conversation

@ssss141414

Copy link
Copy Markdown

Summary

  • build CPU-only Windows ARM64 wheels for CPython 3.12–3.14 on the native windows-11-arm runner
  • recognize Visual Studio's ARM64 processor name and enable the MSVC AArch64 NEON path
  • build the ARM64 package with Ruy and the compiler OpenMP runtime, without x64-only MKL, oneDNN, or CUDA dependencies
  • test the installed ARM64 wheel, including multithreaded INT8 inference and repeated multithreaded float inference/context shutdown
  • document the Windows ARM64 support range and CPU-only limitation

Dependency

This is currently stacked on google/ruy#377. That draft dependency disables Ruy's unsupported cpuinfo integration on Windows ARM64; without it, the final link fails with an unresolved cpuinfo_isa symbol. This PR should remain draft until the Ruy change is accepted and the submodule is repinned to its merged commit.

Ruy context shutdown

A multithreaded float Ruy workload exposed a Windows TLS teardown deadlock when a replica worker exited: all inner Ruy worker functions returned, but their std::thread::join() remained blocked while the outer worker was destroying its thread-local Ruy context. The context is now explicitly destroyed in ReplicaWorker::finalize() via destroy_context(Device::CPU), before the outer worker enters TLS cleanup. The ARM64 workflow recreates and destroys the context three times under a two-minute timeout to guard this path.

Validation

Validated on native Windows ARM64 with CPython 3.13.15, Visual Studio 2022 17.14, MSVC 19.44, and Windows SDK 10.0.26100.0:

  • clean installed-wheel suite: 82 passed, 89 skipped
  • multithreaded INT8 transliteration: passed
  • three consecutive multithreaded float translator create/infer/destroy cycles: passed
  • wheel tag: cp313-cp313-win_arm64
  • _ext.cp313-win_arm64.pyd and ctranslate2.dll: PE machine AA64
  • no non-system third-party DLL dependency; VCOMP140.DLL is supplied by the documented Visual C++ Redistributable

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