diff --git a/misc/onnx/Makefile b/misc/onnx/Makefile index 0d6b22b6c0f0..dcfe09938f1c 100644 --- a/misc/onnx/Makefile +++ b/misc/onnx/Makefile @@ -1,40 +1,39 @@ PORTNAME= onnx DISTVERSIONPREFIX= v -DISTVERSION= 1.19.1 -PORTREVISION= 2 +DISTVERSION= 1.22.0 CATEGORIES= misc # machine-learning MAINTAINER= yuri@FreeBSD.org COMMENT= Open Neural Network eXchange WWW= https://onnx.ai \ https://github.com/onnx/onnx LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE #BUILD_DEPENDS= bash:shells/bash LIB_DEPENDS= libabsl_base.so:devel/abseil \ libprotobuf.so:devel/protobuf USES= cmake:testing compiler:c++17-lang python:build USE_GITHUB= yes CMAKE_ON= BUILD_SHARED_LIBS CMAKE_OFF= ONNX_BUILD_PYTHON CMAKE_TESTING_ON= ONNX_BUILD_TESTS CMAKE_TESTING_TARGET= CXXFLAGS+= -Dstat64=stat post-install: @${FIND} ${STAGEDIR}${PREFIX}/include -type d -empty -delete post-test: cd ${BUILD_WRKSRC} && ./onnx_gtests -# tests as of 1.19.1: (NOTE: tests require static build, so the CMAKE_ON=BUILD_SHARED_LIBS needs to be commented out) -# [==========] 95 tests from 13 test suites ran. (18 ms total) -# [ PASSED ] 95 tests. +# tests as of 1.22.0: +# [==========] 100 tests from 15 test suites ran. (42 ms total) +# [ PASSED ] 100 tests. .include diff --git a/misc/onnx/distinfo b/misc/onnx/distinfo index c01424153974..814e07885df7 100644 --- a/misc/onnx/distinfo +++ b/misc/onnx/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1762762407 -SHA256 (onnx-onnx-v1.19.1_GH0.tar.gz) = ce9d2569a61d64e8a3d05b92194f60ffb7c868dbb754a71f5b4d992273a9413d -SIZE (onnx-onnx-v1.19.1_GH0.tar.gz) = 13162220 +TIMESTAMP = 1781667282 +SHA256 (onnx-onnx-v1.22.0_GH0.tar.gz) = 70bb8b25cf31ea9b1d9f94baacfdc8c4fa27a760f9a10f5d93881bc9eede5fbc +SIZE (onnx-onnx-v1.22.0_GH0.tar.gz) = 13687818 diff --git a/misc/onnx/files/patch-CMakeLists.txt b/misc/onnx/files/patch-CMakeLists.txt index f1e4a2c51f35..072aac8ee718 100644 --- a/misc/onnx/files/patch-CMakeLists.txt +++ b/misc/onnx/files/patch-CMakeLists.txt @@ -1,28 +1,11 @@ --- remove visibility settings to fix run-time of PyTorch with ONNX --- 'import torch' fails otherwise with undefined symbols from ONNX --- https://github.com/pytorch/pytorch/issues/167525 - ---- CMakeLists.txt.orig 2025-11-11 00:00:00 UTC +--- CMakeLists.txt.orig 2026-06-17 03:46:58 UTC +++ CMakeLists.txt -@@ -419,8 +419,8 @@ foreach(_proto_src ${ONNX_PROTO_SRCS}) - endforeach() - - # Hide all symbols we don't need --set_target_properties(onnx_proto PROPERTIES CXX_VISIBILITY_PRESET hidden) --set_target_properties(onnx_proto PROPERTIES VISIBILITY_INLINES_HIDDEN 1) -+#set_target_properties(onnx_proto PROPERTIES CXX_VISIBILITY_PRESET hidden) -+#set_target_properties(onnx_proto PROPERTIES VISIBILITY_INLINES_HIDDEN 1) - - set(LINKED_PROTOBUF_TARGET protobuf::libprotobuf) - if(ONNX_USE_LITE_PROTO) -@@ -459,8 +459,8 @@ if(CMAKE_SYSTEM_NAME STREQUAL "AIX") - else() - add_library(onnx ${ONNX_SRCS}) - endif() +@@ -517,7 +517,7 @@ add_dependencies(onnx onnx_proto) + add_library(onnx $) + add_subdirectory(onnx) + add_dependencies(onnx onnx_proto) -set_target_properties(onnx PROPERTIES CXX_VISIBILITY_PRESET hidden) --set_target_properties(onnx PROPERTIES VISIBILITY_INLINES_HIDDEN ON) +#set_target_properties(onnx PROPERTIES CXX_VISIBILITY_PRESET hidden) -+#set_target_properties(onnx PROPERTIES VISIBILITY_INLINES_HIDDEN ON) - - target_link_libraries(onnx PUBLIC onnx_proto) add_onnx_global_defines(onnx) + + if(ONNX_BUILD_PYTHON) diff --git a/misc/onnx/pkg-plist b/misc/onnx/pkg-plist index c7bb902ba208..d1880871d91b 100644 --- a/misc/onnx/pkg-plist +++ b/misc/onnx/pkg-plist @@ -1,103 +1,110 @@ include/onnx/checker.h include/onnx/common/array_ref.h include/onnx/common/assertions.h include/onnx/common/common.h include/onnx/common/constants.h include/onnx/common/file_utils.h include/onnx/common/graph_node_list.h include/onnx/common/interned_strings.h include/onnx/common/ir.h include/onnx/common/ir_pb_converter.h include/onnx/common/model_helpers.h include/onnx/common/path.h include/onnx/common/platform_helpers.h include/onnx/common/proto_util.h +include/onnx/common/safe_math.h +include/onnx/common/scoped_resource.h include/onnx/common/status.h include/onnx/common/tensor.h include/onnx/common/version.h include/onnx/common/visitor.h include/onnx/defs/attr_proto_util.h include/onnx/defs/controlflow/utils.h include/onnx/defs/data_propagators.h include/onnx/defs/data_type_utils.h +include/onnx/defs/doc_strings.h include/onnx/defs/function.h include/onnx/defs/generator/utils.h include/onnx/defs/math/utils.h include/onnx/defs/nn/utils.h include/onnx/defs/operator_sets.h include/onnx/defs/operator_sets_ml.h include/onnx/defs/operator_sets_preview.h include/onnx/defs/operator_sets_training.h include/onnx/defs/parser.h include/onnx/defs/printer.h include/onnx/defs/reduction/utils.h include/onnx/defs/schema.h include/onnx/defs/sequence/utils.h include/onnx/defs/shape_inference.h include/onnx/defs/tensor/utils.h include/onnx/defs/tensor_proto_util.h include/onnx/defs/tensor_util.h include/onnx/defs/traditionalml/utils.h +include/onnx/defs/type_builders.h include/onnx/inliner/inliner.h include/onnx/onnx-data.pb.h include/onnx/onnx-ml.pb.h include/onnx/onnx-operators-ml.pb.h include/onnx/onnx-operators_pb.h include/onnx/onnx_pb.h include/onnx/proto_utils.h include/onnx/py_utils.h include/onnx/shape_inference/attribute_binder.h include/onnx/shape_inference/implementation.h include/onnx/string_utils.h include/onnx/version_converter/BaseConverter.h include/onnx/version_converter/adapters/Attention_24_23.h include/onnx/version_converter/adapters/adapter.h include/onnx/version_converter/adapters/axes_attribute_to_input.h include/onnx/version_converter/adapters/axes_input_to_attribute.h include/onnx/version_converter/adapters/axis_attribute_to_input.h include/onnx/version_converter/adapters/axis_input_to_attribute.h include/onnx/version_converter/adapters/batch_normalization_13_14.h include/onnx/version_converter/adapters/broadcast_backward_compatibility.h include/onnx/version_converter/adapters/broadcast_forward_compatibility.h include/onnx/version_converter/adapters/cast_9_8.h include/onnx/version_converter/adapters/clip_10_11.h include/onnx/version_converter/adapters/compatible.h include/onnx/version_converter/adapters/dropout_11_12.h include/onnx/version_converter/adapters/extend_supported_types.h include/onnx/version_converter/adapters/gemm_6_7.h include/onnx/version_converter/adapters/gemm_7_6.h include/onnx/version_converter/adapters/gridsample_19_20.h include/onnx/version_converter/adapters/group_normalization_20_21.h include/onnx/version_converter/adapters/maxpool_8_7.h include/onnx/version_converter/adapters/no_previous_version.h include/onnx/version_converter/adapters/pad_10_11.h include/onnx/version_converter/adapters/q_dq_21_20.h +include/onnx/version_converter/adapters/range_27_26.h include/onnx/version_converter/adapters/remove_consumed_inputs.h include/onnx/version_converter/adapters/reshape_4_5.h include/onnx/version_converter/adapters/reshape_5_4.h include/onnx/version_converter/adapters/resize_10_11.h include/onnx/version_converter/adapters/scan_8_9.h include/onnx/version_converter/adapters/scan_9_8.h include/onnx/version_converter/adapters/scatter_10_11.h +include/onnx/version_converter/adapters/scatter_16_15.h +include/onnx/version_converter/adapters/scatter_18_17.h include/onnx/version_converter/adapters/slice_9_10.h include/onnx/version_converter/adapters/softmax_12_13.h include/onnx/version_converter/adapters/softmax_13_12.h include/onnx/version_converter/adapters/split_12_13.h include/onnx/version_converter/adapters/split_13_12.h include/onnx/version_converter/adapters/split_17_18.h include/onnx/version_converter/adapters/sum_8_7.h include/onnx/version_converter/adapters/topk_9_10.h include/onnx/version_converter/adapters/transformers.h include/onnx/version_converter/adapters/type_restriction.h include/onnx/version_converter/adapters/upsample_6_7.h include/onnx/version_converter/adapters/upsample_8_9.h include/onnx/version_converter/adapters/upsample_9_10.h include/onnx/version_converter/adapters/upsample_9_8.h include/onnx/version_converter/convert.h include/onnx/version_converter/helper.h lib/cmake/ONNX/ONNXConfig.cmake lib/cmake/ONNX/ONNXConfigVersion.cmake lib/cmake/ONNX/ONNXTargets-%%CMAKE_BUILD_TYPE%%.cmake lib/cmake/ONNX/ONNXTargets.cmake lib/libonnx.so lib/libonnx_proto.so