Skip to content
Robert edited this page Sep 1, 2015 · 7 revisions

Requirements

  1. clBLAS (development version preferred)
  2. openblas

Get the Source Code

git clone https://github.com/lunochod/caffe.git

Configure and Build the Debug Version with OpenCL Support

mkdir -p caffe/build/OpenCL

cd caffe/build/OpenCL

cmake -DBLAS=open -DUSE_OPENCL=ON -DUSE_CLGEMM=ON -DCMAKE_BUILD_TYPE=Debug -DUSE_TIMER=ON -DCMAKE_INSTALL_PREFIX=debug -DclBLAS_INCLUDE_DIR=<path to clBLAS>/include -DclBLAS_LIB=<path to clBLAS>/lib/libclBLAS.so ../../

make -j4

make -j4 test.testbin

make convert_cifar_data

make install

Configure and Build the Release Version with OpenCL Support

mkdir -p caffe/build/OpenCL

cd caffe/build/OpenCL

cmake -DBLAS=open -DUSE_OPENCL=ON -DUSE_CLGEMM=ON -DCMAKE_BUILD_TYPE=Release -DUSE_TIMER=OFF -DCMAKE_INSTALL_PREFIX=release -DclBLAS_INCLUDE_DIR=<path to clBLAS>/include -DclBLAS_LIB=<path to clBLAS>/lib/libclBLAS.so ../../

make -j4

make -j4 test.testbin

make convert_cifar_data

make install

Run the Unit Tests

cd release

./bin/test.testbin

Run CIFAR10 Example

cd debug

./examples/cifar10/create_cifar10.sh

./examples/cifar10/train_quick.sh