krickert opened a new issue, #1483:
URL: https://github.com/apache/opennlp/issues/1483
`opennlp-dl-gpu` replaces the CPU `onnxruntime` artifact with
`onnxruntime_gpu`.
The ONNX library in `1.30.0` ships native libraries for `linux-x64` and
`win-x64` only. On macOS and on aarch64 Linux the first ONNX Runtime call fails
with an `UnsatisfiedLinkError` ("no onnxruntime in java.library.path"), whether
or not a GPU was requested. The message gives the user no hint that the fix is
to depend on `opennlp-dl`, whose CPU artifact does cover those platforms.
Two changes:
1. Where `AbstractDL` creates the ONNX Runtime environment, catch that
`UnsatisfiedLinkError` and rethrow it with a message that names the OS and
architecture and says that `opennlp-dl-gpu` has no native library for it and
that `opennlp-dl` provides CPU inference there. The failure stays loud: a GPU
request must never fall back to the CPU, and this change does not add a
fallback. One test fakes the error.
2. A platform section in the manual's machine learning chapter: a table of
the operating systems and CPU architectures each of `opennlp-dl` and
`opennlp-dl-gpu` supports for the bundled ONNX Runtime version, which
dependency to choose, and the known gotchas. I've sketched out how ARM and
other accelerators are planned as provider `addons`, not in `opennlp-dl-gpu`.
(tested halio 10H, intel NPU, apple metal, and intel openvino so far)
Depends on #1462 being merged and it is not a blocker for 3.0.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]