- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have tried to use KEY_CPU_BIND_THREAD to be NO,but doesn't work.
This is my code:
std::map<std::string, std::string> config;
config[PluginConfigParams::KEY_CPU_BIND_THREAD] = PluginConfigParams::NO;
auto executable_network = plugin.LoadNetwork(network, config);
When I run the sample_ssd code,all of the CPU will be used.So I want to use one thread to run one code.
Could someone tell me how to solve it?
Thanks very much!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
THe OpenVINO CPU plugin, MKLDNN, uses OpenMP for threading. This means you can use standard OpenMP controls. For example,
export OMP_NUM_THREADS=1
means that MKLDNN will only run on 1 thread. You can further control behavior with tools like numactl and taskset, as you would with any other CPU application.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
THe OpenVINO CPU plugin, MKLDNN, uses OpenMP for threading. This means you can use standard OpenMP controls. For example,
export OMP_NUM_THREADS=1
means that MKLDNN will only run on 1 thread. You can further control behavior with tools like numactl and taskset, as you would with any other CPU application.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Can we control this from the code, i.e. without setting environment variable? For the record, adding the line "omp_set_num_threads(1);" to the top of classification sample does not change a thing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello all,
I am facing the same issues regarding OpenVino single thread execution. From what I saw, once I load the network 2 threads are launched, but I would like to avoid this behaviour.
Is there any way to do it? omp_set_num_threads() and a set of other variables (KEY_CPU_THREADS_NUM, KEY_CPU_BIND_THREAD) without any success.
Looking forward for your help.
Miguel

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page