/* * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. * Licensed under the MIT License. */ /** * A Java interface to the ONNX Runtime. * *
Provides access to the same execution backends as the C library. Non-representable types in * Java (such as fp16) are converted into the nearest Java primitive type when accessed through this * API. * *
There are two shared libraries required: onnxruntime and onnxruntime4j_jni
* . The loader is in {@link ai.onnxruntime.OnnxRuntime} and the logic is in this order:
*
*
* onnxruntime.native.LIB_NAME.skip with a value of true. This means the
* user has decided to load the library by some other means.
* onnxruntime.native.path. This uses {@link java.lang.System#load}.
* onnxruntime.native.LIB_NAME.path. This uses {@link
* java.lang.System#load}.
* java.library.path property is used to specify the
* location of native libraries.
* Note that CUDA, ROCM, DNNL, OpenVINO and TensorRT are all "shared library execution providers" * and must be stored either in the directory containing the ONNX Runtime core native library, or as * a classpath resource. This is because these providers are loaded by the ONNX Runtime native * library itself and the Java API cannot control the loading location. */ package ai.onnxruntime;