From 723b2dd5015c254bb768af00d3effcf4a6058343 Mon Sep 17 00:00:00 2001 From: wejoncy Date: Mon, 16 Dec 2024 17:28:58 +0800 Subject: [PATCH] remove extra check --- onnxruntime/core/providers/coreml/builders/model_builder.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/onnxruntime/core/providers/coreml/builders/model_builder.cc b/onnxruntime/core/providers/coreml/builders/model_builder.cc index db2af3d4dddc1..24487d46bdc04 100644 --- a/onnxruntime/core/providers/coreml/builders/model_builder.cc +++ b/onnxruntime/core/providers/coreml/builders/model_builder.cc @@ -405,8 +405,6 @@ std::string GetModelOutputPath(const CoreMLOptions& coreml_options, // onnxruntime/core/providers/coreml/coreml_execution_provider.cc::gen_metadef_name // int metadef_id = metadef_id_generator_.GenerateId(graph_viewer, model_hash); // MakeString(user_provide_key, "_", COREML, "_", model_hash, "_", metadef_id); - ORT_ENFORCE(std::count(subgraph_name.begin(), subgraph_name.end(), '_') == 3, - "Unexpected graph name format: ", subgraph_name); std::string_view cache_key = std::string_view(subgraph_name).substr(0, subgraph_name.find_first_of("_")); path = MakeString(std::string(coreml_options.ModelCachePath()), "/", cache_key); ORT_THROW_IF_ERROR(Env::Default().CreateFolder(path));