Skip to content

Commit

Permalink
[TOP] GraphExecutor (apache#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
tqchen committed May 26, 2018
1 parent 687124c commit 741d803
Show file tree
Hide file tree
Showing 14 changed files with 523 additions and 357 deletions.
9 changes: 7 additions & 2 deletions nnvm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ include $(config)

export LDFLAGS = -pthread -lm
export CFLAGS = -std=c++11 -Wall -O2 -Iinclude -fPIC
CFLAGS += -Itvm/include -Itvm/dlpack/include

ifdef DMLC_CORE_PATH
CFLAGS += -I$(DMLC_CORE_PATH)/include
Expand Down Expand Up @@ -51,10 +52,10 @@ else
NO_WHOLE_ARCH= --no-whole-archive
endif

all: lib/libnnvm.a lib/libnnvm_top.$(SHARED_LIBRARY_SUFFIX)
all: lib/libnnvm.a lib/libnnvm_top.$(SHARED_LIBRARY_SUFFIX) lib/libnnvm_top_runtime.$(SHARED_LIBRARY_SUFFIX)

SRC = $(wildcard src/*.cc src/c_api/*.cc src/core/*.cc src/pass/*.cc)
SRC_TOP = $(wildcard src/top/*.cc, src/top/*/*.cc)
SRC_TOP = $(wildcard src/top/*.cc, src/top/*/*.cc src/runtime/*.cc)
ALL_OBJ = $(patsubst %.cc, build/%.o, $(SRC))
TOP_OBJ = $(patsubst %.cc, build/%.o, $(SRC_TOP))
ALL_DEP = $(ALL_OBJ)
Expand All @@ -76,6 +77,10 @@ lib/libnnvm_top.$(SHARED_LIBRARY_SUFFIX): lib/libnnvm.a ${TOP_OBJ}
@mkdir -p $(@D)
$(CXX) $(CFLAGS) -shared -o $@ $(filter %.o, $^) $(LDFLAGS) -Wl,${WHOLE_ARCH} lib/libnnvm.a -Wl,${NO_WHOLE_ARCH}

lib/libnnvm_top_runtime.$(SHARED_LIBRARY_SUFFIX): deploy/nnvm_runtime.cc
@mkdir -p $(@D)
$(CXX) $(CFLAGS) -shared -o $@ $(filter %.cc, $^) $(LDFLAGS)

cython:
cd python; python setup.py build_ext --inplace

Expand Down
2 changes: 0 additions & 2 deletions nnvm/amalgamation/.gitignore

This file was deleted.

32 changes: 0 additions & 32 deletions nnvm/amalgamation/Makefile

This file was deleted.

100 changes: 0 additions & 100 deletions nnvm/amalgamation/amalgamation.py

This file was deleted.

18 changes: 0 additions & 18 deletions nnvm/amalgamation/generate.py

This file was deleted.

4 changes: 4 additions & 0 deletions nnvm/deploy/REAMD.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
All in One Deployment File
==========================
This folder contains an all in one deployment file that contains minimum dependencies
needed to run nnvm top runtime.
11 changes: 11 additions & 0 deletions nnvm/deploy/nnvm_runtime.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*!
* Copyright (c) 2017 by Contributors
* All in one runtime
* \file nnvm_runtime.cc
*/
#include "../src/core/graph.cc"
#include "../src/core/node.cc"
#include "../src/core/pass.cc"
#include "../src/core/op.cc"
#include "../src/pass/saveload_json.cc"
#include "../src/runtime/graph_executor.cc"
Loading

0 comments on commit 741d803

Please sign in to comment.