From cc468fd3533aa15e2874c23c70a192345c4faa3f Mon Sep 17 00:00:00 2001 From: Tianqi Chen Date: Thu, 1 Sep 2016 15:27:04 -0700 Subject: [PATCH] trigger travis (#37) * trigger travis * fix * chomo * make * squash --- nnvm/Makefile | 13 ++++++++++++- nnvm/README.md | 3 +++ nnvm/include/nnvm/pass_functions.h | 4 ++-- nnvm/tests/travis/run_test.sh | 12 ++++++++---- nnvm/tests/travis/setup.sh | 4 ---- nnvm/tests/travis/travis_after_failure.sh | 0 6 files changed, 25 insertions(+), 11 deletions(-) mode change 100644 => 100755 nnvm/tests/travis/run_test.sh mode change 100644 => 100755 nnvm/tests/travis/setup.sh mode change 100644 => 100755 nnvm/tests/travis/travis_after_failure.sh diff --git a/nnvm/Makefile b/nnvm/Makefile index 07f46ee2456e..5990502367c3 100644 --- a/nnvm/Makefile +++ b/nnvm/Makefile @@ -11,6 +11,17 @@ SRC = $(wildcard src/*.cc src/*/*.cc) ALL_OBJ = $(patsubst src/%.cc, build/%.o, $(SRC)) ALL_DEP = $(ALL_OBJ) +UNAME_S := $(shell uname -s) + +ifeq ($(UNAME_S), Darwin) + WHOLE_ARCH= -force_load + NO_WHOLE_ARCH= -noforce_load +else + WHOLE_ARCH= --whole-archive + NO_WHOLE_ARCH= --no-whole-archive +endif + + include tests/cpp/unittest.mk test: $(TEST) @@ -27,7 +38,7 @@ lib/libnnvm.a: $(ALL_DEP) lib/libnnvm_example.so: example/src/operator.cc lib/libnnvm.a @mkdir -p $(@D) - $(CXX) $(CFLAGS) -shared -o $@ $(filter %.cc, $^) $(LDFLAGS) -Wl,--whole-archive lib/libnnvm.a -Wl,--no-whole-archive + $(CXX) $(CFLAGS) -shared -o $@ $(filter %.cc, $^) $(LDFLAGS) -Wl,${WHOLE_ARCH} lib/libnnvm.a -Wl,${NO_WHOLE_ARCH} cython: cd python; python setup.py build_ext --inplace diff --git a/nnvm/README.md b/nnvm/README.md index d58cad954e50..e25ee9acac70 100644 --- a/nnvm/README.md +++ b/nnvm/README.md @@ -1,5 +1,8 @@ # NNVM: Build deep learning system by parts +[![Build Status](https://travis-ci.org/dmlc/nnvm.svg?branch=master)](https://travis-ci.org/dmlc/nnvm) +[![GitHub license](http://dmlc.github.io/img/apache2.svg)](./LICENSE) + NNVM is not a deep learning library. It is a modular, decentralized and lightweight part to help build deep learning libraries. diff --git a/nnvm/include/nnvm/pass_functions.h b/nnvm/include/nnvm/pass_functions.h index b7068822d9ee..20019726f15a 100644 --- a/nnvm/include/nnvm/pass_functions.h +++ b/nnvm/include/nnvm/pass_functions.h @@ -61,7 +61,7 @@ inline Graph OrderMutation(Graph src) { * The index of ShapeVector is given by graph.indexed_graph().entry_id */ inline Graph InferShape(Graph graph, - ShapeVector shape_inputs = {}, + ShapeVector shape_inputs, std::string shape_attr_key = "") { if (shape_inputs.size() != 0) { graph.attrs["shape_inputs"] = std::make_shared(std::move(shape_inputs)); @@ -81,7 +81,7 @@ inline Graph InferShape(Graph graph, * The index of ShapeVector is given by graph.indexed_graph().entry_id */ inline Graph InferType(Graph graph, - DTypeVector dtype_inputs = {}, + DTypeVector dtype_inputs, std::string dtype_attr_key = "") { if (dtype_inputs.size() != 0) { graph.attrs["dtype_inputs"] = std::make_shared(std::move(dtype_inputs)); diff --git a/nnvm/tests/travis/run_test.sh b/nnvm/tests/travis/run_test.sh old mode 100644 new mode 100755 index 2c4fe4a2f036..a5ea03a1dc3a --- a/nnvm/tests/travis/run_test.sh +++ b/nnvm/tests/travis/run_test.sh @@ -44,11 +44,15 @@ if [ ${TASK} == "python_test" ]; then nosetests3 tests/python/ || exit -1 fi - python -m nose tests/python/ || exit -1 - python3 -m nose tests/python/ || exit -1 make cython || exit -1 make cython3 || exit -1 - python -m nose tests/python/ || exit -1 - python3 -m nose tests/python/ || exit -1 + + if [ ${TRAVIS_OS_NAME} == "osx" ]; then + python -m nose tests/python/ || exit -1 + python3 -m nose tests/python/ || exit -1 + else + nosetests tests/python/ || exit -1 + nosetests3 tests/python/ || exit -1 + fi exit 0 fi diff --git a/nnvm/tests/travis/setup.sh b/nnvm/tests/travis/setup.sh old mode 100644 new mode 100755 index 2621a7f03f25..42dfc53bc66a --- a/nnvm/tests/travis/setup.sh +++ b/nnvm/tests/travis/setup.sh @@ -13,7 +13,3 @@ fi if [ ${TASK} == "lint" ]; then pip install cpplint 'pylint==1.4.4' 'astroid==1.3.6' --user `whoami` fi - -if [ ! -d dmlc-core ]; then - git clone https://github.com/dmlc/dmlc-core -fi diff --git a/nnvm/tests/travis/travis_after_failure.sh b/nnvm/tests/travis/travis_after_failure.sh old mode 100644 new mode 100755