From a9b62fa8da447300c695eb7e0c7ac8e6adeb42a1 Mon Sep 17 00:00:00 2001 From: Hector Li Date: Wed, 13 Nov 2024 11:52:21 -0800 Subject: [PATCH] Keep the model metadata on the generated EP context model (#22825) ### Description Keep the model metadata on the generated EP context model --- onnxruntime/core/framework/graph_partitioner.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onnxruntime/core/framework/graph_partitioner.cc b/onnxruntime/core/framework/graph_partitioner.cc index 4f745b74ab..6174122cf3 100644 --- a/onnxruntime/core/framework/graph_partitioner.cc +++ b/onnxruntime/core/framework/graph_partitioner.cc @@ -674,7 +674,7 @@ static Status CreateEpContextModel(const ExecutionProviders& execution_providers context_cache_path, "' exist already."); } - Model ep_context_model(graph.Name(), false, ModelMetaData(), PathString(), IOnnxRuntimeOpSchemaRegistryList(), + Model ep_context_model(graph.Name(), false, graph.GetModel().MetaData(), PathString(), IOnnxRuntimeOpSchemaRegistryList(), graph.DomainToVersionMap(), {}, logger); auto& ep_graph = ep_context_model.MainGraph(); ep_graph.SetDescription(graph.Description());