From 5444b5caf66a6c0ee7711cc4f2f030e84f7c43fd Mon Sep 17 00:00:00 2001 From: Samuel Audet Date: Fri, 26 Apr 2024 20:55:52 +0900 Subject: [PATCH] Fix builds for ONNX on Windows --- onnx/src/gen/java/org/bytedeco/onnx/OpSchema.java | 11 +---------- .../src/main/java/org/bytedeco/onnx/presets/onnx.java | 3 ++- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/onnx/src/gen/java/org/bytedeco/onnx/OpSchema.java b/onnx/src/gen/java/org/bytedeco/onnx/OpSchema.java index e96127cd4c8..30745911bec 100644 --- a/onnx/src/gen/java/org/bytedeco/onnx/OpSchema.java +++ b/onnx/src/gen/java/org/bytedeco/onnx/OpSchema.java @@ -433,16 +433,7 @@ private native void allocate( @StdString String name, @StdString String description, @Cast("onnx::AttributeProto::AttributeType") int type, @Const @ByRef TypeProto defaultValue); /* non-STL wrapper to reduce binary size */ - public native @ByRef OpSchema Attr( - @StdString BytePointer name, - @StdString BytePointer description, - @StdString BytePointer conditionExplanation, - @Cast("onnx::AttributeProto::AttributeType") int attr_type); - public native @ByRef OpSchema Attr( - @StdString String name, - @StdString String description, - @StdString String conditionExplanation, - @Cast("onnx::AttributeProto::AttributeType") int attr_type); + // Register "required" attribute without default value. public native @ByRef OpSchema Attr(@StdString BytePointer name, @StdString BytePointer description, @Cast("onnx::AttributeProto::AttributeType") int type, @Cast("bool") boolean required/*=true*/); diff --git a/onnx/src/main/java/org/bytedeco/onnx/presets/onnx.java b/onnx/src/main/java/org/bytedeco/onnx/presets/onnx.java index 2a5ed30da4d..9604212d4e2 100644 --- a/onnx/src/main/java/org/bytedeco/onnx/presets/onnx.java +++ b/onnx/src/main/java/org/bytedeco/onnx/presets/onnx.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2023 Alexander Merritt, Samuel Audet + * Copyright (C) 2018-2024 Alexander Merritt, Samuel Audet * * Licensed either under the Apache License, Version 2.0, or (at your option) * under the terms of the GNU General Public License as published by @@ -185,6 +185,7 @@ public void map(InfoMap infoMap) { .put(new Info("onnx::OpSchema::GetTypeAndShapeInferenceFunction", "onnx::OpSchema::SetContextDependentFunctionBodyBuilder", "onnx::OpSchema::GetDataPropagationFunction", "onnx::RegisterSchema", "onnx::ReplaceAll", "onnx::DbgOperatorSetTracker::Instance", + "onnx::OpSchema::Attr(std::string, std::string, std::string, onnx::AttributeProto::AttributeType)", "onnx::shape_inference::checkShapesAndTypes(const onnx::TypeProto_Sequence&, const onnx::TypeProto_Sequence&)", "onnx::shape_inference::mergeShapesAndTypes(const onnx::TypeProto_Sequence&, onnx::TypeProto_Tensor*)").skip())