Skip to content

Coreml patch#1696

Merged
GustavoA1604 merged 5 commits into
mainfrom
temp_coreml-patch
Apr 27, 2026
Merged

Coreml patch#1696
GustavoA1604 merged 5 commits into
mainfrom
temp_coreml-patch

Conversation

@mario-rei
Copy link
Copy Markdown
Contributor

@mario-rei mario-rei commented Apr 21, 2026

🎯 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?

Pins onnxruntime dependency to >= 1.24.2#5 in vcpkg.json, which includes the backported 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
Pins workflow action refs to commit SHA to fix sparse-checkout issue in on-pr-qvac-lib-infer-onnx.yml
🧪 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
Verified locally that onnxruntime 1.24.2#5 builds and patches apply cleanly on arm64-osx
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

@mario-rei mario-rei requested review from a team as code owners April 21, 2026 22:09
Comment thread packages/qvac-lib-infer-onnx/vcpkg-configuration.json Outdated
Comment thread .github/workflows/on-pr-qvac-lib-infer-onnx.yml
Copy link
Copy Markdown
Contributor

@ogad-tether ogad-tether left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CoreML external-data patch direction looks good, but I want a couple of follow-ups before approving:

  1. Please make the scope of the registry baseline bump explicit. The new baseline is several commits ahead of the old one, so this PR currently brings in more than just the ONNX Runtime CoreML fix.
  2. Please confirm CI after the workflow fix is actually exercised from the base branch, because the current failing sanity-checks run still reflects the old pull_request_target workflow behavior.

Once those are addressed or clarified, I’m happy to take another look.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 23, 2026

Tier-based Approval Status

**PR Tier:** TIER1

**Current Status:** ✅ APPROVED

**Requirements:**
- 1 Team Member approval ✅ (2/1)
- 1 Team Lead OR Management approval ✅ (1/1)



---
*This comment is automatically updated when reviews change.*

Comment thread packages/qvac-lib-infer-onnx/vcpkg-configuration.json Outdated
reichert-dev and others added 2 commits April 24, 2026 16:24
…th fix

Patched ONNX Runtime 1.24.2 CoreML EP to fix !model_path.empty()
crash when loading models with external data files on macOS/iOS.
Backport of microsoft/onnxruntime#28062.

- Pin onnxruntime deps to >= 1.24.2#5 (registry port-version with fix)
- Bump package version to 0.14.1
- Pin workflow action refs to commit SHA (sparse-checkout fix)

Made-with: Cursor
@mario-rei
Copy link
Copy Markdown
Contributor Author

mario-rei commented Apr 24, 2026

@ogad-tether
Copy link
Copy Markdown
Contributor

Non-blocking note: the PR description still says this change bumps the registry baseline and picks up onnxruntime port-version 4. The final diff now pins onnxruntime directly in vcpkg.json to 1.24.2#5 and leaves vcpkg-configuration.json unchanged, so it would be good to update the description to match the shipped implementation.

Copy link
Copy Markdown
Contributor

@ogad-tether ogad-tether left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I re-checked the current diff and do not see any blocking issues in the package change itself.

The earlier baseline-scope concern appears resolved: this branch no longer changes vcpkg-configuration.json, and CI is actually resolving onnxruntime 1.24.2#5 from the manifest pin. I verified that in the successful prebuild logs, and the package/prebuild matrix is green across Linux, macOS, Windows, iOS, and Android.

The only remaining red signal is sanity-checks, and that failure is in the YAML-formatting step rather than in dependency resolution or the ONNX package build/test flow.

@kinsta
Copy link
Copy Markdown

kinsta Bot commented Apr 27, 2026

Preview deployments for qvac-docs-staging ⚡️

Status Branch preview Commit preview
✅ Ready Visit preview Visit preview

Commit: 4e5dab7664fd010a6ed4024a2174282f75439256

Deployment ID: e6df2780-6702-47a2-be67-170c075b058a

Static site name: qvac-docs-staging-fazwv

@GustavoA1604
Copy link
Copy Markdown
Contributor

/review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants