diff --git a/engines/onnxruntime/onnxruntime-engine/README.md b/engines/onnxruntime/onnxruntime-engine/README.md index 1e72ccfda0f..2a441b740c8 100644 --- a/engines/onnxruntime/onnxruntime-engine/README.md +++ b/engines/onnxruntime/onnxruntime-engine/README.md @@ -73,7 +73,7 @@ Maven: com.microsoft.onnxruntime onnxruntime_gpu - 1.8.1 + 1.9.0 runtime ``` @@ -83,5 +83,5 @@ Gradle: implementation("ai.djl.onnxruntime:onnxruntime-engine:0.12.0") { exclude group: "com.microsoft.onnxruntime", module: "onnxruntime" } - implementation "com.microsoft.onnxruntime:onnxruntime_gpu:1.8.1" + implementation "com.microsoft.onnxruntime:onnxruntime_gpu:1.9.0" ``` diff --git a/engines/onnxruntime/onnxruntime-engine/src/main/java/ai/djl/onnxruntime/engine/OrtUtils.java b/engines/onnxruntime/onnxruntime-engine/src/main/java/ai/djl/onnxruntime/engine/OrtUtils.java index 029bd467834..e50c32368ce 100644 --- a/engines/onnxruntime/onnxruntime-engine/src/main/java/ai/djl/onnxruntime/engine/OrtUtils.java +++ b/engines/onnxruntime/onnxruntime-engine/src/main/java/ai/djl/onnxruntime/engine/OrtUtils.java @@ -50,8 +50,9 @@ public static OnnxTensor toTensor( case INT64: return OnnxTensor.createTensor(env, (LongBuffer) data, sh); case INT8: - case UINT8: return OnnxTensor.createTensor(env, (ByteBuffer) data, sh, OnnxJavaType.INT8); + case UINT8: + return OnnxTensor.createTensor(env, (ByteBuffer) data, sh, OnnxJavaType.UINT8); case STRING: throw new UnsupportedOperationException( "Use toTensor(OrtEnvironment env, String[] inputs, Shape shape) instead."); @@ -79,6 +80,8 @@ public static DataType toDataType(OnnxJavaType javaType) { return DataType.FLOAT64; case INT8: return DataType.INT8; + case UINT8: + return DataType.UINT8; case INT32: return DataType.INT32; case INT64: diff --git a/gradle.properties b/gradle.properties index 65ac137069e..0b4a8824323 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,7 +14,7 @@ tensorflow_version=2.4.1 tflite_version=2.4.1 dlr_version=1.6.0 trt_version=8.0.1 -onnxruntime_version=1.8.1 +onnxruntime_version=1.9.0 paddlepaddle_version=2.0.2 sentencepiece_version=0.1.95 fasttext_version=0.9.2