Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions onnxruntime/core/providers/openvino/onnx_ctx_model_helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,14 @@ std::shared_ptr<SharedContext> EPCtxHandler::Initialize(const std::vector<IExecu
ORT_ENFORCE(!(has_embed_nodes && !has_main_context),
"Expected at least one main context node when embedded EP context nodes are present.");

// No ep context nodes found - create a shared context that can hold native blobs or shared weights.
// No ep context nodes found - create a shared context that can hold native blobs or shared weights.
if (!shared_context) {
shared_context = shared_context_manager_->GetOrCreateActiveSharedContext(session_context.GetOutputBinPath());
if (session_context.so_context_enable && session_context.so_share_ep_contexts) {
// We're creating a shared ep context model get or create the active context.
shared_context = shared_context_manager_->GetOrCreateActiveSharedContext(session_context.GetOutputBinPath());
} else {
shared_context = shared_context_manager_->GetOrCreateSharedContext(session_context.GetOutputBinPath());
}
}

return shared_context;
Expand Down
Loading