Skip to content

Commit abc95e1

Browse files
authored
Merge pull request #14 from killeent/conda-nnpack
Barebones NNPACK Conda Build
2 parents e5c3168 + 12befe7 commit abc95e1

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

conda/nnpack/build.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!bin/bash
2+
3+
# Instead of Conda packaging these dependencies, we expect them to be installed
4+
# pip install --upgrade git+https://github.com/Maratyszcza/PeachPy
5+
# pip install --upgrade git+https://github.com/Maratyszcza/confu
6+
# conda install -c conda-forge ninja
7+
8+
confu setup
9+
$PYTHON ./configure.py
10+
11+
# patch ninja file to compile with -fPIC support
12+
sed -ibuild.ninja.bak "s/cflags = /cflags = -fPIC /" build.ninja
13+
sed -ibuild.ninja.bak "s/cxxflags = /cxxflags = -fPIC /" build.ninja
14+
15+
ninja
16+
17+
# move files to expected location
18+
mkdir -p $PREFIX/include
19+
mkdir -p $PREFIX/lib
20+
21+
cp -p include/nnpack.h $PREFIX/include
22+
cp -p lib/libnnpack.a $PREFIX/lib
23+
cp -p lib/libpthreadpool.a $PREFIX/lib
24+
cp -p deps/pthreadpool/include/pthreadpool.h $PREFIX/include

conda/nnpack/meta.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package:
2+
name: nnpack
3+
version: "0.0.1"
4+
5+
source:
6+
git_url: https://github.com/Maratyszcza/NNPACK.git
7+
git_rev: master
8+
9+
build:
10+
number: 1
11+
12+
about:
13+
home: https://github.com/Maratyszcza/NNPACK
14+
license: BSD-2-Clause
15+
license_file: LICENSE

0 commit comments

Comments
 (0)