summaryrefslogtreecommitdiff
path: root/packaging/libcaffeonacl.spec
blob: 868af66106ccefc9cc06ac87d4802029e6efc00a (plain)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
Name:           libcaffeonacl
Version:        v0.5.0
Release:        0
License:        MIT
Url:            https://github.com/OAID/CaffeOnACL
Summary:        Caffe Machine Learning library on ARM Compute Library 
Group:          Machine Learning Framework/Libraries
Source0:        %{name}-%{version}.tar.bz2
Source1001:	%name.manifest
ExclusiveArch:	%{arm} aarch64

BuildRequires:	python-devel	
BuildRequires:	python-numpy-devel
BuildRequires:	protobuf-devel
BuildRequires:  boost-devel	
BuildRequires:  gflags-devel	
BuildRequires:  glog-devel	
BuildRequires:  cblas-devel	
BuildRequires:  hdf5-devel	
BuildRequires:  opencv-devel	
BuildRequires:  lmdb-devel	
BuildRequires:  leveldb-devel	
BuildRequires:  snappy-devel	
BuildRequires:  openblas-devel 
BuildRequires:  libarmcl-devel

%description
CaffeOnACL is a project that is maintained by OPEN AI LAB, it uses Arm Compute Library (NEON+GPU) to speed up Caffe and provide utilities to debug, profile and tune application performance.

%package -n %{name}-release
Summary:        CaffeOnACL Library

%description -n %{name}-release
Summary:        CaffeOnACL Library

%package -n %{name}-devel
Summary:        Userspace interface and Library to CaffeOnACL

%description -n %{name}-devel
Summary:        Userspace interface and Library to CaffeOnACL

%package -n %{name}-tools
Summary:	Sample applications for CaffeOnACL

%description -n %{name}-tools
Summary:	Sample applications for CaffeOnACL

%prep
%setup -q
cp %{SOURCE1001} .

%build
make proto
make all -j 5
make py -j 5

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%install
make distribute

mkdir -p %{buildroot}%{_libdir}
mkdir -p %{buildroot}%{_libdir}/distribute/bin
mkdir -p %{buildroot}%{_libdir}/distribute/python
mkdir -p %{buildroot}%{_includedir}
mkdir -p %{buildroot}%{_includedir}/caffe/include
mkdir -p %{buildroot}%{_includedir}/caffe/proto

cp -r %{_builddir}/%{name}-%{version}/distribute/lib/lib* %{buildroot}%{_libdir}/
cp -r %{_builddir}/%{name}-%{version}/distribute/bin/* %{buildroot}%{_libdir}/distribute/bin/
cp -r %{_builddir}/%{name}-%{version}/distribute/python/* %{buildroot}%{_libdir}/distribute/python/
cp -r %{_builddir}/%{name}-%{version}/distribute/include/* %{buildroot}%{_includedir}/

cp -r %{_builddir}/%{name}-%{version}/distribute/proto/* %{buildroot}%{_includedir}/caffe/proto/
cp -r %{_builddir}/%{name}-%{version}/.build_release/src/caffe/proto/caffe.pb.cc %{buildroot}%{_includedir}/caffe/proto/
cp -r %{_builddir}/%{name}-%{version}/distribute/include/caffe/proto/caffe.pb.h %{buildroot}%{_includedir}/caffe/proto/

%files -n %{name}-release
%manifest %{name}.manifest
%{_libdir}/lib*

%files -n %{name}-devel
%manifest %{name}.manifest
%{_libdir}/lib*
%{_includedir}/caffe/*

%files -n %{name}-tools
%manifest %{name}.manifest
%{_libdir}/distribute/bin/*
%{_libdir}/distribute/python/*