Skip to content

Commit

Permalink
Fix a build error that happens when CPUINFO is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
snnn committed Oct 31, 2023
1 parent 99b0f62 commit 082c4ce
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions onnxruntime/core/common/cpuid_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,6 @@ void CPUIDInfo::ArmLinuxInit() {
LOGS_DEFAULT(WARNING) << "Failed to init pytorch cpuinfo library, may cause CPU EP performance degradation due to undetected CPU features.";
return;
}
#else
pytorch_cpuinfo_init_ = false;
#endif

if (pytorch_cpuinfo_init_) {
is_hybrid_ = cpuinfo_get_uarchs_count() > 1;
has_arm_neon_dot_ = cpuinfo_has_arm_neon_dot();
Expand All @@ -163,7 +159,9 @@ void CPUIDInfo::ArmLinuxInit() {
is_armv8_narrow_ld_[coreid] = true;
}
}
} else {
} else
#endif
{
has_arm_neon_dot_ = ((getauxval(AT_HWCAP) & HWCAP_ASIMDDP) != 0);
has_fp16_ |= has_arm_neon_dot_;
}
Expand Down

0 comments on commit 082c4ce

Please sign in to comment.