aboutsummaryrefslogtreecommitdiff
path: root/misc/ngraph/Makefile
blob: f1afbcc24d4b40c77da08af9c4a68097558c037d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
PORTNAME=	ngraph
DISTVERSIONPREFIX=	v
DISTVERSION=	0.29.0-rc.0-345
DISTVERSIONSUFFIX=	-g58b649aa6
PORTREVISION=	7
CATEGORIES=	misc # machine-learning
PKGNAMESUFFIX=	-machine-learning-library

MAINTAINER=	yuri@FreeBSD.org
COMMENT=	C++ library, compiler and runtime for Deep Learning

LICENSE=	APACHE20
LICENSE_FILE=	${WRKSRC}/LICENSE

BUILD_DEPENDS=	onednn>0:math/onednn
LIB_DEPENDS=	libtbb.so:devel/onetbb

USES=		cmake eigen:3 localbase pkgconfig
USE_GITHUB=	yes
GH_ACCOUNT=	NervanaSystems
USE_LDCONFIG=	yes

CMAKE_OFF=	NGRAPH_UNIT_TEST_ENABLE NGRAPH_TEST_UTIL_ENABLE NGRAPH_TBB_ENABLE NGRAPH_JSON_ENABLE NGRAPH_MLIR_ENABLE NGRAPH_CODEGEN_ENABLE NGRAPH_STRICT_ERROR_CHECK
CMAKE_ON=	NGRAPH_USE_PREBUILT_LLVM
CMAKE_ARGS=	-DClang_DIR=${LOCALBASE}/llvm${LLVM_DEFAULT}/lib/cmake/clang \
		-DTBB_ROOT=${LOCALBASE}

CXXFLAGS+=	-I${LOCALBASE}/include/eigen3
BINARY_ALIAS=	git=/usr/bin/true

# ngraph uses clang from ports in a c++14 mode
BUILD_DEPENDS+=	llvm${LLVM_DEFAULT}>0:devel/llvm${LLVM_DEFAULT}
RUN_DEPENDS+=	llvm${LLVM_DEFAULT}>0:devel/llvm${LLVM_DEFAULT}
CPP=		clang-cpp${LLVM_DEFAULT}
CC=		clang${LLVM_DEFAULT}
CXX=		clang++${LLVM_DEFAULT}

OPTIONS_DEFINE=		NATIVE

NATIVE_DESC=		Build with native optimizations (-march=native)
NATIVE_CMAKE_BOOL=	NGRAPH_NATIVE_ARCH_ENABLE

post-install:
	@cd ${STAGEDIR}${PREFIX} && \
		${RM} -r licenses && \
		${RM} LICENSE VERSION && \
		${MV} cmake lib/ && \
		${RM} -r include/ngraph/frontend/ATen

.include <bsd.port.mk>