Skip to content

Commit

Permalink
Restrict OV load_model API only when onnx model path is available
Browse files Browse the repository at this point in the history
  • Loading branch information
preetha-intel committed Feb 12, 2024
1 parent b04fec7 commit adff7a8
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ BasicBackend::BasicBackend(const ONNX_NAMESPACE::ModelProto& model_proto,
LOGS_DEFAULT(INFO) << log_tag << "Loaded model to the plugin";
}
#else
if (!subgraph_context_.has_dynamic_input_shape && dev_prec != "CPU_FP16") {
if (!subgraph_context_.has_dynamic_input_shape &&
global_context_.onnx_model_path_name != "" &&
dev_prec != "CPU_FP16") {
exe_network_ = global_context_.ie_core.LoadNetwork(global_context_.onnx_model_path_name,
hw_target,
device_config,
Expand Down

0 comments on commit adff7a8

Please sign in to comment.