Skip to content

Commit

Permalink
add performance hint to time infer (#8480)
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Kuznetsov authored Nov 10, 2021
1 parent 35ba404 commit 9fc64ea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions tests/time_tests/src/timetests/timetest_infer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
//

#include <inference_engine.hpp>
#include <ie_plugin_config.hpp>
#include <iostream>

#include "common_utils.h"
Expand All @@ -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);
Expand Down
4 changes: 3 additions & 1 deletion tests/time_tests/src/timetests/timetest_infer_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
//

#include <inference_engine.hpp>
#include <ie_plugin_config.hpp>
#include <iostream>

#include "common_utils.h"
Expand Down Expand Up @@ -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);
}
{
Expand Down

0 comments on commit 9fc64ea

Please sign in to comment.