diff --git a/misc/onnx/Makefile b/misc/onnx/Makefile index 3054dd2df6d4..7788b1d24ef9 100644 --- a/misc/onnx/Makefile +++ b/misc/onnx/Makefile @@ -1,38 +1,39 @@ PORTNAME= onnx DISTVERSIONPREFIX= v -DISTVERSION= 1.17.0 -PORTREVISION= 3 +DISTVERSION= 1.19.1 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= BUILD_ONNX_PYTHON +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.17.0: 84 tests from 11 test suites ran. (160 ms total) +# 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. .include diff --git a/misc/onnx/distinfo b/misc/onnx/distinfo index 7c21babd92f3..c01424153974 100644 --- a/misc/onnx/distinfo +++ b/misc/onnx/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1737081628 -SHA256 (onnx-onnx-v1.17.0_GH0.tar.gz) = 8d5e983c36037003615e5a02d36b18fc286541bf52de1a78f6cf9f32005a820e -SIZE (onnx-onnx-v1.17.0_GH0.tar.gz) = 12475304 +TIMESTAMP = 1762762407 +SHA256 (onnx-onnx-v1.19.1_GH0.tar.gz) = ce9d2569a61d64e8a3d05b92194f60ffb7c868dbb754a71f5b4d992273a9413d +SIZE (onnx-onnx-v1.19.1_GH0.tar.gz) = 13162220 diff --git a/misc/onnx/pkg-plist b/misc/onnx/pkg-plist index d0569c202351..c7bb902ba208 100644 --- a/misc/onnx/pkg-plist +++ b/misc/onnx/pkg-plist @@ -1,100 +1,103 @@ 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/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/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/inliner/inliner.h include/onnx/onnx-data.pb.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/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/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 diff --git a/misc/py-pytorch/Makefile b/misc/py-pytorch/Makefile index 06d9acce8750..9e4d09be2c50 100644 --- a/misc/py-pytorch/Makefile +++ b/misc/py-pytorch/Makefile @@ -1,108 +1,108 @@ PORTNAME= pytorch DISTVERSIONPREFIX= v DISTVERSION= 2.8.0 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= misc # machine-learning MASTER_SITES= https://github.com/pytorch/pytorch/releases/download/v${DISTVERSION}/ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} DISTFILES= ${PORTNAME}-${DISTVERSIONFULL}${EXTRACT_SUFX} # the main tarball disappears when GH_xx tags are added w/out this line DIST_SUBDIR= ${PORTNAME} MAINTAINER= yuri@FreeBSD.org COMMENT= PyTorch: Tensors and dynamic neural networks in Python WWW= https://pytorch.org/ \ https://github.com/pytorch/pytorch LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE BROKEN_aarch64= build fails: CMake Error at third_party/QNNPACK/CMakeLists.txt:47 (MESSAGE): Unrecognized CMAKE_SYSTEM_NAME = FreeBSD, see https://github.com/pytorch/pytorch/issues/144608 BROKEN_armv7= build fails: CMake Error at third_party/QNNPACK/CMakeLists.txt:47 (MESSAGE): Unrecognized CMAKE_SYSTEM_NAME = FreeBSD, see https://github.com/pytorch/pytorch/issues/144608 BROKEN_i386= build fails: DispatchStub.cpp:162:29: [0m[0;1;31merror: [0m[1muse of undeclared identifier 'AVX2'[0m BUILD_DEPENDS= cmake:devel/cmake-core \ gmake:devel/gmake \ pybind11>0:devel/pybind11 \ ${PYNUMPY} \ ${LOCALBASE}/include/fxdiv.h:devel/fxdiv \ ${PYTHON_PKGNAMEPREFIX}typing-extensions>0:devel/py-typing-extensions@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pyyaml>=0:devel/py-pyyaml@${PY_FLAVOR} LIB_DEPENDS= libabsl_base.so:devel/abseil \ libblis.so:math/blis \ libmpi_cxx.so:net/openmpi4 \ libonnx.so:misc/onnx \ libopenblas.so:math/openblas \ libpthreadpool.so:devel/pthreadpool \ libprotobuf.so:devel/protobuf \ libsleef.so:math/sleef RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}filelock>0:sysutils/py-filelock@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}fsspec>0:filesystems/py-fsspec@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}networkx>0:math/py-networkx@${PY_FLAVOR} \ ${PYNUMPY} \ ${PYTHON_PKGNAMEPREFIX}sympy>=1.13.1:math/py-sympy@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}typing-extensions>=4.10.0:devel/py-typing-extensions@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pyyaml>0:devel/py-pyyaml@${PY_FLAVOR} RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}astunparse>0:devel/py-astunparse@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}dill>0:devel/py-dill@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}networkx>0:math/py-networkx@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}protobuf>0:devel/py-protobuf@${PY_FLAVOR} # optional dependencies USES= compiler:c++17-lang localbase:ldflags python USE_PYTHON= distutils autoplist USE_LDCONFIG= ${PYTHON_SITELIBDIR}/torch/lib USE_GITHUB= nodefault GH_TUPLE= pytorch:cpuinfo:1e83a2f:cpuinfo/cpuinfo-with-freebsd-support # https://github.com/pytorch/cpuinfo/pull/230/commits MAKE_ENV= USE_NINJA=no # ninja breaks for some reason MAKE_ENV+= BUILD_TEST=0 # ninja breaks for some reason MAKE_ENV+= USE_MKLDNN=0 # disable MKLDNN that doesn't exist, see https://github.com/pytorch/pytorch/issues/100957 MAKE_ENV+= USE_CUDNN=0 MAKE_ENV+= USE_LAPACK=1 # needed on FreeBSD to run w/out GPU MAKE_ENV+= USE_QNNPACK=0 MAKE_ENV+= USE_DISTRIBUTED=1 LDFLAGS+= -lexecinfo LDFLAGS_powerpc64le= -pthread BINARY_ALIAS= make=${GMAKE} POST_PLIST= fix-plist TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} TEST_WRKSRC= ${WRKSRC}/test OPTIONS_DEFINE= VULKAN OPTIONS_DEFAULT= VULKAN # VULKAN is experimental in PyTorch and only simple computations work VULKAN_MAKE_ENV= USE_VULKAN=1 USE_VULKAN_SHADERC_RUNTIME=1 USE_VULKAN_WRAPPER=0 # see https://docs.pytorch.org/tutorials/unstable/vulkan_workflow.html VULKAN_BUILD_DEPENDS= glslc:graphics/shaderc \ vulkan-headers>0:graphics/vulkan-headers VULKAN_LIB_DEPENDS= libvulkan.so:graphics/vulkan-loader .include .if ${OPSYS} == FreeBSD USES+= llvm:max=15 .endif post-patch: @cd ${WRKSRC} && \ ${RM} -r third_party/cpuinfo third_party/fbgemm/external/cpuinfo && \ ${CP} -r cpuinfo-with-freebsd-support third_party/cpuinfo && \ ${CP} -r cpuinfo-with-freebsd-support third_party/fbgemm/external/cpuinfo post-install: # strip binaries @${STRIP_CMD} \ ${STAGEDIR}${PYTHON_SITELIBDIR}/torch/bin/torch_shm_manager \ ${STAGEDIR}${PYTHON_SITELIBDIR}/torch/_C${PYTHON_TAG}.so \ ${STAGEDIR}${PYTHON_SITELIBDIR}/functorch/_C${PYTHON_TAG}.so \ ${STAGEDIR}${PYTHON_SITELIBDIR}/torch/lib/lib*.so fix-plist: # remove the stray %%PYTHON_SITELIBDIR%%/caffe2 file @${REINPLACE_CMD} -e "s|.*/caffe2$$||" ${TMPPLIST} do-test: cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} run_test.py .include diff --git a/misc/pytorch/Makefile b/misc/pytorch/Makefile index 5d359fe2c71e..ddfd964a8a1f 100644 --- a/misc/pytorch/Makefile +++ b/misc/pytorch/Makefile @@ -1,81 +1,82 @@ PORTNAME= pytorch DISTVERSIONPREFIX= v DISTVERSION= 2.8.0 +PORTREVISION= 1 CATEGORIES= misc # machine-learning MASTER_SITES= https://github.com/pytorch/pytorch/releases/download/v${DISTVERSION}/ DIST_SUBDIR= ${PORTNAME} MAINTAINER= yuri@FreeBSD.org COMMENT= Tensors and dynamic neural networks in Python (C++ library) WWW= https://pytorch.org/ LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE BROKEN_i386= compilation fails: error: use of undeclared identifier 'AVX2' BUILD_DEPENDS= gmake:devel/gmake \ ${LOCALBASE}/include/fxdiv.h:devel/fxdiv \ ${PY_SETUPTOOLS} LIB_DEPENDS= libabsl_base.so:devel/abseil \ libblis.so:math/blis \ libopenblas.so:math/openblas \ libmpi_cxx.so:net/openmpi4 \ libonnx.so:misc/onnx \ libpthreadpool.so:devel/pthreadpool \ libprotobuf.so:devel/protobuf \ libsleef.so:math/sleef USES= compiler:c++17-lang cmake localbase:ldflags python # requires python even with PYTHON=off CMAKE_OFF= BUILD_CUSTOM_PROTOBUF USE_CUDA USE_ROCM USE_NNPACK USE_QNNPACK USE_PYTORCH_QNNPACK \ USE_FBGEMM # workaround recommended by the upstream here: https://github.com/pytorch/pytorch/issues/28337 CMAKE_ON= USE_SYSTEM_PYBIND11 \ USE_SYSTEM_SLEEF \ USE_SYSTEM_ONNX # see other USE_SYSTEM_xx in CMakeLists.txt CMAKE_ON+= ONNX_USE_LITE_PROTO # workaround for the protobuf-related failure described here: https://github.com/onnx/optimizer/issues/38 CMAKE_ARGS= -DPSIMD_SOURCE_DIR=${WRKSRC}/third_party/psimd \ -DPYTHON_EXECUTABLE=${PYTHON_CMD} MAKE_ENV= USE_NINJA=no # ninja breaks for some reason LDFLAGS+= -lexecinfo \ -pthread BINARY_ALIAS= make=${GMAKE} git=true OPTIONS_DEFINE= PYTHON # PYTHON only provides python support for the py-PyTorch port - it's not a python binding OPTIONS_DEFAULT= PYTHON OPTIONS_SUB= yes PYTHON_CMAKE_BOOL= BUILD_PYTHON PYTHON_PY_DEPENDS= ${PYNUMPY} \ ${PYTHON_PKGNAMEPREFIX}typing-extensions>0:devel/py-typing-extensions@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pyyaml>=0:devel/py-pyyaml@${PY_FLAVOR} PYTHON_BUILD_DEPENDS= ${PYTHON_PY_DEPENDS} \ ${PY_SETUPTOOLS} \ pybind11>0:devel/pybind11 PYTHON_RUN_DEPENDS= ${PYTHON_PY_DEPENDS} .include .if ${ARCH} == "amd64" PLIST_SUB+= AMD64="" .else PLIST_SUB+= AMD64="@comment " .endif post-patch: # replace malloc.h -> stdlib.h in many places @cd ${WRKSRC} && for f in $$(${GREP} -rl "include " * | ${GREP} -E "\.(c|cpp|h|hpp)$$"); do \ ${REINPLACE_CMD} -i'' -E "s|include |include |" $$f; \ done # remove bundled fmt @${RM} -r ${WRKSRC}/third_party/fmt post-install: # functorch.so is installed back into the source directory, see https://github.com/pytorch/pytorch/issues/91524 @${RM} $$(${FIND} ${STAGEDIR} -name functorch.so) # https://github.com/pytorch/pytorch/issues/24417 @${FIND} ${STAGEDIR} -type d -empty -delete .include