Skip to content

Commit

Permalink
Replace legacy config in stress_tests/ with Properties (openvinotoolk…
Browse files Browse the repository at this point in the history
  • Loading branch information
vurusovs authored Jan 5, 2024
1 parent 7e745c2 commit d7ba44f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tests/stress_tests/common/ie_pipelines/pipelines.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ inference_with_streams(const std::string &model, const std::string &target_devic
unsigned int nireq = nstreams;
auto ie_api_wrapper = create_infer_api_wrapper(api_version);
ie_api_wrapper->load_plugin(target_device);
ie_api_wrapper->set_config(target_device, "THROUGHPUT_STREAMS", nstreams);
ie_api_wrapper->set_config(target_device, ov::AnyMap{ov::num_streams(nstreams)});
ie_api_wrapper->read_network(model);
ie_api_wrapper->load_network(target_device);
try {
Expand Down
5 changes: 2 additions & 3 deletions tests/stress_tests/common/infer_api/infer_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,8 @@ void InferAPI2::change_batch_size(int multiplier, int cur_iter) {
}
}

void InferAPI2::set_config(const std::string &device, const std::string &property, int nstreams) {
config[device + "_" + property] = std::to_string(nstreams);
ie.set_property(device, config);
void InferAPI2::set_config(const std::string &device, const ov::AnyMap& properties) {
ie.set_property(device, properties);
}

unsigned int InferAPI2::get_property(const std::string &name) {
Expand Down
4 changes: 2 additions & 2 deletions tests/stress_tests/common/infer_api/infer_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class InferApiBase {

virtual void set_input_params(const std::string &model) = 0;

virtual void set_config(const std::string &device, const std::string &property, int nstreams) = 0;
virtual void set_config(const std::string &device, const ov::AnyMap &properties) = 0;

virtual unsigned int get_property(const std::string &name) = 0;
};
Expand All @@ -55,7 +55,7 @@ class InferAPI2 : public InferApiBase {

void set_input_params(const std::string &model) override;

void set_config(const std::string &device, const std::string &property, int nstreams) override;
void set_config(const std::string &device, const ov::AnyMap &properties) override;

unsigned int get_property(const std::string &name) override;

Expand Down
2 changes: 1 addition & 1 deletion tests/stress_tests/memcheck_tests/tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ TEST_P(MemCheckTestSuite, inference_with_streams) {
unsigned int nireq = nstreams;
auto ie_api_wrapper = create_infer_api_wrapper(test_params.api_version);
ie_api_wrapper->load_plugin(device);
ie_api_wrapper->set_config(device, "THROUGHPUT_STREAMS", nstreams);
ie_api_wrapper->set_config(device, ov::AnyMap{ov::num_streams(nstreams)});
ie_api_wrapper->read_network(model);
ie_api_wrapper->load_network(device);
try {
Expand Down

0 comments on commit d7ba44f

Please sign in to comment.