zoukankan      html  css  js  c++  java
  • How to Install CUDA on NVIDIA Jetson TX1

    This guide shows you how to install CUDA on the NVIDIA Jetson TX1. Currently, Nvidia’s Jetpack installer does not work properly. This blog post will show a work-around for getting CUDA to work on the TX1.

    Download the following files inside a directory first. Here are the two links for the files that you will need to download beforehand:

    Updating your apt-get sources

    Navigate to the directory where you downloaded the files and type in:

    dpkg -i cuda-repo-l4t-r23.1-7-0-local_7.0-71_armhf.deb

    Next, you want to update the sources by typing in:

    apt-get update

    Now, your apt-get repositories will have all of the CUDA libraries and files you may need for any future modifications.

    Installing CUDA dependencies

    Next, go to the directory where you downloaded the Jetpack installer and make the file executable by typing in:

    chmod +x JetPack-L4T-2.0-linux-x64.run

    Now, run the file:

    ./JetPack-L4T-2.0-linux-x64.run

    The .run file should have unpacked its contents into a new directory called “_installer”

    Go into the _installer directory and type in:

    ./cuda-l4t.sh ../cuda-repo-l4t-r23.1-7-0-local_7.0-71_armhf.deb 7.0 7-0

    **Note that ../cuda-repo-l4t-r23.1-7-0-local_7.0-71_armhf.deb is the location of the .deb file you downloaded earlier.

    Now, you have every CUDA dependency installed. However, there are a few more things you have to do.

    NVCC as a global call

    NVCC is not linked globally (nvcc -V gives an error), and you need to do a few more things to fix this. First, let’s edit the .bashrc file.

    vim .bashrc

    The screenshot below shots what should be appended to the .bashrc file after the installation. I also put a copy of the exports below.

    “:$PATH” should be after “export PATH=/usr/local/cuda-7.0/bin”

    1

    2

    export PATH=/usr/local/cuda-7.0/bin:$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

    export LD_LIBRARY_PATH=/usr/local/cuda-7.0/lib:

    Now, execute the .bashrc file.

    source .bashrc

    Now to make sure that everything is working, type in:

    nvcc -V

    Running Some CUDA Samples

    Now, let’s run some CUDA samples and scale the GPU to max frequency.

    Scaling GPU Frequency

    You can find out your GPU rates by typing in:

    cat /sys/kernel/debug/clock/gbus/possible_rates

    Now, let’s set the GPU frequency to its maximum possible rate for some performance purposes.

    echo 998400000 > /sys/kernel/debug/clock/override.gbus/rate
    echo 1 > /sys/kernel/debug/clock/override.gbus/state
    cat /sys/kernel/debug/clock/gbus/rate

    You can lower the GPU frequency with the same steps above.

    Running the nbody simulation and smoke particles

    Navigate to the simulations (5_Simulations) directory containing both the nbody simulation and smoke particles samples:

    cd /usr/local/cuda-7.0/samples/5_Simulations/

    Now, navigate to the nbody directory and run make. Then, type in:

    ./nbody -benchmark -numbodies=65536

    The results are approximately two times the performance of the previous generation Jetson, the TK1 @ 157 GFLOPS

    Navigate to the smokeparticles directory and run make. Then type in:

    ./smokeParticles

  • 相关阅读:
    Excel表格信息导入和导出
    sql server执行一条sql时操作两张表
    解决tomcat一直报缓存值溢出等..
    GPS小数坐标不精确转换标准形式
    javac’不是内部或外部命令错误解决方法
    mysql开启远程访问命令
    solr查询条件设置
    osgb文件格式文档
    modbus4j中使用modbus tcp/ip和modbus rtu over tcp/ip模式
    Milo-OPC UA处理Subscription和Triggering
  • 原文地址:https://www.cnblogs.com/shishupeng/p/5688138.html
Copyright © 2011-2022 走看看