Skip to content

Commit b152b42

Browse files
viricteleprint-me
authored andcommitted
Fix Linux /sys cpu path to guess number of cores (ggml-org#7064)
1 parent 0acb149 commit b152b42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common/common.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ int32_t get_num_physical_cores() {
7676
// enumerate the set of thread siblings, num entries is num cores
7777
std::unordered_set<std::string> siblings;
7878
for (uint32_t cpu=0; cpu < UINT32_MAX; ++cpu) {
79-
std::ifstream thread_siblings("/sys/devices/system/cpu"
79+
std::ifstream thread_siblings("/sys/devices/system/cpu/cpu"
8080
+ std::to_string(cpu) + "/topology/thread_siblings");
8181
if (!thread_siblings.is_open()) {
8282
break; // no more cpus

0 commit comments

Comments
 (0)