mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-28 05:29:48 +00:00
misc/mnn: Add options for converter, training, tools, etc
This commit is contained in:
parent
0c1a2c1d99
commit
232c07ae56
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=536274
@ -2,6 +2,7 @@
|
||||
|
||||
PORTNAME= mnn
|
||||
DISTVERSION= 1.0.0
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= misc # machine-learning
|
||||
|
||||
MAINTAINER= yuri@FreeBSD.org
|
||||
@ -26,6 +27,26 @@ 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 <bsd.port.pre.mk>
|
||||
|
||||
.if ${ARCH} != amd64 && ${ARCH} != i386
|
||||
@ -36,6 +57,22 @@ CMAKE_ARGS+= -DMNN_USE_AVX:BOOL=OFF \
|
||||
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} && \
|
||||
|
@ -1,3 +1,18 @@
|
||||
%%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
|
||||
|
Loading…
Reference in New Issue
Block a user