Index: head/misc/mnn/Makefile =================================================================== --- head/misc/mnn/Makefile (revision 536273) +++ head/misc/mnn/Makefile (revision 536274) @@ -1,45 +1,82 @@ # $FreeBSD$ PORTNAME= mnn DISTVERSION= 1.0.0 +PORTREVISION= 1 CATEGORIES= misc # machine-learning MAINTAINER= yuri@FreeBSD.org COMMENT= Lightweight deep neural network inference engine LICENSE= APACHE20 BROKEN_i386= always_inline function '_mm_set1_ps' requires target feature 'sse', but would be inlined into function 'Vec4' that is compiled without support for 'sse' BUILD_DEPENDS= bash:shells/bash USES= cmake compiler:c++11-lang shebangfix USE_GITHUB= yes GH_ACCOUNT= alibaba GH_PROJECT= MNN SHEBANG_GLOB= *.sh USE_LDCONFIG= yes CXXFLAGS+= -pthread LDFLAGS+= -pthread CFLAGS+= -fPIC # workaround for https://github.com/alibaba/MNN/issues/553 CXXFLAGS+= -fPIC +OPTIONS_DEFINE= CONVERTER HARD_FP QUANTOOLS TOOLS TRAIN +OPTIONS_DEFAULT= CONVERTER HARD_FP QUANTOOLS TOOLS TRAIN +OPTIONS_SUB= yes + +CONVERTER_DESC= Build machine learning model converter +CONVERTER_CMAKE_BOOL= MNN_BUILD_CONVERTER +CONVERTER_LIB_DEPENDS= libprotobuf.so:devel/protobuf + +HARD_FP_DESC= Hard floating point numbers +HARD_FP_CMAKE_BOOL= MNN_BUILD_HARD + +QUANTOOLS_DESC= Build quantized tools +QUANTOOLS_CMAKE_BOOL= MNN_BUILD_QUANTOOLS + +TOOLS_DESC= Build tools +TOOLS_CMAKE_BOOL= MNN_BUILD_TOOLS + +TRAIN_DESC= Build MNN's training framework +TRAIN_CMAKE_BOOL= MNN_BUILD_TRAIN + .include .if ${ARCH} != amd64 && ${ARCH} != i386 CMAKE_ARGS+= -DMNN_USE_AVX:BOOL=OFF \ -DMNN_USE_SSE:BOOL=OFF .endif pre-build: # https://github.com/alibaba/MNN/issues/648 @cd ${WRKSRC}/schema && ./generate.sh + +do-install-CONVERTER-on: + ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/MNNConvert ${STAGEDIR}${PREFIX}/bin + +do-install-QUANTOOLS-on: + ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/quantized.out ${STAGEDIR}${PREFIX}/bin + +do-install-TOOLS-on: +.for f in MNNV2Basic.out mobilenetTest.out backendTest.out testModel.out testModelWithDescrisbe.out getPerformance.out checkInvalidValue.out timeProfile.out + ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/${f} ${STAGEDIR}${PREFIX}/bin +.endfor + +do-install-TRAIN-on: +.for f in transformer.out train.out rawDataTransform.out dataTransformer.out runTrainDemo.out + ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/${f} ${STAGEDIR}${PREFIX}/bin +.endfor do-test: @cd ${BUILD_WRKSRC} && \ ${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} -DMNN_BUILD_TEST:BOOL=ON ${CMAKE_SOURCE_PATH} && \ ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${ALL_TARGET} && \ cd ${BUILD_WRKSRC} && ./run_test.out .include Index: head/misc/mnn/pkg-plist =================================================================== --- head/misc/mnn/pkg-plist (revision 536273) +++ head/misc/mnn/pkg-plist (revision 536274) @@ -1,17 +1,32 @@ +%%CONVERTER%%bin/MNNConvert +%%QUANTOOLS%%bin/quantized.out +%%TOOLS%%bin/MNNV2Basic.out +%%TOOLS%%bin/backendTest.out +%%TOOLS%%bin/checkInvalidValue.out +%%TOOLS%%bin/getPerformance.out +%%TOOLS%%bin/mobilenetTest.out +%%TOOLS%%bin/testModel.out +%%TOOLS%%bin/testModelWithDescrisbe.out +%%TOOLS%%bin/timeProfile.out +%%TRAIN%%bin/dataTransformer.out +%%TRAIN%%bin/rawDataTransform.out +%%TRAIN%%bin/runTrainDemo.out +%%TRAIN%%bin/train.out +%%TRAIN%%bin/transformer.out include/MNN/AutoTime.hpp include/MNN/ErrorCode.hpp include/MNN/expr/Executor.hpp include/MNN/HalideRuntime.h include/MNN/ImageProcess.hpp include/MNN/Interpreter.hpp include/MNN/MNNDefine.h include/MNN/MNNForwardType.h include/MNN/Matrix.h include/MNN/Rect.h include/MNN/Tensor.hpp include/MNN/expr/Expr.hpp include/MNN/expr/ExprCreator.hpp include/MNN/expr/MathOp.hpp include/MNN/expr/NeuralNetWorkOp.hpp include/MNN/expr/Optimizer.hpp lib/libMNN.so