Skip to content

Commit

Permalink
[FIX] Detect like cores by looking at scaling_max_freq instead of (#8370
Browse files Browse the repository at this point in the history
)

cpuinfo_max_freq
  • Loading branch information
tkonolige committed Jun 30, 2021
1 parent b1a946b commit faadb7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/threading_backend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ class ThreadGroup::Impl {
int64_t cur_freq = 0;
#if defined(__linux__) || defined(__ANDROID__)
std::ostringstream filepath;
filepath << "/sys/devices/system/cpu/cpu" << i << "/cpufreq/cpuinfo_max_freq";
filepath << "/sys/devices/system/cpu/cpu" << i << "/cpufreq/scaling_max_freq";
std::ifstream ifs(filepath.str());
if (!ifs.fail()) {
if (!(ifs >> cur_freq)) {
Expand Down

0 comments on commit faadb7d

Please sign in to comment.