Skip to content

Commit d053dc0

Browse files
author
wejoncy
committed
fix bug
1 parent d3d25b9 commit d053dc0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

onnxruntime/core/providers/coreml/coreml_execution_provider.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ CoreMLExecutionProvider::GetCapability(const onnxruntime::GraphViewer& graph_vie
7070
[](unsigned char c) { return !std::isalnum(c); })) {
7171
user_provided_key = std::to_string(std::hash<std::string>{}(user_provided_key));
7272
}
73+
// invalid cache-key
74+
if (user_provided_key.size() == 0){
75+
user_provided_key = std::to_string(model_hash);
76+
}
7377
} else {
7478
// model_hash is a 64-bit hash value of model_path if model_path is not empty,
7579
// otherwise it hashes the graph input names and all the node output names.

0 commit comments

Comments
 (0)