Skip to content

Commit

Permalink
get_physical_cpu_count api family (#4302)
Browse files Browse the repository at this point in the history
* get_physical_cpu_count api family

* set default to physical big cpu

* always treat smt core as big core

* is_smt_cpu

* get max freq mhz on windows

* windows thread affinity
  • Loading branch information
nihui committed Oct 31, 2022
1 parent 9c6f110 commit b853b3d
Show file tree
Hide file tree
Showing 4 changed files with 359 additions and 6 deletions.
4 changes: 2 additions & 2 deletions benchmark/benchncnn.cpp
Expand Up @@ -161,8 +161,8 @@ void benchmark(const char* comment, const ncnn::Mat& _in, const ncnn::Option& op
int main(int argc, char** argv)
{
int loop_count = 4;
int num_threads = ncnn::get_cpu_count();
int powersave = 0;
int num_threads = ncnn::get_physical_big_cpu_count();
int powersave = 2;
int gpu_device = -1;
int cooling_down = 1;

Expand Down

0 comments on commit b853b3d

Please sign in to comment.