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

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.

主站蜘蛛池模板: 施秉县| 新巴尔虎右旗| 宝应县| 基隆市| 寿宁县| 韶关市| 玉林市| 凉山| 剑川县| 东阿县| 隆安县| 沙田区| 靖远县| 民县| 太白县| 正定县| 和静县| 安康市| 武邑县| 建德市| 新泰市| 襄城县| 许昌市| 崇义县| 镇康县| 尉犁县| 钦州市| 都昌县| 朝阳市| 建宁县| 新巴尔虎右旗| 柳林县| 海兴县| 北海市| 道孚县| 会东县| 黑水县| 乡宁县| 拉萨市| 云安县| 桃江县|