Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Barebones NNPACK Conda Build #14

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