[code-reflection] RFR: Add support for other onnx providers (CoreML) [v2]
Ana Maria Mihalceanu
duke at openjdk.org
Mon Oct 20 14:58:10 UTC 2025
On Fri, 17 Oct 2025 15:08:47 GMT, Adam Pocock <duke at openjdk.org> wrote:
>> Ana Maria Mihalceanu has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Update full name
>
> cr-examples/onnx/src/main/java/oracle/code/onnx/provider/CoreMLProvider.java line 42:
>
>> 40: try {
>> 41: int coremlFlag = COREML_FLAG_USE_CPU_AND_GPU();
>> 42: var status = OrtSessionOptionsAppendExecutionProvider_CoreML(sessionOptionsAddress, coremlFlag);
>
> The [ML_PROGRAM flag](https://github.com/microsoft/onnxruntime/blob/main/include/onnxruntime/core/providers/coreml/coreml_provider_factory.h#L32) is probably useful to turn on here as it expands the set of things that ORT can accelerate with CoreML (e.g. I can't get it to do anything to [sd4j](https://github.com/oracle/sd4j) without it, but it does help a bit with it, or at least it did when I tested it in 2023). ML programs are the more modern way of accelerating things with CoreML, but they might need slightly higher OS versions.
That's a very good point. The flag should not be hardcoded so I made it configurable.
-------------
PR Review Comment: https://git.openjdk.org/babylon/pull/618#discussion_r2445262034
More information about the babylon-dev
mailing list