File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
onnxruntime/core/providers/openvino Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,12 @@ BackendManager::BackendManager(SessionContext& session_context,
90
90
" [OpenVINO-EP] Bounded dynamic model execution using provider option reshape_input is not supported for OVEP EPContext model" ;
91
91
ORT_THROW (exception_str);
92
92
}
93
- model_stream = ep_ctx_handle_.GetModelBlobStream (session_context_.so_context_file_path , subgraph);
93
+ if (subgraph_context_.is_ep_ctx_ovir_encapsulated ) {
94
+ model_stream = ep_ctx_handle_.GetModelBlobStream (session_context_.onnx_model_path_name .replace_extension (" xml" ).string (), subgraph);
95
+ } else {
96
+ model_stream = ep_ctx_handle_.GetModelBlobStream (session_context_.so_context_file_path , subgraph);
97
+ }
98
+
94
99
} else {
95
100
model_proto = GetModelProtoFromFusedNode (fused_node, subgraph, logger);
96
101
}
@@ -236,7 +241,9 @@ Status BackendManager::ExportCompiledBlobAsEPCtxNode(const onnxruntime::GraphVie
236
241
std::ofstream blob_file (blob_filename,
237
242
std::ios::out | std::ios::trunc | std::ios::binary);
238
243
if (!blob_file) {
239
- ORT_THROW (" Unable to open file for epctx model dump." );
244
+ std::ostringstream err_msg;
245
+ err_msg << " Unable to open file for epctx model dump: " << blob_filename;
246
+ ORT_THROW (err_msg.str ());
240
247
}
241
248
compiled_model.export_model (blob_file);
242
249
model_blob_str = blob_filename.filename ().string ();
You can’t perform that action at this time.
0 commit comments