diff options
author | Ye Joey <joeyye@openailab.com> | 2017-07-06 14:39:37 +0800 |
---|---|---|
committer | Ye Joey <joeyye@openailab.com> | 2017-07-06 14:39:37 +0800 |
commit | 70eb0cc1f22c629882e0ce4425035f043350d024 (patch) | |
tree | 81d606b255f6312d09b094292c19f861df533b48 /unit_tests | |
parent | 0c199e3577a0a968ba4a0c07ae5a35bce5348eba (diff) | |
download | caffeonacl-70eb0cc1f22c629882e0ce4425035f043350d024.tar.gz caffeonacl-70eb0cc1f22c629882e0ce4425035f043350d024.tar.bz2 caffeonacl-70eb0cc1f22c629882e0ce4425035f043350d024.zip |
1. Refine Makefile
2. Rewrite the release notes with markdown format
3. Add the missed files in SqueezeNet
Diffstat (limited to 'unit_tests')
-rw-r--r-- | unit_tests/Makefile | 80 |
1 files changed, 32 insertions, 48 deletions
diff --git a/unit_tests/Makefile b/unit_tests/Makefile index 034ee02f..657d088d 100644 --- a/unit_tests/Makefile +++ b/unit_tests/Makefile @@ -1,87 +1,71 @@ +CC = gcc +CXX = g++ -include ../Makefile.config +ifeq ($(ACL_ROOT),) +$(error ACL_ROOT does not specified. use "export ACL_ROOT='path of acl soure directory'") +endif + +ifeq ($(CAFFE_ROOT),) +$(error CAFFE_ROOT does not specified. use "export CAFFE_ROOT='path of caffe soure directory'") +endif -CXX_SRCS+=test_pooling_layer.cpp -CXX_SRCS+=test_softmax_layer.cpp -CXX_SRCS+= test_inner_product_layer.cpp -CXX_SRCS+=test_neuron_layer.cpp -CXX_SRCS+=test_lrn_layer.cpp #failed on single channel LRN -#C_SRCS=pmu.c testbed.c -CXX_SRCS+= test_convolution_layer.cpp -#CXX_SRCS= test_fail.cpp -BIN_SRCS=test_caffe_main.cpp test.cpp +include $(CAFFE_ROOT)/Makefile.config -HOME=/home/firefly # # caffe related stuff # - -CAFFE_ROOT=$(HOME)/caffeOnACL CAFFE_INCS = -I$(CAFFE_ROOT)/include -I$(CAFFE_ROOT)/distribute/include/ CAFFE_LIBS = -L$(CAFFE_ROOT)/distribute/lib -lcaffe -lglog -lgflags -lprotobuf -lboost_system -lboost_filesystem -CAFFE_RPATH =$(CAFFE_ROOT)/distribute/lib - # # google test related stuff # - -GTEST_ROOT=/usr/local -GTEST_LIBS=$(GTEST_ROOT)/lib/libgtest_main.a $(GTEST_ROOT)/lib/libgtest.a -GTEST_INCS=-I$(GTEST_ROOT)/include/ - +GTEST_ROOT = /usr/local +GTEST_INCS = -I$(GTEST_ROOT)/include/ +GTEST_LIBS = -L$(GTEST_ROOT)/lib/ -lgtest_main -lgtest # # arm compute # +ACL_LIBS = -L$(ACL_ROOT)/build -L$(ACL_ROOT)/build/arm_compute -larm_compute -lOpenCL -ACL_ROOT=$(HOME)/ComputeLibrary -ACL_LIBS=-L$(ACL_ROOT)/build -L$(ACL_ROOT)/build/arm_compute -larm_compute -lOpenCL -ACL_RPATH=$(ACL_ROOT)/build:$(ACL_ROOT)/build/arm_compute +COMM_CFLAGS = -Wall -g -DCPU_ONLY -DUSE_ACL $(GTEST_INCS) $(CAFFE_INCS) -COMM_CFLAGS=$(GTEST_INCS) $(CAFFE_INCS) -Wall -g -DCPU_ONLY -DUSE_ACL #USE_PROFILING -- get profiling informations, is controled by LOGACL #LAYER_PERF_STAT -- haitao's net profiling information ifeq ($(USE_PROFILING), 1) COMM_CFLAGS += -DUSE_PROFILING -DLAYER_PERF_STAT endif -CXXFLAGS=$(COMM_CFLAGS) -Wno-sign-compare -CFLAGS=$(COMM_CFLAGS) +CXXFLAGS = $(COMM_CFLAGS) -Wno-sign-compare +CFLAGS = $(COMM_CFLAGS) -CC=gcc -CXX=g++ +LDFLAGS += $(CAFFE_LIBS) $(GTEST_LIBS) $(ACL_LIBS) -lpthread -lopenblas -COMM_OBJS=$(CXX_SRCS:.cpp=.o) $(C_SRCS:.c=.o) -BIN_OBJS+=$(BIN_SRCS:.cpp=.o) -BIN_EXES=$(BIN_OBJS:.o=) - -LIBS+=$(CAFFE_LIBS) $(GTEST_LIBS) -lpthread -lopenblas $(ACL_LIBS) - -RT_PATH=-Wl,-rpath,$(CAFFE_RPATH):$(ACL_RPATH) - -LDFLAGS+=$(RT_PATH) +COMM_OBJS += test_pooling_layer.o +COMM_OBJS += test_softmax_layer.o +COMM_OBJS += test_inner_product_layer.o +COMM_OBJS += test_neuron_layer.o +COMM_OBJS += test_lrn_layer.o +COMM_OBJS += test_convolution_layer.o +BIN_EXES = test test_caffe_main all : $(BIN_EXES) -$(BIN_EXES):%:%.o - -$(BIN_EXES):$(COMM_OBJS) - +test : test.o $(COMM_OBJS) + $(CXX) $< $(COMM_OBJS) -o $@ $(LDFLAGS) +test_caffe_main : test_caffe_main.o $(COMM_OBJS) + $(CXX) $< $(COMM_OBJS) -o $@ $(LDFLAGS) clean: - rm -f $(BIN_EXES) *.o *.so + $(RM) $(BIN_EXES) *.o *.so .PHONY : all clean %.o : %.c - $(CC) $(CFLAGS) -c $< -o $@ + $(CC) -c $(CFLAGS) $< -o $@ %.o : %.cpp - $(CXX) $(CXXFLAGS) -c $< -o $@ - -%: %.o - $(CXX) $(LDFLAGS) $< $(COMM_OBJS) -o $@ $(LIBS) - + $(CXX) -c $(CXXFLAGS) $< -o $@ |