Ubuntu16.04 构建opencl+caffe
来源:互联网 发布:js的arguments例子 编辑:程序博客网 时间:2024/06/07 18:10
1. basic settings
sudo apt update && sudo apt upgrade to update your system.sudo apt install python-pipsudo apt install vimsudo apt install gitsudo apt install cmake
2. Install Intel OpenCL SDK and driver.
Goto https://software.intel.com/en-us/articles/opencl-drivers, download the SDK and driver package. The SDK should have a name like SRB5.0_linux64.zip, and the driver should look like intel_sdk_for_opencl_2017_7.0.0.2511_x64.tgz.
Extract the driver package.
mkdir intel-opencltar -C intel-opencl -Jxf intel-opencl-r5.0-BUILD_ID.x86_64.tar.xztar -C intel-opencl -Jxf intel-opencl-devel-r5.0-BUILD_ID.x86_64.tar.xztar -C intel-opencl -Jxf intel-opencl-cpu-r5.0-BUILD_ID.x86_64.tar.xzsudo cp -R intel-opencl/* /sudo ldconfig
3. Use Intel's CapsBasic example to test for successful installation.
download and extract capsbasic
in Makefile
add -I /opt/intel/opencl/include -L /opt/intel/opencl
make -j4./capsbasic
__________________________
4. install opencl SDK
sudo apt-get install dkmssudo ./install_GUI.sh5. install openblassudo apt-get install libopenblas-*__________________________
6. imstall dependencies
sudo apt install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler libgflags-dev libgoogle-glog-dev liblmdb-dev python-pytest python-numpysudo apt install --no-install-recommends libboost-all-dev
7. Set a directory to install clCaffe.export CAFFE_ROOT=/a/directory/you/want/clCaffeadd in /home/usr/.bashrc
8. download and compile caffe
git clone https://github.com/01org/caffe $CAFFE_ROOTcd $CAFFE_ROOTmkdir dependencies && cd dependenciesgit clone https://github.com/viennacl/viennacl-dev.gitgit clone https://github.com/intel/isaaccd viennacl-devmkdir build && cd buildcmake -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF -DCMAKE_INSTALL_PREFIX=$CAFFE_ROOT/dependencies/binaries -DOPENCL_LIBRARY=/opt/intel/opencl/libOpenCL.so ..make -j8sudo make installcd $CAFFE_ROOT/dependencies/isaacmkdir build && cd buildcmake -DCMAKE_INSTALL_PREFIX=$CAFFE_ROOT/dependencies/binaries ..make -j8sudo make installcd $CAFFE_ROOTmkdir build && cd buildexport ISAAC_HOME=$CAFFE_ROOT/dependencies/binariescmake .. -DUSE_GREENTEA=ON -DUSE_CUDA=OFF -DUSE_INTEL_SPATIAL=ON -DBUILD_docs=0 -DUSE_ISAAC=ON -DViennaCL_INCLUDE_DIR=$CAFFE_ROOT/dependencies/binaries/include -DBLAS=open -DOPENCL_LIBRARIES=/opt/intel/opencl/libOpenCL.so -DOPENCL_INCLUDE_DIRS=/opt/intel/opencl/includemake -j8
9. Test the installation../tools/caffe device_query -gpu all
and see if there are two OpenCL devices.
10. others
export PYTHONPATH=$CAFFE_ROOT/pythonsudo pip install scikit-imagesudo pip install protobufsudo pip install opencv-pythonsudo pip install lmdb
maybe:
gflags
11. pycaffecd $CAFFE_ROOT/pythonfor req in $(cat requirements.txt); do sudo -E pip install $req; done
try python import caffe to test if its right
阅读全文
0 0
- Ubuntu16.04 构建opencl+caffe
- OpenCL driver Ubuntu16.04笔记
- Caffe-OpenCL在ubuntu16.04.2上的简要安装指南
- Caffe-OpenCL在ubuntu16.04.2上的简要安装指南
- ubuntu16.04安装caffe
- Ubuntu16.04 安装caffe
- Ubuntu16.04 安装caffe
- Ubuntu16.04 Caffe安装
- Ubuntu16.04编译caffe
- Ubuntu16.04 安装Caffe
- Ubuntu16.04 安装Caffe
- ubuntu16.04 + caffe +python
- Ubuntu16.04安装Caffe
- ubuntu16.04 caffe
- ubuntu16.04 安装 caffe
- ubuntu16.04 caffe install
- ubuntu16.04 caffe
- Ubuntu16.04安装caffe
- VirtualBox中的Centos安装增强功能包VBoxLinuxAdditions和共享本机文件夹
- Android 进阶之路:常见设计模式之适配器模式
- ExtJs gridPanel实现多行选取
- 适配器模式
- 测试
- Ubuntu16.04 构建opencl+caffe
- MySQL之——MySQL5.6 my.cnf 参数说明
- 在调试里看NV驱动栈溢出导致的连环死锁
- 模拟JDK动态代理-独立逻辑代码
- 看到一篇讲的很详细的创建Maven项目然后转成动态web项目的介绍。
- 在 Ubuntu 上安装Docker
- 关于最近遇到的各种坑
- centos安装Apache
- 面试--求数组,左边的数都小于等于它,右边的数都大于等于它