@@ -57,7 +57,7 @@ BasicBackend::BasicBackend(const ONNX_NAMESPACE::ModelProto& model_proto,
5757 LOGS_DEFAULT (INFO) << log_tag << " Loaded model to the plugin" ;
5858 } else {
5959#if defined(OPENVINO_2023_0)
60- if (!subgraph_context_.has_dynamic_input_shape && dev_prec!= " CPU_FP16" ) {
60+ if (!subgraph_context_.has_dynamic_input_shape && dev_prec != " CPU_FP16" ) {
6161 const std::string model = model_proto.SerializeAsString ();
6262 exe_network_ = global_context_.ie_core .LoadNetwork (model, hw_target, device_config, subgraph_context_.subgraph_name );
6363 LOGS_DEFAULT (INFO) << log_tag << " Loaded model to the plugin" ;
@@ -72,8 +72,8 @@ BasicBackend::BasicBackend(const ONNX_NAMESPACE::ModelProto& model_proto,
7272 LOGS_DEFAULT (INFO) << log_tag << " Loaded model to the plugin" ;
7373#endif
7474#else
75- #if defined(OPENVINO_2023_0)
76- if (!subgraph_context_.has_dynamic_input_shape && dev_prec!= " CPU_FP16" ) {
75+ #if defined(OPENVINO_2023_0) || (OPENVINO_2023_1)
76+ if (!subgraph_context_.has_dynamic_input_shape && dev_prec != " CPU_FP16" ) {
7777 const std::string model = model_proto.SerializeAsString ();
7878 exe_network_ = global_context_.ie_core .LoadNetwork (model, hw_target, device_config, subgraph_context_.subgraph_name );
7979 LOGS_DEFAULT (INFO) << log_tag << " Loaded model to the plugin" ;
@@ -124,18 +124,18 @@ BasicBackend::BasicBackend(const ONNX_NAMESPACE::ModelProto& model_proto,
124124 void BasicBackend::PopulateConfigValue (ov::AnyMap & device_config) {
125125 device_config = {};
126126 // Set inference precision based on device precision for OV backend
127- if (global_context_.precision_str .find (" FP16" )!= std::string::npos && global_context_.device_type == " GPU" ){
127+ if (global_context_.precision_str .find (" FP16" ) != std::string::npos && global_context_.device_type == " GPU" ) {
128128 device_config.emplace (ov::hint::inference_precision (" f16" ));
129129 }
130- if (global_context_.precision_str .find (" FP32" )!= std::string::npos){
130+ if (global_context_.precision_str .find (" FP32" ) != std::string::npos) {
131131 device_config.emplace (ov::hint::inference_precision (" f32" ));
132132 }
133133#ifndef NDEBUG
134134 if (openvino_ep::backend_utils::IsDebugEnabled ()) {
135135 device_config.emplace (ov::enable_profiling (true ));
136136 }
137137#endif
138- #if defined(OPENVINO_2023_0)
138+ #if defined(OPENVINO_2023_0) || (OPENVINO_2023_1)
139139 if (global_context_.device_type .find (" VPUX" ) != std::string::npos) {
140140 std::pair<std::string, ov::Any> device_property;
141141 device_property = std::make_pair (" VPUX_COMPILER_TYPE" , " MLIR" );
@@ -160,15 +160,15 @@ BasicBackend::BasicBackend(const ONNX_NAMESPACE::ModelProto& model_proto,
160160 }
161161 }
162162
163- void BasicBackend::EnableGPUThrottling (ov::AnyMap& device_config) {
164- if (global_context_.enable_opencl_throttling == true && global_context_.device_type .find (" GPU" ) != std::string::npos) {
165- LOGS_DEFAULT (INFO) << log_tag << " Enabled OpenCL queue throttling for GPU device" ;
166- std::pair<std::string, ov::Any> device_property;
167- device_property = std::make_pair (" PLUGIN_THROTTLE" , " 1" );
168- device_config.emplace (ov::device::properties (" GPU_CONFIG_KEY" , device_property));
169- // device_config[GPU_CONFIG_KEY(PLUGIN_THROTTLE)] = "1";
163+ void BasicBackend::EnableGPUThrottling (ov::AnyMap & device_config) {
164+ if (global_context_.enable_opencl_throttling == true && global_context_.device_type .find (" GPU" ) != std::string::npos) {
165+ LOGS_DEFAULT (INFO) << log_tag << " Enabled OpenCL queue throttling for GPU device" ;
166+ std::pair<std::string, ov::Any> device_property;
167+ device_property = std::make_pair (" PLUGIN_THROTTLE" , " 1" );
168+ device_config.emplace (ov::device::properties (" GPU_CONFIG_KEY" , device_property));
169+ // device_config[GPU_CONFIG_KEY(PLUGIN_THROTTLE)] = "1";
170+ }
170171 }
171- }
172172
173173 // Starts an asynchronous inference request for data in slice indexed by batch_slice_idx on
174174 // an Infer Request indexed by infer_req_idx
0 commit comments