@@ -237,9 +237,9 @@ void CPUIDInfo::ArmLinuxInit() {
237237#elif defined(_WIN32) // ^ defined(__linux__)
238238
239239void CPUIDInfo::ArmWindowsInit () {
240- // Read MIDR and ID_AA64ISAR1_EL1 register values from Windows registry
240+ // Read MIDR register values from Windows registry
241241 // There should be one per CPU
242- std::vector<uint64_t > midr_values{}, id_aa64isar1_el1_values{} ;
242+ std::vector<uint64_t > midr_values{};
243243
244244 // TODO!! Don't support multiple processor group yet!!
245245 constexpr int MAX_CORES = 64 ;
@@ -272,17 +272,7 @@ void CPUIDInfo::ArmWindowsInit() {
272272 break ;
273273 }
274274
275- uint64_t id_aa64isar1_el1_value;
276- data_size = sizeof (id_aa64isar1_el1_value);
277-
278- // CP 4031 corresponds to ID_AA64ISAR1_EL1 register
279- if (::RegGetValueA (HKEY_LOCAL_MACHINE, processor_subkey, " CP 4031" , RRF_RT_REG_QWORD,
280- nullptr , &id_aa64isar1_el1_value, &data_size) != ERROR_SUCCESS) {
281- break ;
282- }
283-
284275 midr_values.push_back (midr_value);
285- id_aa64isar1_el1_values.push_back (id_aa64isar1_el1_value);
286276 }
287277
288278 // process midr_values
@@ -308,22 +298,15 @@ void CPUIDInfo::ArmWindowsInit() {
308298 }
309299 }
310300
311- has_arm_neon_i8mm_ = std::all_of (
312- id_aa64isar1_el1_values.begin (), id_aa64isar1_el1_values.end (),
313- [](uint64_t id_aa64isar1_el1_value) {
314- // I8MM, bits [55:52]
315- return ((id_aa64isar1_el1_value >> 52 ) & 0xF ) != 0 ;
316- });
317-
318- has_arm_neon_dot_ = (IsProcessorFeaturePresent (PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE) != 0 );
319-
320301#if defined(CPUINFO_SUPPORTED)
321302 if (pytorch_cpuinfo_init_) {
303+ has_arm_neon_dot_ = cpuinfo_has_arm_neon_dot ();
322304 has_fp16_ = cpuinfo_has_arm_neon_fp16_arith ();
323- // cpuinfo_has_arm_i8mm() doesn't work on Windows yet. See https://github.com/pytorch/cpuinfo/issues/279.
324- // has_arm_neon_i8mm_ = cpuinfo_has_arm_i8mm();
325- has_arm_sve_i8mm_ = cpuinfo_has_arm_sve () && has_arm_neon_i8mm_;
305+ has_arm_neon_i8mm_ = cpuinfo_has_arm_i8mm ();
306+ has_arm_sve_i8mm_ = cpuinfo_has_arm_sve () && cpuinfo_has_arm_i8mm ();
326307 has_arm_neon_bf16_ = cpuinfo_has_arm_neon_bf16 ();
308+ has_arm_sme_ = cpuinfo_has_arm_sme ();
309+ has_arm_sme2_ = cpuinfo_has_arm_sme2 ();
327310 }
328311#endif // defined(CPUINFO_SUPPORTED)
329312}
@@ -397,4 +380,4 @@ CPUIDInfo::CPUIDInfo() {
397380#endif
398381#endif // defined(CPUIDINFO_ARCH_ARM)
399382}
400- } // namespace onnxruntime
383+ } // namespace onnxruntime
0 commit comments