[code-reflection] RFR: Add support for other onnx providers (CoreML) [v4]

Adam Pocock duke at openjdk.org
Mon Oct 20 15:27:38 UTC 2025


On Mon, 20 Oct 2025 14:58:06 GMT, Ana Maria Mihalceanu <duke at openjdk.org> wrote:

>> This PR contains a series of changes meant to integrate other ONNX providers.
>> 
>> * It contains generated Java bindings for CoreML provider: `oracle.code.onnx.foreign.coreml_provider_factory_h`
>> * Configurations of providers are present in `oracle.code.onnx.provider`.
>> * Provider configuration should occur via `SessionOptions` on inference session, prior to any work done by the native library. Hence why `OnnxRuntime` has an `execute` that gets `SessionOptions` too.
>> * There is a small UI example that use [Facial Emotion Recognition](https://github.com/onnx/models/tree/main/validated/vision/body_analysis/emotion_ferplus) model on how use the CoreML provider under `test` directory, inside `oracle.code.onnx.fer`.
>> * The `README.md` file contains instructions on how to run the example and how to regenerate the bindings for the provider. Instructions and scripts to regenerate the bindings were provided for macOS users only since CoreML is an Apple software.
>> 
>> Work done in this PR is done together with [Lize Raes](https://github.com/LizeRaes).
>
> Ana Maria Mihalceanu has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Remove tabs and convert to whitespaces only.

cr-examples/onnx/src/main/java/oracle/code/onnx/provider/CoreMLProvider.java line 38:

> 36:     private int flag;
> 37: 
> 38:     public CoreMLProvider(int flag) {

This is a small thing, but I'd probably call this `flags` as it's really a set of bits, so you can or the flags together to get a set of things to turn on.

-------------

PR Review Comment: https://git.openjdk.org/babylon/pull/618#discussion_r2445349066


More information about the babylon-dev mailing list