Replace legacy config in stress_tests/ with Properties (#21988)
This commit is contained in:
parent
7e745c28e4
commit
d7ba44f8c3
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ public:
|
|||
|
||||
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;
|
||||
};
|
||||
|
|
@ -55,7 +55,7 @@ public:
|
|||
|
||||
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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue