diff --git a/modules/java_api/build.gradle b/modules/java_api/build.gradle index 2520ac234..0d7c38017 100644 --- a/modules/java_api/build.gradle +++ b/modules/java_api/build.gradle @@ -11,7 +11,7 @@ println 'CPU architecture: ' + arch def nativesCPP; -def openvinoVersion = "2024.2" +def openvinoVersion = "2025.1" def native_resources = [] def tbb_dir = System.getenv('TBB_DIR') diff --git a/modules/java_api/src/main/cpp/jni_common.hpp b/modules/java_api/src/main/cpp/jni_common.hpp index cad269ed6..00c2f7eb4 100644 --- a/modules/java_api/src/main/cpp/jni_common.hpp +++ b/modules/java_api/src/main/cpp/jni_common.hpp @@ -236,7 +236,6 @@ static const ov::element::Type_t& get_ov_type(int type) { static const std::vector java_type_to_ov_type { - ov::element::Type_t::dynamic, ov::element::Type_t::dynamic, ov::element::Type_t::boolean, ov::element::Type_t::bf16, @@ -261,7 +260,8 @@ static const ov::element::Type_t& get_ov_type(int type) ov::element::Type_t::f8e4m3, ov::element::Type_t::f8e5m2, ov::element::Type_t::string, - ov::element::Type_t::f4e2m1 + ov::element::Type_t::f4e2m1, + ov::element::Type_t::f8e8m0 }; return java_type_to_ov_type.at(type); diff --git a/modules/java_api/src/main/java/org/intel/openvino/ElementType.java b/modules/java_api/src/main/java/org/intel/openvino/ElementType.java index e8c528ef1..cc0776ec9 100644 --- a/modules/java_api/src/main/java/org/intel/openvino/ElementType.java +++ b/modules/java_api/src/main/java/org/intel/openvino/ElementType.java @@ -7,32 +7,33 @@ import java.util.Map; public enum ElementType { - undefined(0), - dynamic(1), - bool(2), - bf16(3), - f16(4), - f32(5), - f64(6), - i4(7), - i8(8), - i16(9), - i32(10), - i64(11), - u1(12), - u2(13), - u3(14), - u4(15), - u6(16), - u8(17), - u16(18), - u32(19), - u64(20), - nf4(21), - f8e4m3(22), - f8e5m2(23), - string(24), - f4e2m1(25); + dynamic(0), + undefined(dynamic.value), + bool(1), + bf16(2), + f16(3), + f32(4), + f64(5), + i4(6), + i8(7), + i16(8), + i32(9), + i64(10), + u1(11), + u2(12), + u3(13), + u4(14), + u6(15), + u8(16), + u16(17), + u32(18), + u64(19), + nf4(20), + f8e4m3(21), + f8e5m2(22), + string(23), + f4e2m1(24), + f8e8m0(25); private int value; private static Map map = new HashMap(); diff --git a/modules/java_api/src/test/java/org/intel/openvino/CompiledModelTests.java b/modules/java_api/src/test/java/org/intel/openvino/CompiledModelTests.java index b85e9b1c9..ce978ac4d 100644 --- a/modules/java_api/src/test/java/org/intel/openvino/CompiledModelTests.java +++ b/modules/java_api/src/test/java/org/intel/openvino/CompiledModelTests.java @@ -23,7 +23,7 @@ public void testInputs() { List inputs = model.inputs(); assertEquals("data", inputs.get(0).get_any_name()); - assertEquals(ElementType.f16, inputs.get(0).get_element_type()); + assertEquals(ElementType.f32, inputs.get(0).get_element_type()); int[] shape = new int[] {1, 3, 32, 32}; assertArrayEquals("Shape", shape, inputs.get(0).get_shape()); @@ -34,7 +34,7 @@ public void testOutputs() { List outputs = model.outputs(); assertEquals("fc_out", outputs.get(0).get_any_name()); - assertEquals(ElementType.f16, outputs.get(0).get_element_type()); + assertEquals(ElementType.f32, outputs.get(0).get_element_type()); int[] shape = new int[] {1, 10}; assertArrayEquals("Shape", shape, outputs.get(0).get_shape()); diff --git a/modules/java_api/src/test/java/org/intel/openvino/ModelTests.java b/modules/java_api/src/test/java/org/intel/openvino/ModelTests.java index afd46f5f3..bb0ce5be7 100644 --- a/modules/java_api/src/test/java/org/intel/openvino/ModelTests.java +++ b/modules/java_api/src/test/java/org/intel/openvino/ModelTests.java @@ -34,7 +34,7 @@ public void testOutputName() { @Test public void testOutputType() { Output output = net.output(); - assertEquals("Output element type", ElementType.f16, output.get_element_type()); + assertEquals("Output element type", ElementType.f32, output.get_element_type()); } @Test