diff --git a/gradle.properties b/gradle.properties index 537fd47..26c8835 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ -version=1.26.0-2-SNAPSHOT +version=1.27.0-1-SNAPSHOT org.gradle.parallel=true org.gradle.caching=true diff --git a/src/main/java/com/jyuzawa/onnxruntime_extern/OrtApi.java b/src/main/java/com/jyuzawa/onnxruntime_extern/OrtApi.java index 7cfd551..4215960 100644 --- a/src/main/java/com/jyuzawa/onnxruntime_extern/OrtApi.java +++ b/src/main/java/com/jyuzawa/onnxruntime_extern/OrtApi.java @@ -435,6 +435,9 @@ * OrtStatusPtr (*RunOptionsDisableProfiling)(OrtRunOptions *); * OrtStatusPtr (*KernelInfoGetAttributeArray_string)(const OrtKernelInfo *, const char *, OrtAllocator *, char ***, size_t *); * OrtStatusPtr (*SetPerSessionThreadPoolCallbacks)(OrtEnv *, const OrtThreadPoolCallbacksConfig *); + * OrtStatusPtr (*GetMemPatternEnabled)(const OrtSessionOptions *, int *); + * OrtStatusPtr (*GetSessionExecutionMode)(const OrtSessionOptions *, ExecutionMode *); + * OrtStatusPtr (*SessionReleaseCapturedGraph)(OrtSession *, int); * } * } */ @@ -863,7 +866,10 @@ public class OrtApi { onnxruntime_all_h.C_POINTER.withName("RunOptionsEnableProfiling"), onnxruntime_all_h.C_POINTER.withName("RunOptionsDisableProfiling"), onnxruntime_all_h.C_POINTER.withName("KernelInfoGetAttributeArray_string"), - onnxruntime_all_h.C_POINTER.withName("SetPerSessionThreadPoolCallbacks")) + onnxruntime_all_h.C_POINTER.withName("SetPerSessionThreadPoolCallbacks"), + onnxruntime_all_h.C_POINTER.withName("GetMemPatternEnabled"), + onnxruntime_all_h.C_POINTER.withName("GetSessionExecutionMode"), + onnxruntime_all_h.C_POINTER.withName("SessionReleaseCapturedGraph")) .withName("OrtApi"); /** @@ -44162,6 +44168,308 @@ public static void SetPerSessionThreadPoolCallbacks(MemorySegment struct, Memory struct.set(SetPerSessionThreadPoolCallbacks$LAYOUT, SetPerSessionThreadPoolCallbacks$OFFSET, fieldValue); } + /** + * {@snippet lang=c : + * OrtStatusPtr (*GetMemPatternEnabled)(const OrtSessionOptions *, int *) + * } + */ + public static final class GetMemPatternEnabled { + + private GetMemPatternEnabled() { + // Should not be called directly + } + + /** + * The function pointer signature, expressed as a functional interface + */ + public interface Function { + MemorySegment apply(MemorySegment _x0, MemorySegment _x1); + } + + private static final FunctionDescriptor $DESC = FunctionDescriptor.of( + onnxruntime_all_h.C_POINTER, onnxruntime_all_h.C_POINTER, onnxruntime_all_h.C_POINTER); + + /** + * The descriptor of this function pointer + */ + public static FunctionDescriptor descriptor() { + return $DESC; + } + + private static final MethodHandle UP$MH = + onnxruntime_all_h.upcallHandle(GetMemPatternEnabled.Function.class, "apply", $DESC); + + /** + * Allocates a new upcall stub, whose implementation is defined by {@code fi}. + * The lifetime of the returned segment is managed by {@code arena} + */ + public static MemorySegment allocate(GetMemPatternEnabled.Function fi, Arena arena) { + return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena); + } + + private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC); + + /** + * Invoke the upcall stub {@code funcPtr}, with given parameters + */ + public static MemorySegment invoke(MemorySegment funcPtr, MemorySegment _x0, MemorySegment _x1) { + try { + return (MemorySegment) DOWN$MH.invokeExact(funcPtr, _x0, _x1); + } catch (Error | RuntimeException ex) { + throw ex; + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + } + + private static final AddressLayout GetMemPatternEnabled$LAYOUT = + (AddressLayout) $LAYOUT.select(groupElement("GetMemPatternEnabled")); + + /** + * Layout for field: + * {@snippet lang=c : + * OrtStatusPtr (*GetMemPatternEnabled)(const OrtSessionOptions *, int *) + * } + */ + public static final AddressLayout GetMemPatternEnabled$layout() { + return GetMemPatternEnabled$LAYOUT; + } + + private static final long GetMemPatternEnabled$OFFSET = $LAYOUT.byteOffset(groupElement("GetMemPatternEnabled")); + + /** + * Offset for field: + * {@snippet lang=c : + * OrtStatusPtr (*GetMemPatternEnabled)(const OrtSessionOptions *, int *) + * } + */ + public static final long GetMemPatternEnabled$offset() { + return GetMemPatternEnabled$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * OrtStatusPtr (*GetMemPatternEnabled)(const OrtSessionOptions *, int *) + * } + */ + public static MemorySegment GetMemPatternEnabled(MemorySegment struct) { + return struct.get(GetMemPatternEnabled$LAYOUT, GetMemPatternEnabled$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * OrtStatusPtr (*GetMemPatternEnabled)(const OrtSessionOptions *, int *) + * } + */ + public static void GetMemPatternEnabled(MemorySegment struct, MemorySegment fieldValue) { + struct.set(GetMemPatternEnabled$LAYOUT, GetMemPatternEnabled$OFFSET, fieldValue); + } + + /** + * {@snippet lang=c : + * OrtStatusPtr (*GetSessionExecutionMode)(const OrtSessionOptions *, ExecutionMode *) + * } + */ + public static final class GetSessionExecutionMode { + + private GetSessionExecutionMode() { + // Should not be called directly + } + + /** + * The function pointer signature, expressed as a functional interface + */ + public interface Function { + MemorySegment apply(MemorySegment _x0, MemorySegment _x1); + } + + private static final FunctionDescriptor $DESC = FunctionDescriptor.of( + onnxruntime_all_h.C_POINTER, onnxruntime_all_h.C_POINTER, onnxruntime_all_h.C_POINTER); + + /** + * The descriptor of this function pointer + */ + public static FunctionDescriptor descriptor() { + return $DESC; + } + + private static final MethodHandle UP$MH = + onnxruntime_all_h.upcallHandle(GetSessionExecutionMode.Function.class, "apply", $DESC); + + /** + * Allocates a new upcall stub, whose implementation is defined by {@code fi}. + * The lifetime of the returned segment is managed by {@code arena} + */ + public static MemorySegment allocate(GetSessionExecutionMode.Function fi, Arena arena) { + return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena); + } + + private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC); + + /** + * Invoke the upcall stub {@code funcPtr}, with given parameters + */ + public static MemorySegment invoke(MemorySegment funcPtr, MemorySegment _x0, MemorySegment _x1) { + try { + return (MemorySegment) DOWN$MH.invokeExact(funcPtr, _x0, _x1); + } catch (Error | RuntimeException ex) { + throw ex; + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + } + + private static final AddressLayout GetSessionExecutionMode$LAYOUT = + (AddressLayout) $LAYOUT.select(groupElement("GetSessionExecutionMode")); + + /** + * Layout for field: + * {@snippet lang=c : + * OrtStatusPtr (*GetSessionExecutionMode)(const OrtSessionOptions *, ExecutionMode *) + * } + */ + public static final AddressLayout GetSessionExecutionMode$layout() { + return GetSessionExecutionMode$LAYOUT; + } + + private static final long GetSessionExecutionMode$OFFSET = + $LAYOUT.byteOffset(groupElement("GetSessionExecutionMode")); + + /** + * Offset for field: + * {@snippet lang=c : + * OrtStatusPtr (*GetSessionExecutionMode)(const OrtSessionOptions *, ExecutionMode *) + * } + */ + public static final long GetSessionExecutionMode$offset() { + return GetSessionExecutionMode$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * OrtStatusPtr (*GetSessionExecutionMode)(const OrtSessionOptions *, ExecutionMode *) + * } + */ + public static MemorySegment GetSessionExecutionMode(MemorySegment struct) { + return struct.get(GetSessionExecutionMode$LAYOUT, GetSessionExecutionMode$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * OrtStatusPtr (*GetSessionExecutionMode)(const OrtSessionOptions *, ExecutionMode *) + * } + */ + public static void GetSessionExecutionMode(MemorySegment struct, MemorySegment fieldValue) { + struct.set(GetSessionExecutionMode$LAYOUT, GetSessionExecutionMode$OFFSET, fieldValue); + } + + /** + * {@snippet lang=c : + * OrtStatusPtr (*SessionReleaseCapturedGraph)(OrtSession *, int) + * } + */ + public static final class SessionReleaseCapturedGraph { + + private SessionReleaseCapturedGraph() { + // Should not be called directly + } + + /** + * The function pointer signature, expressed as a functional interface + */ + public interface Function { + MemorySegment apply(MemorySegment _x0, int _x1); + } + + private static final FunctionDescriptor $DESC = FunctionDescriptor.of( + onnxruntime_all_h.C_POINTER, onnxruntime_all_h.C_POINTER, onnxruntime_all_h.C_INT); + + /** + * The descriptor of this function pointer + */ + public static FunctionDescriptor descriptor() { + return $DESC; + } + + private static final MethodHandle UP$MH = + onnxruntime_all_h.upcallHandle(SessionReleaseCapturedGraph.Function.class, "apply", $DESC); + + /** + * Allocates a new upcall stub, whose implementation is defined by {@code fi}. + * The lifetime of the returned segment is managed by {@code arena} + */ + public static MemorySegment allocate(SessionReleaseCapturedGraph.Function fi, Arena arena) { + return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena); + } + + private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC); + + /** + * Invoke the upcall stub {@code funcPtr}, with given parameters + */ + public static MemorySegment invoke(MemorySegment funcPtr, MemorySegment _x0, int _x1) { + try { + return (MemorySegment) DOWN$MH.invokeExact(funcPtr, _x0, _x1); + } catch (Error | RuntimeException ex) { + throw ex; + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + } + + private static final AddressLayout SessionReleaseCapturedGraph$LAYOUT = + (AddressLayout) $LAYOUT.select(groupElement("SessionReleaseCapturedGraph")); + + /** + * Layout for field: + * {@snippet lang=c : + * OrtStatusPtr (*SessionReleaseCapturedGraph)(OrtSession *, int) + * } + */ + public static final AddressLayout SessionReleaseCapturedGraph$layout() { + return SessionReleaseCapturedGraph$LAYOUT; + } + + private static final long SessionReleaseCapturedGraph$OFFSET = + $LAYOUT.byteOffset(groupElement("SessionReleaseCapturedGraph")); + + /** + * Offset for field: + * {@snippet lang=c : + * OrtStatusPtr (*SessionReleaseCapturedGraph)(OrtSession *, int) + * } + */ + public static final long SessionReleaseCapturedGraph$offset() { + return SessionReleaseCapturedGraph$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * OrtStatusPtr (*SessionReleaseCapturedGraph)(OrtSession *, int) + * } + */ + public static MemorySegment SessionReleaseCapturedGraph(MemorySegment struct) { + return struct.get(SessionReleaseCapturedGraph$LAYOUT, SessionReleaseCapturedGraph$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * OrtStatusPtr (*SessionReleaseCapturedGraph)(OrtSession *, int) + * } + */ + public static void SessionReleaseCapturedGraph(MemorySegment struct, MemorySegment fieldValue) { + struct.set(SessionReleaseCapturedGraph$LAYOUT, SessionReleaseCapturedGraph$OFFSET, fieldValue); + } + /** * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}. * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()} diff --git a/src/main/java/com/jyuzawa/onnxruntime_extern/OrtEp.java b/src/main/java/com/jyuzawa/onnxruntime_extern/OrtEp.java index 799020c..3449505 100644 --- a/src/main/java/com/jyuzawa/onnxruntime_extern/OrtEp.java +++ b/src/main/java/com/jyuzawa/onnxruntime_extern/OrtEp.java @@ -38,6 +38,9 @@ * OrtStatusPtr (*ReplayGraph)(OrtEp *, int); * OrtGraphCaptureNodeAssignmentPolicy (*GetGraphCaptureNodeAssignmentPolicy)(const OrtEp *); * OrtStatusPtr (*GetAvailableResource)(const OrtEp *, OrtResourceCount *); + * OrtStatusPtr (*OnSessionInitializationEnd)(OrtEp *); + * OrtStatusPtr (*GetDefaultMemoryDevice)(const OrtEp *, const OrtMemoryDevice **); + * OrtStatusPtr (*ReleaseCapturedGraph)(OrtEp *, int); * } * } */ @@ -70,7 +73,10 @@ public class OrtEp { onnxruntime_all_h.C_POINTER.withName("IsGraphCaptured"), onnxruntime_all_h.C_POINTER.withName("ReplayGraph"), onnxruntime_all_h.C_POINTER.withName("GetGraphCaptureNodeAssignmentPolicy"), - onnxruntime_all_h.C_POINTER.withName("GetAvailableResource")) + onnxruntime_all_h.C_POINTER.withName("GetAvailableResource"), + onnxruntime_all_h.C_POINTER.withName("OnSessionInitializationEnd"), + onnxruntime_all_h.C_POINTER.withName("GetDefaultMemoryDevice"), + onnxruntime_all_h.C_POINTER.withName("ReleaseCapturedGraph")) .withName("OrtEp"); /** @@ -2275,6 +2281,308 @@ public static void GetAvailableResource(MemorySegment struct, MemorySegment fiel struct.set(GetAvailableResource$LAYOUT, GetAvailableResource$OFFSET, fieldValue); } + /** + * {@snippet lang=c : + * OrtStatusPtr (*OnSessionInitializationEnd)(OrtEp *) + * } + */ + public static final class OnSessionInitializationEnd { + + private OnSessionInitializationEnd() { + // Should not be called directly + } + + /** + * The function pointer signature, expressed as a functional interface + */ + public interface Function { + MemorySegment apply(MemorySegment _x0); + } + + private static final FunctionDescriptor $DESC = + FunctionDescriptor.of(onnxruntime_all_h.C_POINTER, onnxruntime_all_h.C_POINTER); + + /** + * The descriptor of this function pointer + */ + public static FunctionDescriptor descriptor() { + return $DESC; + } + + private static final MethodHandle UP$MH = + onnxruntime_all_h.upcallHandle(OnSessionInitializationEnd.Function.class, "apply", $DESC); + + /** + * Allocates a new upcall stub, whose implementation is defined by {@code fi}. + * The lifetime of the returned segment is managed by {@code arena} + */ + public static MemorySegment allocate(OnSessionInitializationEnd.Function fi, Arena arena) { + return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena); + } + + private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC); + + /** + * Invoke the upcall stub {@code funcPtr}, with given parameters + */ + public static MemorySegment invoke(MemorySegment funcPtr, MemorySegment _x0) { + try { + return (MemorySegment) DOWN$MH.invokeExact(funcPtr, _x0); + } catch (Error | RuntimeException ex) { + throw ex; + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + } + + private static final AddressLayout OnSessionInitializationEnd$LAYOUT = + (AddressLayout) $LAYOUT.select(groupElement("OnSessionInitializationEnd")); + + /** + * Layout for field: + * {@snippet lang=c : + * OrtStatusPtr (*OnSessionInitializationEnd)(OrtEp *) + * } + */ + public static final AddressLayout OnSessionInitializationEnd$layout() { + return OnSessionInitializationEnd$LAYOUT; + } + + private static final long OnSessionInitializationEnd$OFFSET = + $LAYOUT.byteOffset(groupElement("OnSessionInitializationEnd")); + + /** + * Offset for field: + * {@snippet lang=c : + * OrtStatusPtr (*OnSessionInitializationEnd)(OrtEp *) + * } + */ + public static final long OnSessionInitializationEnd$offset() { + return OnSessionInitializationEnd$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * OrtStatusPtr (*OnSessionInitializationEnd)(OrtEp *) + * } + */ + public static MemorySegment OnSessionInitializationEnd(MemorySegment struct) { + return struct.get(OnSessionInitializationEnd$LAYOUT, OnSessionInitializationEnd$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * OrtStatusPtr (*OnSessionInitializationEnd)(OrtEp *) + * } + */ + public static void OnSessionInitializationEnd(MemorySegment struct, MemorySegment fieldValue) { + struct.set(OnSessionInitializationEnd$LAYOUT, OnSessionInitializationEnd$OFFSET, fieldValue); + } + + /** + * {@snippet lang=c : + * OrtStatusPtr (*GetDefaultMemoryDevice)(const OrtEp *, const OrtMemoryDevice **) + * } + */ + public static final class GetDefaultMemoryDevice { + + private GetDefaultMemoryDevice() { + // Should not be called directly + } + + /** + * The function pointer signature, expressed as a functional interface + */ + public interface Function { + MemorySegment apply(MemorySegment _x0, MemorySegment _x1); + } + + private static final FunctionDescriptor $DESC = FunctionDescriptor.of( + onnxruntime_all_h.C_POINTER, onnxruntime_all_h.C_POINTER, onnxruntime_all_h.C_POINTER); + + /** + * The descriptor of this function pointer + */ + public static FunctionDescriptor descriptor() { + return $DESC; + } + + private static final MethodHandle UP$MH = + onnxruntime_all_h.upcallHandle(GetDefaultMemoryDevice.Function.class, "apply", $DESC); + + /** + * Allocates a new upcall stub, whose implementation is defined by {@code fi}. + * The lifetime of the returned segment is managed by {@code arena} + */ + public static MemorySegment allocate(GetDefaultMemoryDevice.Function fi, Arena arena) { + return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena); + } + + private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC); + + /** + * Invoke the upcall stub {@code funcPtr}, with given parameters + */ + public static MemorySegment invoke(MemorySegment funcPtr, MemorySegment _x0, MemorySegment _x1) { + try { + return (MemorySegment) DOWN$MH.invokeExact(funcPtr, _x0, _x1); + } catch (Error | RuntimeException ex) { + throw ex; + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + } + + private static final AddressLayout GetDefaultMemoryDevice$LAYOUT = + (AddressLayout) $LAYOUT.select(groupElement("GetDefaultMemoryDevice")); + + /** + * Layout for field: + * {@snippet lang=c : + * OrtStatusPtr (*GetDefaultMemoryDevice)(const OrtEp *, const OrtMemoryDevice **) + * } + */ + public static final AddressLayout GetDefaultMemoryDevice$layout() { + return GetDefaultMemoryDevice$LAYOUT; + } + + private static final long GetDefaultMemoryDevice$OFFSET = + $LAYOUT.byteOffset(groupElement("GetDefaultMemoryDevice")); + + /** + * Offset for field: + * {@snippet lang=c : + * OrtStatusPtr (*GetDefaultMemoryDevice)(const OrtEp *, const OrtMemoryDevice **) + * } + */ + public static final long GetDefaultMemoryDevice$offset() { + return GetDefaultMemoryDevice$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * OrtStatusPtr (*GetDefaultMemoryDevice)(const OrtEp *, const OrtMemoryDevice **) + * } + */ + public static MemorySegment GetDefaultMemoryDevice(MemorySegment struct) { + return struct.get(GetDefaultMemoryDevice$LAYOUT, GetDefaultMemoryDevice$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * OrtStatusPtr (*GetDefaultMemoryDevice)(const OrtEp *, const OrtMemoryDevice **) + * } + */ + public static void GetDefaultMemoryDevice(MemorySegment struct, MemorySegment fieldValue) { + struct.set(GetDefaultMemoryDevice$LAYOUT, GetDefaultMemoryDevice$OFFSET, fieldValue); + } + + /** + * {@snippet lang=c : + * OrtStatusPtr (*ReleaseCapturedGraph)(OrtEp *, int) + * } + */ + public static final class ReleaseCapturedGraph { + + private ReleaseCapturedGraph() { + // Should not be called directly + } + + /** + * The function pointer signature, expressed as a functional interface + */ + public interface Function { + MemorySegment apply(MemorySegment _x0, int _x1); + } + + private static final FunctionDescriptor $DESC = FunctionDescriptor.of( + onnxruntime_all_h.C_POINTER, onnxruntime_all_h.C_POINTER, onnxruntime_all_h.C_INT); + + /** + * The descriptor of this function pointer + */ + public static FunctionDescriptor descriptor() { + return $DESC; + } + + private static final MethodHandle UP$MH = + onnxruntime_all_h.upcallHandle(ReleaseCapturedGraph.Function.class, "apply", $DESC); + + /** + * Allocates a new upcall stub, whose implementation is defined by {@code fi}. + * The lifetime of the returned segment is managed by {@code arena} + */ + public static MemorySegment allocate(ReleaseCapturedGraph.Function fi, Arena arena) { + return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena); + } + + private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC); + + /** + * Invoke the upcall stub {@code funcPtr}, with given parameters + */ + public static MemorySegment invoke(MemorySegment funcPtr, MemorySegment _x0, int _x1) { + try { + return (MemorySegment) DOWN$MH.invokeExact(funcPtr, _x0, _x1); + } catch (Error | RuntimeException ex) { + throw ex; + } catch (Throwable ex$) { + throw new AssertionError("should not reach here", ex$); + } + } + } + + private static final AddressLayout ReleaseCapturedGraph$LAYOUT = + (AddressLayout) $LAYOUT.select(groupElement("ReleaseCapturedGraph")); + + /** + * Layout for field: + * {@snippet lang=c : + * OrtStatusPtr (*ReleaseCapturedGraph)(OrtEp *, int) + * } + */ + public static final AddressLayout ReleaseCapturedGraph$layout() { + return ReleaseCapturedGraph$LAYOUT; + } + + private static final long ReleaseCapturedGraph$OFFSET = $LAYOUT.byteOffset(groupElement("ReleaseCapturedGraph")); + + /** + * Offset for field: + * {@snippet lang=c : + * OrtStatusPtr (*ReleaseCapturedGraph)(OrtEp *, int) + * } + */ + public static final long ReleaseCapturedGraph$offset() { + return ReleaseCapturedGraph$OFFSET; + } + + /** + * Getter for field: + * {@snippet lang=c : + * OrtStatusPtr (*ReleaseCapturedGraph)(OrtEp *, int) + * } + */ + public static MemorySegment ReleaseCapturedGraph(MemorySegment struct) { + return struct.get(ReleaseCapturedGraph$LAYOUT, ReleaseCapturedGraph$OFFSET); + } + + /** + * Setter for field: + * {@snippet lang=c : + * OrtStatusPtr (*ReleaseCapturedGraph)(OrtEp *, int) + * } + */ + public static void ReleaseCapturedGraph(MemorySegment struct, MemorySegment fieldValue) { + struct.set(ReleaseCapturedGraph$LAYOUT, ReleaseCapturedGraph$OFFSET, fieldValue); + } + /** * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}. * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()} diff --git a/src/main/java/com/jyuzawa/onnxruntime_extern/onnxruntime_all_h.java b/src/main/java/com/jyuzawa/onnxruntime_extern/onnxruntime_all_h.java index 3d0975c..27cea6d 100644 --- a/src/main/java/com/jyuzawa/onnxruntime_extern/onnxruntime_all_h.java +++ b/src/main/java/com/jyuzawa/onnxruntime_extern/onnxruntime_all_h.java @@ -27,10 +27,10 @@ public class onnxruntime_all_h extends onnxruntime_all_h$shared { static final SymbolLookup SYMBOL_LOOKUP = SymbolLookup.loaderLookup().or(Linker.nativeLinker().defaultLookup()); - private static final int ORT_API_VERSION = (int) 26L; + private static final int ORT_API_VERSION = (int) 27L; /** * {@snippet lang=c : - * #define ORT_API_VERSION 26 + * #define ORT_API_VERSION 27 * } */ public static int ORT_API_VERSION() { @@ -297,6 +297,16 @@ public static int ONNX_TENSOR_ELEMENT_DATA_TYPE_INT2() { return ONNX_TENSOR_ELEMENT_DATA_TYPE_INT2; } + private static final int ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E8M0 = (int) 26L; + /** + * {@snippet lang=c : + * enum ONNXTensorElementDataType.ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E8M0 = 26 + * } + */ + public static int ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E8M0() { + return ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E8M0; + } + private static final int ONNX_TYPE_UNKNOWN = (int) 0L; /** * {@snippet lang=c :