From 3e3d4c3499bad490f0de4ecf4d6c89ed34fa3f8a Mon Sep 17 00:00:00 2001 From: edgchen1 <18449977+edgchen1@users.noreply.github.com> Date: Fri, 21 Nov 2025 10:07:24 -0800 Subject: [PATCH] Add fallback for ARM Windows fp16 detection. --- src/arm/windows/init.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/arm/windows/init.c b/src/arm/windows/init.c index 5c0a5f39..a07fbe46 100644 --- a/src/arm/windows/init.c +++ b/src/arm/windows/init.c @@ -249,6 +249,14 @@ static void set_cpuinfo_isa_fields(void) { // guarantee that, but it holds in practice. cpuinfo_isa.rdm = dotprod; + // PF_ARM_V82_FP16_INSTRUCTIONS_AVAILABLE may not be available in older + // Windows versions. If fp16arith was not detected with + // IsProcessorFeaturePresent(PF_ARM_V82_FP16_INSTRUCTIONS_AVAILABLE), fall + // back to using the value of dotprod. + if (!cpuinfo_isa.fp16arith) { + cpuinfo_isa.fp16arith = dotprod; + } + /* Windows API reports all or nothing for cryptographic instructions. */ const bool crypto = IsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE) != 0; cpuinfo_isa.aes = crypto;