-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes a crash on macOS 15 when using CoreML. #22277
Conversation
[detailed] - The issue is seemingly caused by MLModelConfiguration not being correctly initialised, which in turn causes a crash due to compute_device_types_mask not being correctly set. This fixes the problem. - Issue is not reproducible in macOS 14 or lower.
/azp run Big Models, Linux Android Emulator QNN CI Pipeline, Linux CPU CI Pipeline, Linux CPU Minimal Build E2E CI Pipeline, Linux GPU CI Pipeline, Linux GPU TensorRT CI Pipeline |
/azp run Linux OpenVINO CI Pipeline, Linux QNN CI Pipeline, MacOS CI Pipeline, ONNX Runtime Web CI Pipeline, Windows ARM64 QNN CI Pipeline |
/azp run Windows CPU CI Pipeline, Windows GPU CUDA CI Pipeline, Windows GPU DML CI Pipeline, Windows GPU Doc Gen CI Pipeline, Windows GPU TensorRT CI Pipeline, Windows x64 QNN CI Pipeline, onnxruntime-binary-size-checks-ci-pipeline, orttraining-linux-ci-pipeline, orttraining-linux-gpu-ci-pipeline |
Azure Pipelines successfully started running 6 pipeline(s). |
Azure Pipelines successfully started running 5 pipeline(s). |
Azure Pipelines successfully started running 9 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the fix
### Description In macOS 15, apps running with CoreML will crash with an error message like this one: ``` Terminating app due to uncaught exception 'NSGenericException', reason: 'Failed to set compute_device_types_mask E5RT: Cannot provide zero compute device types. (1)' ``` This can be easily seen when building ONNXRuntime from source and running the unit tests. The fix was suggested in [this bug report](https://forums.developer.apple.com/forums/thread/757040). I've ported the change to ONNXRuntime and verified that: * The issue is resolved in macOS 15 (all unit tests pass). * The behaviour is unchanged in macOS 14. ### Motivation and Context This fixes microsoft#22275 allowing apps using ONNXRuntime with CoreML to work normally.
Description
In macOS 15, apps running with CoreML will crash with an error message like this one:
This can be easily seen when building ONNXRuntime from source and running the unit tests. The fix was suggested in this bug report.
I've ported the change to ONNXRuntime and verified that:
Motivation and Context
This fixes #22275 allowing apps using ONNXRuntime with CoreML to work normally.