private static OrtSession.SessionOptions createSessionOptions(OnnxEvaluatorOptions vespaOpts, boolean loadCuda) throws OrtException {
        var sessionOpts = new OrtSession.SessionOptions();
        sessionOpts.setOptimizationLevel(OrtSession.SessionOptions.OptLevel.ALL_OPT);
        var execMode = vespaOpts.executionMode() == OnnxEvaluatorOptions.ExecutionMode.PARALLEL ? PARALLEL : SEQUENTIAL;
        sessionOpts.setExecutionMode(execMode);
        sessionOpts.setInterOpNumThreads(execMode == PARALLEL ? vespaOpts.interOpThreads() : 1);
        sessionOpts.setIntraOpNumThreads(vespaOpts.intraOpThreads());
        sessionOpts.setCPUArenaAllocator(false);
        if (loadCuda) sessionOpts.addCUDA(vespaOpts.gpuDeviceNumber());
        return sessionOpts;
    }
Provides the classic embedded ONNX runtime based on the 'onnxruntime' Java library.

@author bjorncs
model-integration/src/main/java/ai/vespa/modelintegration/evaluator/EmbeddedOnnxRuntime.java