Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Greentea LibDNN benchmarks #106

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 44 additions & 5 deletions greentea/Makefile.config
Original file line number Diff line number Diff line change
@@ -1,30 +1,52 @@
## Refer to http://caffe.berkeleyvision.org/installation.html
# Contributions simplifying and improving our build system are welcome!

# 32 bit / 64 bit indexing
# USE_INDEX_64 := 1

# GreenTea (ViennaCL/OpenCL) backend switch

# Enable the CUDA backend
USE_CUDA := 0
USE_CUDA := 1

# Enable the OpenCL/Greentea backend
USE_GREENTEA := 1
USE_LIBDNN := 1

# Folder of the ViennaCL header-only library
VIENNACL_DIR = ../ViennaCL

# Either set clBLAS to 1 or it will use ViennaclBLAS.
# CLBLAS should be faster, especially on AMD cards.
USE_CLBLAS := 0
# Override BLAS, use clBLAS insead of ViennaclBLAS.
# USE_CLBLAS := 1

# Override BLAS, use ISAAC instead of ViennaclBLAS.
# USE_ISAAC := 1

# cuDNN acceleration switch (uncomment to build with cuDNN).
# USE_CUDNN := 1

# CPU-only switch (uncomment to build without GPU support).
# CPU_ONLY := 1

# uncomment to disable IO dependencies and corresponding data layers
# USE_OPENCV := 0
# USE_LEVELDB := 0
# USE_LMDB := 0

# Uncomment for FFT
# USE_FFT := 1

# uncomment to allow MDB_NOLOCK when reading LMDB files (only if necessary)
# You should not set this flag if you will be reading LMDBs with any
# possibility of simultaneous read and write
# ALLOW_LMDB_NOLOCK := 1

# Uncomment if you're using OpenCV 3
# OPENCV_VERSION := 3

# To customize your choice of compiler, uncomment and set the following.
# N.B. the default for Linux is g++ and the default for OSX is clang++
# CUSTOM_CXX := /usr/local/gcc/4.9.2/bin/g++
# CUSTOM_CXX := g++

# CUDA directory contains bin/ and lib/ directories that we need.
CUDA_DIR := /usr/local/cuda
Expand Down Expand Up @@ -52,6 +74,10 @@ BLAS := open
# BLAS_INCLUDE := /path/to/your/blas
# BLAS_LIB := /path/to/your/blas

# Homebrew puts openblas in a directory that is not on the standard search path
# BLAS_INCLUDE := $(shell brew --prefix openblas)/include
# BLAS_LIB := $(shell brew --prefix openblas)/lib

# This is required only if you will compile the matlab interface.
# MATLAB directory should contain the mex binary in /bin.
# MATLAB_DIR := /usr/local
Expand All @@ -68,17 +94,30 @@ PYTHON_INCLUDE := /usr/include/python2.7 \
# $(ANACONDA_HOME)/include/python2.7 \
# $(ANACONDA_HOME)/lib/python2.7/site-packages/numpy/core/include \

# Uncomment to use Python 3 (default is Python 2)
# PYTHON_LIBRARIES := boost_python3 python3.5m
# PYTHON_INCLUDE := /usr/include/python3.5m \
# /usr/lib/python3.5/dist-packages/numpy/core/include

# We need to be able to find libpythonX.X.so or .dylib.
PYTHON_LIB := /usr/lib
# PYTHON_LIB := $(ANACONDA_HOME)/lib

# Homebrew installs numpy in a non standard path (keg only)
# PYTHON_INCLUDE += $(dir $(shell python -c 'import numpy.core; print(numpy.core.__file__)'))/include
# PYTHON_LIB += $(shell brew --prefix numpy)/lib

# Uncomment to support layers written in Python (will link against Python libs)
# WITH_PYTHON_LAYER := 1

# Whatever else you find you need goes here.
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib

# If Homebrew is installed at a non standard location (for example your home directory) and you use it for general dependencies
# INCLUDE_DIRS += $(shell brew --prefix)/include
# LIBRARY_DIRS += $(shell brew --prefix)/lib

# Uncomment to use `pkg-config` to specify OpenCV library paths.
# (Usually not necessary -- OpenCV libraries are normally installed in one of the above $LIBRARY_DIRS.)
# USE_PKG_CONFIG := 1
Expand Down
10 changes: 5 additions & 5 deletions greentea/run_forcegradinput.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

rm output_forceGradInput.log

./caffe/build/tools/caffe time --model=../caffe/proto_forceGradInput/conv1.prototxt --iterations=10 --gpu 0 --logtostderr=1 >>output_forceGradInput.log 2>&1
./caffe/build/tools/caffe time --model=../caffe/proto_forceGradInput/conv2.prototxt --iterations=10 --gpu 0 --logtostderr=1 >>output_forceGradInput.log 2>&1
./caffe/build/tools/caffe time --model=../caffe/proto_forceGradInput/conv3.prototxt --iterations=10 --gpu 0 --logtostderr=1 >>output_forceGradInput.log 2>&1
./caffe/build/tools/caffe time --model=../caffe/proto_forceGradInput/conv4.prototxt --iterations=10 --gpu 0 --logtostderr=1 >>output_forceGradInput.log 2>&1
./caffe/build/tools/caffe time --model=../caffe/proto_forceGradInput/conv5.prototxt --iterations=10 --gpu 0 --logtostderr=1 >>output_forceGradInput.log 2>&1
./caffe/build/tools/caffe time --model=../caffe/proto_forceGradInput/conv1.prototxt --iterations=10 --gpu 1 --logtostderr=1 >>output_forceGradInput.log 2>&1
./caffe/build/tools/caffe time --model=../caffe/proto_forceGradInput/conv2.prototxt --iterations=10 --gpu 1 --logtostderr=1 >>output_forceGradInput.log 2>&1
./caffe/build/tools/caffe time --model=../caffe/proto_forceGradInput/conv3.prototxt --iterations=10 --gpu 1 --logtostderr=1 >>output_forceGradInput.log 2>&1
./caffe/build/tools/caffe time --model=../caffe/proto_forceGradInput/conv4.prototxt --iterations=10 --gpu 1 --logtostderr=1 >>output_forceGradInput.log 2>&1
./caffe/build/tools/caffe time --model=../caffe/proto_forceGradInput/conv5.prototxt --iterations=10 --gpu 1 --logtostderr=1 >>output_forceGradInput.log 2>&1
9 changes: 9 additions & 0 deletions greentea/run_forcegradinput_cuda.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

rm output_forceGradInput.log

./caffe/build/tools/caffe time --model=../caffe/proto_forceGradInput/conv1.prototxt --iterations=10 --gpu 0 --logtostderr=1 >>output_forceGradInput.log 2>&1
./caffe/build/tools/caffe time --model=../caffe/proto_forceGradInput/conv2.prototxt --iterations=10 --gpu 0 --logtostderr=1 >>output_forceGradInput.log 2>&1
./caffe/build/tools/caffe time --model=../caffe/proto_forceGradInput/conv3.prototxt --iterations=10 --gpu 0 --logtostderr=1 >>output_forceGradInput.log 2>&1
./caffe/build/tools/caffe time --model=../caffe/proto_forceGradInput/conv4.prototxt --iterations=10 --gpu 0 --logtostderr=1 >>output_forceGradInput.log 2>&1
./caffe/build/tools/caffe time --model=../caffe/proto_forceGradInput/conv5.prototxt --iterations=10 --gpu 0 --logtostderr=1 >>output_forceGradInput.log 2>&1
9 changes: 5 additions & 4 deletions greentea/run_imagenet.sh
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash
rm output_*.log
./caffe/build/tools/caffe time --model=../caffe/imagenet_winners/alexnet.prototxt --iterations=10 --gpu 0 --logtostderr=1 >>output_alexnet.log 2>&1
./caffe/build/tools/caffe time --model=../caffe/imagenet_winners/overfeat.prototxt --iterations=10 --gpu 0 --logtostderr=1 >>output_overfeat.log 2>&1
./caffe/build/tools/caffe time --model=../caffe/imagenet_winners/vgg_a.prototxt --iterations=10 --gpu 0 --logtostderr=1 >>output_vgg_a.log 2>&1
./caffe/build/tools/caffe time --model=./imagenet_winners/googlenet.prototxt --iterations=10 --gpu 0 --logtostderr=1 >>output_googlenet.log 2>&1
./caffe/build/tools/caffe time --model=../caffe/imagenet_winners/alexnet.prototxt --iterations=10 --gpu 1 --logtostderr=1 >>output_alexnet.log 2>&1
./caffe/build/tools/caffe time --model=../caffe/imagenet_winners/overfeat.prototxt --iterations=10 --gpu 1 --logtostderr=1 >>output_overfeat.log 2>&1
./caffe/build/tools/caffe time --model=../caffe/imagenet_winners/vgg_a.prototxt --iterations=10 --gpu 1 --logtostderr=1 >>output_vgg_a.log 2>&1
./caffe/build/tools/caffe time --model=./imagenet_winners/googlenet.prototxt --iterations=10 --gpu 1 --logtostderr=1 >>output_googlenet.log 2>&1


