Keep the model metadata on the generated EP context model (#22825)

### Description
Keep the model metadata on the generated EP context model
This commit is contained in:
Hector Li 2024-11-13 11:52:21 -08:00 committed by GitHub
parent fa4cbcd36b
commit a9b62fa8da
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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());