Skip to content

Commit

Permalink
[onnxruntime] Add debug message for OnnxRuntime (#3217)
Browse files Browse the repository at this point in the history
  • Loading branch information
xyang16 committed May 24, 2024
1 parent d3fd000 commit c85040e
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
import ai.onnxruntime.OrtLoggingLevel;
import ai.onnxruntime.OrtSession;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* The {@code OrtEngine} is an implementation of the {@link Engine} based on the <a
* href="https://microsoft.github.io/onnxruntime/">ONNX Runtime Deep Learning Library</a>.
Expand All @@ -32,6 +35,8 @@
*/
public final class OrtEngine extends Engine {

private static final Logger logger = LoggerFactory.getLogger(OrtEngine.class);

public static final String ENGINE_NAME = "OnnxRuntime";
static final int RANK = 10;

Expand Down Expand Up @@ -110,6 +115,7 @@ public boolean hasCapability(String capability) {
sessionOptions.addCUDA();
return true;
} catch (OrtException e) {
logger.warn("CUDA is not supported OnnxRuntime engine: " + e.getMessage());
return false;
}
}
Expand Down

0 comments on commit c85040e

Please sign in to comment.