Skip to content

Coreml patch#1695

Closed
mario-rei wants to merge 2 commits intotetherto:mainfrom
mario-rei:coreml-patch
Closed

Coreml patch#1695
mario-rei wants to merge 2 commits intotetherto:mainfrom
mario-rei:coreml-patch

Conversation

@mario-rei
Copy link
Copy Markdown
Contributor

🎯 What problem does this PR solve?

  • CoreML EP in ORT 1.24.2 crashes with !model_path.empty() was false when loading ONNX models with external data files (.onnx_data / .onnx.data) on macOS/iOS
  • useGPU: true silently falls back to CPU — users think they're running on GPU but they're not
  • Root cause: TensorProtoWithExternalDataToTensorProto passes the full model file path to ReadExternalDataForTensor, which expects a directory (microsoft/onnxruntime#28005)

📝 How does it solve it?

  • Bumps qvac-registry-vcpkg baseline to pick up onnxruntime port-version 4, which backports the upstream one-line fix (microsoft/onnxruntime#28062): model_path → model_path.parent_path() in tensorprotoutils.cc
  • Bumps @qvac/onnx from 0.14.0 → 0.14.1

🧪 How was it tested?

  • Reproduced the !model_path.empty() error on macOS ARM64 with Parakeet TDT encoder (encoder-model.onnx + 2.3 GB .onnx.data) and TTS Chatterbox models using useGPU: true
  • Upstream fix includes a regression test (CoreMLExecutionProviderTest.ExternalDataInitializer) that creates a model with external data and loads it via CoreML EP from a file path

…th fix

Update vcpkg-registry baseline to pick up onnxruntime port-version 4,
which patches TensorProtoWithExternalDataToTensorProto to use
model_path.parent_path() instead of model_path when resolving external
data files. This fixes CoreML EP crash/silent CPU fallback on macOS
when loading models with .onnx_data sidecars.

Backport of microsoft/onnxruntime#28062.
Upstream issue: microsoft/onnxruntime#28005.

Made-with: Cursor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants