官术网_书友最值得收藏!

Installing cuda

  1. Execute the following command to execute cuda:
sudo apt-get install -y cuda
  1. Check that cuda is installed and run a basic program:
ls /usr/local/cuda-8.0
bin extras lib64 libnvvp nvml README share targets version.txt
doc include libnsight LICENSE nvvm samples src tools
  1. Let's run one of the cuda samples after compiling it locally:
export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64\${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
cd /usr/local/cuda-8.0/samples/5_Simulations/nbody
  1. Compile the sample and run it as follows:
sudo make

./nbody

You will see output similar to the following listing:

Run "nbody -benchmark [-numbodies=<numBodies>]" to measure performance.
-fullscreen (run n-body simulation in fullscreen mode)
-fp64 (use double precision floating point values for simulation)
-hostmem (stores simulation data in host memory)
-benchmark (run benchmark to measure performance)
-numbodies=<N> (number of bodies (>= 1) to run in simulation)
-device=<d> (where d=0,1,2.... for the CUDA device to use)
-numdevices=<i> (where i=(number of CUDA devices > 0) to use for simulation)
-compare (compares simulation results running once on the default GPU and once on the CPU)
-cpu (run n-body simulation on the CPU)
-tipsy=<file.bin> (load a tipsy model file for simulation)
  1. Next we install cudnn, which is a deep learning library from NVIDIA. You can find more information at https://developer.nvidia.com/cudnn.

主站蜘蛛池模板: 天祝| 浮梁县| 无棣县| 黎川县| 太白县| 盘山县| 遂宁市| 苏尼特右旗| 平安县| 桐乡市| 通山县| 大足县| 西乌| 林西县| 新昌县| 淮阳县| 东乡县| 聂荣县| 竹北市| 尼勒克县| 阜城县| 星座| 商洛市| 宜君县| 青岛市| 铁岭市| 元朗区| 周至县| 临武县| 饶河县| 曲沃县| 谢通门县| 永福县| 荥经县| 晋中市| 陇南市| 瑞安市| 二手房| 蒙山县| 新河县| 确山县|