diff --git a/relay/Makefile b/relay/Makefile deleted file mode 100644 index d0421fede8522..0000000000000 --- a/relay/Makefile +++ /dev/null @@ -1,94 +0,0 @@ -ROOTDIR = $(CURDIR) - -PYTHON3 = "python3.6" -PYTHON = "python" - -ifndef config -ifneq ("$(wildcard ./config.mk)", "") - config = config.mk -else - config = make/config.mk -endif -endif -include $(config) - -DMLC_CORE_PATH=../dmlc-core -TVM_PATH=.. - -export LDFLAGS = -pthread -lm -export CFLAGS = -std=c++11 -Wall -O2 -Iinclude -fPIC -Werror -CFLAGS += -I$(TVM_PATH)/include -I$(TVM_PATH)/dlpack/include -I$(TVM_PATH)/HalideIR/src -I$(TVM_PATH)/topi/include - - - -CFLAGS += -I$(DMLC_CORE_PATH)/include - -ifneq ($(ADD_CFLAGS), NONE) - CFLAGS += $(ADD_CFLAGS) -endif - -ifneq ($(ADD_LDFLAGS), NONE) - LDFLAGS += $(ADD_LDFLAGS) -endif - -# specify tensor path -.PHONY: clean all test lint mypy cpplint pylint doc cython cython3 cyclean - -UNAME_S := $(shell uname -s) - -ifeq ($(UNAME_S), Darwin) - SHARED_LIBRARY_SUFFIX := dylib - WHOLE_ARCH= -all_load - NO_WHOLE_ARCH= -noall_load - LDFLAGS += -undefined dynamic_lookup -else - SHARED_LIBRARY_SUFFIX := so - WHOLE_ARCH= --whole-archive - NO_WHOLE_ARCH= --no-whole-archive -endif - -all: lib/librelay.$(SHARED_LIBRARY_SUFFIX) - -SRC = $(wildcard src/tvm/relay/*.cc src/tvm/relay/typeck/*.cc src/tvm/relay/ir/*.cc) -ALL_OBJ = $(patsubst %.cc, build/%.o, $(SRC)) - -test: $(TEST) - -build/src/%.o: src/%.cc - @mkdir -p $(@D) - $(CXX) $(CFLAGS) -MM -MT build/src/$*.o $< >build/src/$*.d - $(CXX) -c $(CFLAGS) -c $< -o $@ - -lib/librelay.$(SHARED_LIBRARY_SUFFIX): ${ALL_OBJ} - @mkdir -p $(@D) - $(CXX) $(CFLAGS) -shared -o $@ $(filter %.o, $^) $(LDFLAGS) -Wl,${WHOLE_ARCH} -Wl,${NO_WHOLE_ARCH} - -cython: - cd python; python setup.py build_ext --inplace - -cython3: - cd python; python3.6 setup.py build_ext --inplace - -cyclean: - rm -rf python/relay/*/*.so python/relay/*/*.dylib python/relay/*/*.cpp - -lint: pylint cpplint - -mypy: - python3.6 -m mypy --ignore-missing-imports python/relay tests/python/relay/ - -cpplint: - python3.6 dmlc-core/scripts/lint.py relay cpp include src - -pylint: - python3.6 -m pylint python/relay tests/python --rcfile=$(ROOTDIR)/tests/lint/pylintrc - -doc: - doxygen docs/Doxyfile - -clean: - $(RM) -rf build lib bin *~ */*~ */*/*~ */*/*/*~ */*.o */*/*.o */*/*/*.o cli_test - --include build/*.d --include build/*/*.d --include build/*/*/*.d diff --git a/relay/make/config.mk b/relay/make/config.mk deleted file mode 100644 index ce0ec475dc225..0000000000000 --- a/relay/make/config.mk +++ /dev/null @@ -1,46 +0,0 @@ -#------------------------------------------------------------------------------- -# Template configuration for compiling nnvm -# -# If you want to change the configuration, please use the following -# steps. Assume you are on the root directory of nnvm. First copy this -# file so that any local changes will be ignored by git -# -# $ cp make/config.mk . -# -# Next modify the according entries, and then compile by -# -# $ make -# -# or build in parallel with 8 threads -# -# $ make -j8 -#------------------------------------------------------------------------------- - -#--------------------- -# choice of compiler -#-------------------- - -export NVCC = nvcc - -# choice of archiver -export AR = ar - -# the additional link flags you want to add -ADD_LDFLAGS= - -# the additional compile flags you want to add -ADD_CFLAGS= - -# path to dmlc-core module -#DMLC_CORE_PATH= - -#---------------------------- -# plugins -#---------------------------- - -# whether to use fusion integration. This requires installing cuda. -# ifndef CUDA_PATH -# CUDA_PATH = /usr/local/cuda -# endif -# NNVM_FUSION_PATH = plugin/nnvm-fusion -# NNVM_PLUGINS += $(NNVM_FUSION_PATH)/nnvm-fusion.mk