diff --git a/onnxruntime/core/providers/coreml/coreml_execution_provider.cc b/onnxruntime/core/providers/coreml/coreml_execution_provider.cc index 5cb2c18af040f..835a70e8ef1e3 100644 --- a/onnxruntime/core/providers/coreml/coreml_execution_provider.cc +++ b/onnxruntime/core/providers/coreml/coreml_execution_provider.cc @@ -59,8 +59,8 @@ CoreMLExecutionProvider::GetCapability(const onnxruntime::GraphViewer& graph_vie HashValue model_hash; int metadef_id = metadef_id_generator_.GenerateId(graph_viewer, model_hash); std::string user_provide_hash; - if (graph_viewer.GetGraph().GetModel().MetaData().count("model_hash") > 0) { - user_provide_hash = graph_viewer.GetGraph().GetModel().MetaData().at("model_hash"); + if (graph_viewer.GetGraph().GetModel().MetaData().count("CACHE_KEY") > 0) { + user_provide_hash = graph_viewer.GetGraph().GetModel().MetaData().at("CACHE_KEY"); } return MakeString(user_provide_hash, "_", COREML, "_", model_hash, "_", metadef_id); };