8 changes: 8 additions & 0 deletions greentea/run_imagenet_cuda.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
rm output_*.log
./caffe/build/tools/caffe time --model=../caffe/imagenet_winners/alexnet.prototxt --iterations=10 --gpu 0 --logtostderr=1 >>output_alexnet.log 2>&1
./caffe/build/tools/caffe time --model=../caffe/imagenet_winners/overfeat.prototxt --iterations=10 --gpu 0 --logtostderr=1 >>output_overfeat.log 2>&1
./caffe/build/tools/caffe time --model=../caffe/imagenet_winners/vgg_a.prototxt --iterations=10 --gpu 0 --logtostderr=1 >>output_vgg_a.log 2>&1
./caffe/build/tools/caffe time --model=./imagenet_winners/googlenet.prototxt --iterations=10 --gpu 0 --logtostderr=1 >>output_googlenet.log 2>&1


11 changes: 6 additions & 5 deletions greentea/run_nogradinput.sh
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/bin/bash
rm output_noGradInput.log
./caffe/build/tools/caffe time --model=../caffe/proto_noGradInput/conv1.prototxt --iterations=10 --gpu 0 --logtostderr=1 >>output_noGradInput.log 2>&1
./caffe/build/tools/caffe time --model=../caffe/proto_noGradInput/conv2.prototxt --iterations=10 --gpu 0 --logtostderr=1 >>output_noGradInput.log 2>&1
./caffe/build/tools/caffe time --model=../caffe/proto_noGradInput/conv3.prototxt --iterations=10 --gpu 0 --logtostderr=1 >>output_noGradInput.log 2>&1
./caffe/build/tools/caffe time --model=../caffe/proto_noGradInput/conv4.prototxt --iterations=10 --gpu 0 --logtostderr=1 >>output_noGradInput.log 2>&1
./caffe/build/tools/caffe time --model=../caffe/proto_noGradInput/conv5.prototxt --iterations=10 --gpu 0 --logtostderr=1 >>output_noGradInput.log 2>&1
./caffe/build/tools/caffe time --model=../caffe/proto_noGradInput/conv1.prototxt --iterations=10 --gpu 1 --logtostderr=1 >>output_noGradInput.log 2>&1
./caffe/build/tools/caffe time --model=../caffe/proto_noGradInput/conv2.prototxt --iterations=10 --gpu 1 --logtostderr=1 >>output_noGradInput.log 2>&1
./caffe/build/tools/caffe time --model=../caffe/proto_noGradInput/conv3.prototxt --iterations=10 --gpu 1 --logtostderr=1 >>output_noGradInput.log 2>&1
./caffe/build/tools/caffe time --model=../caffe/proto_noGradInput/conv4.prototxt --iterations=10 --gpu 1 --logtostderr=1 >>output_noGradInput.log 2>&1
./caffe/build/tools/caffe time --model=../caffe/proto_noGradInput/conv5.prototxt --iterations=10 --gpu 1 --logtostderr=1 >>output_noGradInput.log 2>&1


9 changes: 9 additions & 0 deletions greentea/run_nogradinput_cuda.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
rm output_noGradInput.log
./caffe/build/tools/caffe time --model=../caffe/proto_noGradInput/conv1.prototxt --iterations=10 --gpu 0 --logtostderr=1 >>output_noGradInput.log 2>&1
./caffe/build/tools/caffe time --model=../caffe/proto_noGradInput/conv2.prototxt --iterations=10 --gpu 0 --logtostderr=1 >>output_noGradInput.log 2>&1
./caffe/build/tools/caffe time --model=../caffe/proto_noGradInput/conv3.prototxt --iterations=10 --gpu 0 --logtostderr=1 >>output_noGradInput.log 2>&1
./caffe/build/tools/caffe time --model=../caffe/proto_noGradInput/conv4.prototxt --iterations=10 --gpu 0 --logtostderr=1 >>output_noGradInput.log 2>&1
./caffe/build/tools/caffe time --model=../caffe/proto_noGradInput/conv5.prototxt --iterations=10 --gpu 0 --logtostderr=1 >>output_noGradInput.log 2>&1