Describe the issue
Minimal or extended minimal builds with the Core ML Execution Provider fail because getting the model metadata in coreml_execution_provider.cc on L63 requires Graph::GetModel(), which is only available in full (non-minimal) builds.
This can be fixed by falling back to the existing default behaviour of using model_hash as the user_provided_key in minimal builds rather than reading it from the model metadata. This removes the dependency on Graph::GetModel() in the minimal path.
Urgency
No response
Target platform
iOS
Build script
python tools/ci_build/build.py \
--build_dir build/repro \
--config MinSizeRel \
--ios --use_xcode \
--apple_sysroot iphoneos --osx_arch arm64 --apple_deploy_target 14.0 \
--use_coreml \
--minimal_build extended \
--skip_tests --parallel \
--cmake_extra_defines CMAKE_POLICY_VERSION_MINIMUM=3.5
Error / output
coreml_execution_provider.cc:63:38: error:
no member named 'GetModel' in 'onnxruntime::Graph'
63 | const auto& metadata = main_graph->GetModel().MetaData();
| ~~~~~~~~~~ ^
coreml_execution_provider.cc:115:12: error:
no matching function for call to 'CreateSupportedPartitions'
115 | result = utils::CreateSupportedPartitions(graph_viewer, is_node_supported, on_group_closed,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Visual Studio Version
No response
GCC / Compiler Version
No response
Describe the issue
Minimal or extended minimal builds with the Core ML Execution Provider fail because getting the model metadata in
coreml_execution_provider.ccon L63 requiresGraph::GetModel(), which is only available in full (non-minimal) builds.This can be fixed by falling back to the existing default behaviour of using
model_hashas theuser_provided_keyin minimal builds rather than reading it from the model metadata. This removes the dependency onGraph::GetModel()in the minimal path.Urgency
No response
Target platform
iOS
Build script
Error / output
Visual Studio Version
No response
GCC / Compiler Version
No response