Fwd: Fw: [EXTERNAL] Fwd: Numba: Discussion on Fixing Large Code Model Relocation Issues on Windows ARM64
---------- Forwarded message --------- From: "Nathalie Chan King Choy (Windows on Arm)" <woa@hub.corecollective.dev> Date: Friday, 5 June 2026 at 10:45:53 UTC-7 Our partner is working on enabling Numba and is currently blocked by LLVM-related issues. I know we have experts here in this area and would appreciate guidance to help unblock the work. ---------- Forwarded message --------- From: "Nathalie Chan King Choy (Windows on Arm)" <woa@hub.corecollective.dev> Date: Thu, Jun 4, 2026, 11:09 PM Subject: Fwd: Fw: [CoreCollective WoA] [EXTERNAL] Fwd: Numba: Discussion on Fixing Large Code Model Relocation Issues on Windows ARM64 Windows ARM64 To: Gleb Khmyznikov Hi Gleb, I am currently working on fixing test failures observed while running the Numba test suite on Windows ARM64. I am seeing three failures in the UnicodeSets test cases, all of which result in a hard crash with the error: "invalid fixup for add (uimm12) instruction." After debugging the issue, I found that llvmlite determines the JIT code model based on the size of a void pointer. Since Windows ARM64 is a 64-bit platform, the JIT defaults to the Large code model. However, according to LLVM's implementation, JIT compilation on Windows ARM64 should use the Small code model. The Large code model generates long branches using four MOV instructions, and the Windows ARM64 relocation model does not support the relocations required for these sequences. As a result, JIT compilation fails with the "invalid fixup" errors mentioned above. To address this issue, I modified the code model selection logic so that Windows ARM64 uses the Small code model, aligning it with LLVM's behavior. With this change, the affected UnicodeSets test cases pass successfully, and we have opened a PR containing the fix. However, the maintainers have raised concerns about adopting the Small code model on Windows ARM64. Their concern is that the Small model could potentially lead to relocation overflows in certain real-world workloads where code or data is placed beyond the addressing range assumed by the Small model. I would appreciate any guidance on how Large code model support is typically handled for JIT compilation on Windows ARM64. References: 1. Issue tracker for Numba Unicode test failures: https://github.com/numba/ numba/issues/10619 2. PR for fixing Numba Unicode test failures: https://github.com/numba/ llvmlite/pull/1427 3. LLVM code model selection logic for AArch64: https://github.com/llvm/llvm-project/blob/main/llvm/lib/Target/AArch64/ AArch64TargetMachine.cpp#L330 4. fixup_aarch64_movw support for COFF AArch64: https://discourse.llvm.org/t/fixup-aarch64-movw-support- for-coff-aarch64/53243 Thanks, Mugundan
participants (1)
-
Nathalie Chan King Choy (Windows on Arm)