The GitHub Actions job "Java CI" on 
opennlp.git/OPENNLP-1982-sentence-vectors-inference-options has failed.
Run started by GitHub user krickert (triggered by krickert).

Head commit for run:
576206d29415eb777a253b6125ab03f7566c7dcb / Kristian Rickert 
<[email protected]>
GH-1389, GH-1390: Let SentenceVectorsDL run on a GPU and fix the first CUDA 
request in a fresh JVM

SentenceVectorsDL always created default session options, so it ran on
the CPU even with opennlp-dl-gpu. A new constructor takes
InferenceOptions, like NameFinderDL and DocumentCategorizerDL, and uses
the GPU settings and the lower case setting from them; a lower case
setting in the options takes precedence over the lowerCase argument. The
existing constructors keep their behavior.

AbstractDL.sessionOptions added the CUDA provider before any
OrtEnvironment existed. Loading the provider needs ONNX Runtime's default
logger, which only exists once an environment does, so the first GPU
request in a fresh JVM failed with "Attempt to use DefaultLogger but none
has been registered". The environment is now created first. This affects
NameFinderDL and DocumentCategorizerDL as well.

A test runs the first CUDA request in a child JVM. Other tests request a
device id no machine has and check that ONNX Runtime rejects it for
SentenceVectorsDL, NameFinderDL and DocumentCategorizerDL, and compare
vectors on CUDA device 0 with the CPU session (skipped without a CUDA
provider or device). The opennlp-dl-gpu test classpath no longer has the
CPU onnxruntime next to onnxruntime_gpu. The machine learning chapter
documents the GPU setup.

Fixes #1389
Fixes #1390

Co-authored-by: Richard Zowalla <[email protected]>
Co-authored-by: Martin Wiesner <[email protected]>
Signed-off-by: Kristian Rickert <[email protected]>

Report URL: https://github.com/apache/opennlp/actions/runs/38104092851

With regards,
GitHub Actions via GitBox

Reply via email to