Skip to content

Barebones NNPACK Conda Build #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions conda/nnpack/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!bin/bash

# Instead of Conda packaging these dependencies, we expect them to be installed
# pip install --upgrade git+https://github.com/Maratyszcza/PeachPy
# pip install --upgrade git+https://github.com/Maratyszcza/confu
# conda install -c conda-forge ninja

confu setup
$PYTHON ./configure.py

# patch ninja file to compile with -fPIC support
sed -ibuild.ninja.bak "s/cflags = /cflags = -fPIC /" build.ninja
sed -ibuild.ninja.bak "s/cxxflags = /cxxflags = -fPIC /" build.ninja

ninja

# move files to expected location
mkdir -p $PREFIX/include
mkdir -p $PREFIX/lib

cp -p include/nnpack.h $PREFIX/include
cp -p lib/libnnpack.a $PREFIX/lib
cp -p lib/libpthreadpool.a $PREFIX/lib
cp -p deps/pthreadpool/include/pthreadpool.h $PREFIX/include
15 changes: 15 additions & 0 deletions conda/nnpack/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package:
name: nnpack
version: "0.0.1"

source:
git_url: https://github.com/Maratyszcza/NNPACK.git
git_rev: master

build:
number: 1

about:
home: https://github.com/Maratyszcza/NNPACK
license: BSD-2-Clause
license_file: LICENSE