Skip to content

Commit

Permalink
Replace atlas with multithreaded OpenBLAS to speed-up on multi-core CPU
Browse files Browse the repository at this point in the history
issue: #79
  • Loading branch information
kloudkl authored and shelhamer committed Feb 10, 2014
1 parent 10d6822 commit 33e7141
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,18 @@ MKL_INCLUDE_DIR := $(MKL_DIR)/include
MKL_LIB_DIR := $(MKL_DIR)/lib $(MKL_DIR)/lib/intel64

INCLUDE_DIRS += ./src ./include $(CUDA_INCLUDE_DIR) $(MKL_INCLUDE_DIR)
LIBRARY_DIRS += $(CUDA_LIB_DIR) $(MKL_LIB_DIR) /usr/lib/atlas-base
LIBRARIES := cudart cublas curand protobuf \
opencv_core opencv_highgui opencv_imgproc \
glog \
atlas cblas \
leveldb snappy pthread boost_system
# mkl_rt mkl_intel_thread
LIBRARY_DIRS += $(CUDA_LIB_DIR) $(MKL_LIB_DIR)
LIBRARIES := cudart cublas curand pthread openblas \
glog protobuf leveldb snappy boost_system \
opencv_core opencv_highgui opencv_imgproc
PYTHON_LIBRARIES := boost_python python2.7
WARNINGS := -Wall

COMMON_FLAGS := -DNDEBUG -O2 $(foreach includedir,$(INCLUDE_DIRS),-I$(includedir))
CXXFLAGS += -pthread -fPIC $(COMMON_FLAGS)
NVCCFLAGS := -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS)
LDFLAGS += $(foreach librarydir,$(LIBRARY_DIRS),-L$(librarydir)) \
$(foreach library,$(LIBRARIES),-l$(library)) -Wl,-rpath=/usr/lib/atlas-base
$(foreach library,$(LIBRARIES),-l$(library))
PYTHON_LDFLAGS := $(LDFLAGS) $(foreach library,$(PYTHON_LIBRARIES),-l$(library))


Expand Down

0 comments on commit 33e7141

Please sign in to comment.