cpuinfo
cpuinfo copied to clipboard
Add fallback for ARM Windows fp16 detection.
Background: On a Windows ARM system, I observed that cpuinfo_has_arm_fp16_arith() started to return false after upgrading to a more recent cpuinfo version.
In #333, the initialization of cpuinfo_isa.fp16arith was updated to use IsProcessorFeaturePresent(PF_ARM_V82_FP16_INSTRUCTIONS_AVAILABLE). I suspect that this is not supported on older Windows versions.
This change adds a fallback path to set cpuinfo_isa.fp16arith the old way.
https://github.com/pytorch/cpuinfo/blob/d3a86a813e2bb49d1eb5841ec12e2b135867ab98/src/arm/windows/init.c#L205-L208