提交 99855c6a 编写于 作者: R Raaj 提交者: Gines

Travis build for OpenCL version (#1086)

上级 9f891d04
......@@ -79,6 +79,11 @@ matrix:
osx_image: xcode9.4 # xcode10.1 does not work with Python # Versions: https://docs.travis-ci.com/user/languages/objective-c#supported-xcode-versions
env: NAME="OSX-python-cmake-cpu-unity" WITH_CUDA=false WITH_PYTHON=true WITH_UNITY=true
sudo: required
# Mac OSX - Default - CMake - OpenCL
- os: osx
osx_image: xcode10.1 # Versions: https://docs.travis-ci.com/user/languages/objective-c#supported-xcode-versions
env: NAME="OSX-default-cmake-opencl" WITH_CUDA=false WITH_OPEN_CL=true
sudo: required
# # TO-DO: To be implemented
# # Windows
......@@ -98,11 +103,11 @@ matrix:
# dist: xenial
# env: NAME="U16-default-cmake-cpu-mkl" WITH_CUDA=false WITH_MKL=true
# sudo: required
# # Ubuntu 16.04 - Default - CMake - OpenCL
# - os: linux
# dist: xenial
# env: NAME="U16-default-cmake-opencl" WITH_CUDA=false WITH_OPEN_CL=true
# sudo: required
# Ubuntu 16.04 - Default - CMake - OpenCL
- os: linux
dist: xenial
env: NAME="U16-default-cmake-opencl" WITH_CUDA=false WITH_OPEN_CL=true
sudo: required
# # Ubuntu 16.04 - Python - CMake - OpenCL
# - os: linux
# dist: xenial
......
......@@ -30,8 +30,7 @@ if [[ $WITH_CUDA == true ]] ; then
ARGS="$ARGS -DGPU_MODE=CUDA -DCUDA_ARCH=Manual -DCUDA_ARCH_BIN=\"52\" -DCUDA_ARCH_PTX=\"\""
# OpenCL version
elif [[ $WITH_OPEN_CL == true ]] ; then
echo "OpenCL version not implemented for Travis Build yet."
exit 99
ARGS="$ARGS -DGPU_MODE=OPENCL"
# CPU version
else
ARGS="$ARGS -DGPU_MODE=CPU_ONLY"
......@@ -64,7 +63,13 @@ echo "ARGS = ${ARGS}."
cmake .. $ARGS
# Patch for OpenCL and OSX
if [[ $WITH_OPEN_CL == true && $TRAVIS_OS_NAME == "osx" ]] ; then
cd ../3rdparty/caffe; git apply ../../scripts/osx/mac_opencl_patch.txt;
cd ../../build;
fi
# Run Cmake twice for pybind to register
if [[ $WITH_PYTHON == true ]] ; then
cmake .. $ARGS
fi
fi
\ No newline at end of file
......@@ -10,6 +10,7 @@ WITH_OPEN_CL=${WITH_OPEN_CL:-false}
WITH_MKL=${WITH_MKL:-false}
WITH_UNITY=${WITH_UNITY:-false}
WITH_DEBUG=${WITH_DEBUG:-false}
TRAVIS_OS_NAME=${TRAVIS_OS_NAME}
# Examples should be run (Travis not compatible with GPU code)
# if [[ $WITH_CMAKE == true ]] && [[ $WITH_PYTHON == true ]] && [[ $WITH_CUDA == false ]] && [[ $WITH_OPEN_CL == false ]] && [[ $WITH_MKL == false ]]; then
......
......@@ -20,3 +20,6 @@ sudo apt-get --assume-yes install python3-pip
sudo -H pip3 install --upgrade numpy protobuf opencv-python
# OpenCV 2.4 -> Added as option
# # sudo apt-get --assume-yes install libopencv-dev
# OpenCL Generic
sudo apt-get --assume-yes install opencl-headers ocl-icd-opencl-dev
sudo apt-get --assume-yes install libviennacl-dev
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册