add performance hint to time infer (#8480)
This commit is contained in:
parent
35ba404bcb
commit
9fc64ea726
@ -3,6 +3,7 @@
|
||||
//
|
||||
|
||||
#include <inference_engine.hpp>
|
||||
#include <ie_plugin_config.hpp>
|
||||
#include <iostream>
|
||||
|
||||
#include "common_utils.h"
|
||||
@ -29,6 +30,8 @@ int runPipeline(const std::string &model, const std::string &device) {
|
||||
{
|
||||
SCOPED_TIMER(load_plugin);
|
||||
ie.GetVersions(device);
|
||||
// enables performance hint for specified device
|
||||
ie.SetConfig({{CONFIG_KEY(PERFORMANCE_HINT), CONFIG_VALUE(LATENCY)}}, device);
|
||||
}
|
||||
{
|
||||
SCOPED_TIMER(create_exenetwork);
|
||||
|
@ -3,6 +3,7 @@
|
||||
//
|
||||
|
||||
#include <inference_engine.hpp>
|
||||
#include <ie_plugin_config.hpp>
|
||||
#include <iostream>
|
||||
|
||||
#include "common_utils.h"
|
||||
@ -31,7 +32,8 @@ int runPipeline(const std::string &model, const std::string &device) {
|
||||
}
|
||||
{
|
||||
SCOPED_TIMER(load_network);
|
||||
ie.SetConfig({{"CACHE_DIR", "models_cache"}});
|
||||
// enables cache
|
||||
ie.SetConfig({{CONFIG_KEY(CACHE_DIR), "models_cache"}});
|
||||
exeNetwork = ie.LoadNetwork(model, device);
|
||||
}
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user