@@ -361,44 +361,6 @@ void postprocess_cpu_params(cpu_params& cpuparams, const cpu_params* role_model)
361361 }
362362}
363363
364- bool cpu_mask_set_physical_cores_only (bool (&boolmask)[GGML_MAX_N_THREADS]) {
365- #ifdef _WIN32
366- // Windows implementation would require different approach
367- LOG_WRN (" Physical core detection is not supported on Windows\n " );
368- return false ;
369- #else
370- std::memset (boolmask, false , sizeof (bool ) * GGML_MAX_N_THREADS);
371-
372- // Use the common topology detection logic
373- std::vector<int > physical_cores;
374- if (!cpu_get_physical_cores_topology (physical_cores)) {
375- // Fallback: if we couldn't detect topology, just use all CPUs
376- int num_cpus = std::thread::hardware_concurrency ();
377- for (int cpu = 0 ; cpu < num_cpus && cpu < GGML_MAX_N_THREADS; cpu++) {
378- boolmask[cpu] = true ;
379- }
380- LOG_WRN (" Could not detect CPU topology, using all CPUs\n " );
381- return false ;
382- }
383-
384- // Set the mask for detected physical cores
385- for (int core_id : physical_cores) {
386- if (core_id < GGML_MAX_N_THREADS) {
387- boolmask[core_id] = true ;
388- }
389- }
390-
391- LOG (" Detected %zu physical cores (excluding hyperthreads): " , physical_cores.size ());
392- for (size_t i = 0 ; i < physical_cores.size (); i++) {
393- if (i > 0 ) LOG (" , " );
394- LOG (" %d" , physical_cores[i]);
395- }
396- LOG (" \n " );
397-
398- return true ;
399- #endif
400- }
401-
402364bool cpu_mask_set_physical_cores_with_hyperthreading (bool (&boolmask)[GGML_MAX_N_THREADS]) {
403365#ifdef _WIN32
404366 // Windows implementation would require different approach
0 commit comments