Nvidia cuda installation guide

Nvidia cuda installation guide

Installation guide for CUDA for the DRIVE OS release.

CUDA Toolkit Installation Instructions

The Safety toolkit is used primarily by customers going to Production with the Safety Certified DriveOS binaries and libraries and complying with the DriveOS Safety Manual.

The safety build, aarch64-QNX-safety , is only supported on QNX OS. The software stack is designed according to standard safety software development practices. This document assumes you have a safety-hardened stack running on QNX OS and safety-certified hardware.

CUDA runtime library

CUDA math library (no other CUDA libraries)

The safety build does not support CUDA developer tools. The users of the CUDA software stack are expected to debug the GPU software by building the software for aarch64-QNX.

The safety toolkit allows you to do the following:

Install more than one parallel safety toolkits on the same machine.

Use the safety certified NVCC compiler to build the application using standard QNX DriveOS build for debugging using CUDA development tools.

Terms and abbreviations:

Pre-installation Actions

Verify the system has a CUDA-capable GPU.

Verify the system is running a supported version of Linux.

Verify the system has the correct kernel headers and development packages installed.

Verify the system has a host compiler such as qcc for QNX or gcc for Linux.

Verify the host system has at least 10GB free on the root partition.

  • Download the NVIDIA CUDA Toolkit.
  • Verify You Have a CUDA-Capable GPU

    To verify that your GPU is CUDA-capable, go to your distribution’s equivalent of System Properties, or, from the command line, enter:

    If you do not see any settings, update the PCI hardware database that Linux maintains by entering update-pciids (generally found in /sbin ) at the command line and rerun the previous lspci command.

    If your graphics card is from NVIDIA and it is listed in http://developer.nvidia.com/cuda-gpus, your GPU is CUDA-capable.

    The Release Notes for the CUDA Toolkit also contain a list of supported products.

    Verify You Have a Supported Version of Linux

    The CUDA Development Tools are only supported on specific distributions of Linux. The CUDA Safety toolkit is only supported on Ubuntu 18.04.

    To determine which distribution and release number you’re running, type the following at the command line:

    Verify the System Has the Correct Kernel Headers and Development Packages Installed

    Ubuntu

    Host Installation

    Basic instructions can be found in the Quick Start Guide. Read on for more detailed instructions.

    Overview

    The Package Manager installation interfaces with your system’s package management system. When using Deb, the downloaded package is a repository package. Such a package only informs the package manager where to find the actual installation packages, but will not install them.

    If those packages are available in an online repository, they will be automatically downloaded in a later step. Otherwise, the repository package also installs a local repository containing the installation packages on the system. Whether the repository is available online or installed locally, the installation procedure is identical and made of several steps.

    See Ubuntu for installation instructions, below.

    Finally, some helpful package manager capabilities are detailed.

    These instructions are for native development only. For cross-platform development, see the CUDA Cross Development Installation section.

    Ubuntu

    Install repository meta-data

    Installing the CUDA public GPG key

    When installing using the local repo:

    When installing using network repo on Ubuntu 18.04:

    Update the Apt repository cache

    Additional Package Manager Capabilities

    Below are some additional capabilities of the package manager that users can take advantage of.

    Available Packages

    The recommended installation package is the cuda package. This package will install the full set of other CUDA packages required for native development and should cover most scenarios.

    The cuda package installs all the available packages for native development. That includes the compiler, the debugger, the profiler, the math libraries, and so on. For x86_64 platforms, this also includes the visual profiler. It also includes the NVIDIA driver package.

    Читайте также:  Arm процессор для linux

    On supported platforms, the cuda-cross-armhf , cuda-cross-aarch64 , and cuda-cross-ppc64el packages install all the packages required for cross-platform development to ARMv7, ARMv8, and POWER8, respectively. The libraries and header files of the target architecture’s display driver package are also installed to enable the cross compilation of driver applications. The cuda-cross- packages do not install the native display driver.

    The packages installed by the packages above can also be installed individually by specifying their names explicitly. The list of available packages be can obtained with:

    Package Upgrades

    The cuda package points to the latest stable release of the CUDA Toolkit. When a new version is available, use the following command to upgrade the toolkit and driver:

    The cuda-drivers package points to the latest driver release available in the CUDA repository. When a new version is available, use the following command to upgrade the driver:

    Some desktop environments, such as GNOME or KDE, will display an notification alert when new packages are available.

    To avoid any automatic upgrade and lock down the toolkit installation to the X.Y release, install the cuda-X-Y or cuda-cross—X-Y package.

    Side-by-side installations are supported. For instance, to install both the X.Y CUDA Toolkit and the X.Y+1 CUDA Toolkit, install the cuda-X.Y and cuda-X.Y+1 packages.

    Meta Packages

    Meta packages are RPM/Deb packages which contain no (or few) files but have multiple dependencies. They are used to install many CUDA packages when you may not know the details of the packages you want. Below is the list of meta packages.

    Table 1. Meta Packages Available for CUDA 10.2
    Meta Package Purpose
    cuda Installs all CUDA Toolkit and Driver packages. Handles upgrading to the next version of the cuda package when it’s released.
    cuda- 10 — 2 Installs all CUDA Toolkit and Driver packages. Remains at version 10.2 until an additional version of CUDA is installed.
    cuda-toolkit- 10 — 2 Installs all CUDA Toolkit packages required to develop CUDA applications. Does not include the driver.
    cuda-tools- 10 — 2 Installs all CUDA command line and visual tools.
    cuda-runtime- 10 — 2 Installs all CUDA Toolkit packages required to run CUDA applications, as well as the Driver packages.
    cuda-compiler- 10 — 2 Installs all CUDA compiler packages.
    cuda-libraries- 10 — 2 Installs all runtime CUDA Library packages.
    cuda-libraries-dev- 10 — 2 Installs all development CUDA Library packages.
    cuda-drivers Installs all Driver packages. Handles upgrading to the next version of the Driver packages when they’re released.

    Cross Development Installation

    Perform the following steps to install CUDA for Safety.

    • cross-qnx-standard
    • cross-qnx-safe
    • minimal-safe-toolkit

    Run the following commands, substituting the build number for n:

    Target File Installation

    The target files will be installed on the host system at /usr/local/cuda-targets . You will need to copy these files onto the target file system.

    Post-installation Actions

    The post-installation actions must be manually performed. These actions are split into mandatory, recommended, and optional sections.

    Mandatory Actions

    Some actions must be taken after the installation before the CUDA Toolkit and Driver can be used.

    Verify the installation was performed correctly by running the following command included in the cross safety packages:

    Environment Setup

    To add this path to the PATH variable:

    In addition, when using the runfile installation method, the LD_LIBRARY_PATH variable needs to contain /usr/local/cuda-safe- 10.2 /lib64 on a 64-bit system, or /usr/local/cuda-safe- 10.2 /lib on a 32-bit system

    To change the environment variables for 64-bit operating systems:

    To change the environment variables for 32-bit operating systems:

    Note that the above paths change when using a custom install path with the runfile installation method.

    Other actions are recommended to verify the integrity of the installation.

    Install Writable Samples

    Verify the Installation

    Before continuing, it is important to verify that the CUDA toolkit can find and communicate correctly with the CUDA-capable hardware. To do this, you need to compile and run some of the included sample programs.

    Compiling the Examples

    The version of the CUDA Toolkit can be checked by running nvcc -V in a terminal window. The nvcc command runs the compiler driver that compiles CUDA programs. It calls the host compiler such as qcc or gcc for C code and the NVIDIA PTX compiler for the CUDA code.

    The NVIDIA CUDA Toolkit includes sample programs in source form. You should compile them by changing to

    /NVIDIA_CUDA- 10.2 _Samples and typing make . The resulting binaries will be placed under

    /NVIDIA_CUDA- 10.2 _Samples/bin .

    Running the Binaries

    After compilation, find and run deviceQuery under

    /NVIDIA_CUDA- 10.2 _Samples . If the CUDA software is installed and configured correctly, the output for deviceQuery should look similar to that shown in Figure 1.

    The exact appearance and the output lines might be different on your system. The important outcomes are that a device was found (the first highlighted line), that the device matches the one on your system (the second highlighted line), and that the test passed (the final highlighted line).

    If a CUDA-capable device and the CUDA Driver are installed but deviceQuery reports that no CUDA-capable devices are present, this likely means that the /dev/nvidia* files are missing or have the wrong permissions.

    Running the bandwidthTest program ensures that the system and the CUDA-capable device are able to communicate correctly. Its output is shown in Figure 2.

    Note that the measurements for your CUDA-capable device description will vary from system to system. The important point is that you obtain measurements, and that the second-to-last line (in Figure 2) confirms that all necessary tests passed.

    If the tests do not pass, make sure you have a CUDA-capable NVIDIA GPU on your system and make sure it is properly installed.

    If you run into difficulties with the link step (such as libraries not being found), consult the Linux Release Notes found in the doc folder in the CUDA Samples directory.

    Removing CUDA Toolkit and Driver

    Follow the below steps to properly uninstall the CUDA Toolkit and NVIDIA Drivers from your system. These steps will ensure that the uninstallation will be clean.

    Ubuntu

    Troubleshooting

    This section lists several scenarios in which anomalous conditions cause unintended results, and possible solutions.

    Situation: The user provides the wrong input.

    Response: dpkg / apt will produce an error indicating the instructions were incorrect and not take any action. Consult the documentation for more information.

    Situation: The system reboots in the middle of an install.

    Response: The install will fail. Any installed packages should be purged using sudo dpkg —purge and the installation should be triggered again.

    Response: Purge (using sudo dpkg —purge ) any installed packages and attempt a reinstall. If the problem persists, try on a different host system. If it still persists, check for legitimate corruption by comparing the md5sum hash of the downloaded installer to the expected md5sum hash of the download.

    Response: Ensure the required files are in the correct directories.

    Response: Import the required key.

    Response: Add disk space and retry the installation.

    Notice

    THE INFORMATION IN THIS GUIDE AND ALL OTHER INFORMATION CONTAINED IN NVIDIA DOCUMENTATION REFERENCED IN THIS GUIDE IS PROVIDED “AS IS.” NVIDIA MAKES NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO THE INFORMATION FOR THE PRODUCT, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. Notwithstanding any damages that customer might incur for any reason whatsoever, NVIDIA’s aggregate and cumulative liability towards customer for the product described in this guide shall be limited in accordance with the NVIDIA terms and conditions of sale for the product.

    THE NVIDIA PRODUCT DESCRIBED IN THIS GUIDE IS NOT FAULT TOLERANT AND IS NOT DESIGNED, MANUFACTURED OR INTENDED FOR USE IN CONNECTION WITH THE DESIGN, CONSTRUCTION, MAINTENANCE, AND/OR OPERATION OF ANY SYSTEM WHERE THE USE OR A FAILURE OF SUCH SYSTEM COULD RESULT IN A SITUATION THAT THREATENS THE SAFETY OF HUMAN LIFE OR SEVERE PHYSICAL HARM OR PROPERTY DAMAGE (INCLUDING, FOR EXAMPLE, USE IN CONNECTION WITH ANY NUCLEAR, AVIONICS, LIFE SUPPORT OR OTHER LIFE CRITICAL APPLICATION). NVIDIA EXPRESSLY DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR SUCH HIGH RISK USES. NVIDIA SHALL NOT BE LIABLE TO CUSTOMER OR ANY THIRD PARTY, IN WHOLE OR IN PART, FOR ANY CLAIMS OR DAMAGES ARISING FROM SUCH HIGH RISK USES.

    NVIDIA makes no representation or warranty that the product described in this guide will be suitable for any specified use without further testing or modification. Testing of all parameters of each product is not necessarily performed by NVIDIA. It is customer’s sole responsibility to ensure the product is suitable and fit for the application planned by customer and to do the necessary testing for the application in order to avoid a default of the application or the product. Weaknesses in customer’s product designs may affect the quality and reliability of the NVIDIA product and may result in additional or different conditions and/or requirements beyond those contained in this guide. NVIDIA does not accept any liability related to any default, damage, costs or problem which may be based on or attributable to: (i) the use of the NVIDIA product in any manner that is contrary to this guide, or (ii) customer product designs.

    Other than the right for customer to use the information in this guide with the product, no other license, either expressed or implied, is hereby granted by NVIDIA under this guide. Reproduction of information in this guide is permissible only if reproduction is approved by NVIDIA in writing, is reproduced without alteration, and is accompanied by all associated conditions, limitations, and notices.

    Acknowledgments

    NVIDIA extends thanks to Professor Mike Giles of Oxford University for providing the initial code for the optimized version of the device implementation of the double-precision exp() function found in this release of the CUDA toolkit.

    NVIDIA acknowledges Scott Gray for his work on small-tile GEMM kernels for Pascal. These kernels were originally developed for OpenAI and included since cuBLAS 8.0.61.2.

    Notice

    THE INFORMATION IN THIS GUIDE AND ALL OTHER INFORMATION CONTAINED IN NVIDIA DOCUMENTATION REFERENCED IN THIS GUIDE IS PROVIDED “AS IS.” NVIDIA MAKES NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO THE INFORMATION FOR THE PRODUCT, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. Notwithstanding any damages that customer might incur for any reason whatsoever, NVIDIA’s aggregate and cumulative liability towards customer for the product described in this guide shall be limited in accordance with the NVIDIA terms and conditions of sale for the product.

    THE NVIDIA PRODUCT DESCRIBED IN THIS GUIDE IS NOT FAULT TOLERANT AND IS NOT DESIGNED, MANUFACTURED OR INTENDED FOR USE IN CONNECTION WITH THE DESIGN, CONSTRUCTION, MAINTENANCE, AND/OR OPERATION OF ANY SYSTEM WHERE THE USE OR A FAILURE OF SUCH SYSTEM COULD RESULT IN A SITUATION THAT THREATENS THE SAFETY OF HUMAN LIFE OR SEVERE PHYSICAL HARM OR PROPERTY DAMAGE (INCLUDING, FOR EXAMPLE, USE IN CONNECTION WITH ANY NUCLEAR, AVIONICS, LIFE SUPPORT OR OTHER LIFE CRITICAL APPLICATION). NVIDIA EXPRESSLY DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR SUCH HIGH RISK USES. NVIDIA SHALL NOT BE LIABLE TO CUSTOMER OR ANY THIRD PARTY, IN WHOLE OR IN PART, FOR ANY CLAIMS OR DAMAGES ARISING FROM SUCH HIGH RISK USES.

    NVIDIA makes no representation or warranty that the product described in this guide will be suitable for any specified use without further testing or modification. Testing of all parameters of each product is not necessarily performed by NVIDIA. It is customer’s sole responsibility to ensure the product is suitable and fit for the application planned by customer and to do the necessary testing for the application in order to avoid a default of the application or the product. Weaknesses in customer’s product designs may affect the quality and reliability of the NVIDIA product and may result in additional or different conditions and/or requirements beyond those contained in this guide. NVIDIA does not accept any liability related to any default, damage, costs or problem which may be based on or attributable to: (i) the use of the NVIDIA product in any manner that is contrary to this guide, or (ii) customer product designs.

    Other than the right for customer to use the information in this guide with the product, no other license, either expressed or implied, is hereby granted by NVIDIA under this guide. Reproduction of information in this guide is permissible only if reproduction is approved by NVIDIA in writing, is reproduced without alteration, and is accompanied by all associated conditions, limitations, and notices.

    Trademarks

    NVIDIA, the NVIDIA logo, and cuBLAS, CUDA, CUDA-GDB, CUDA-MEMCHECK, cuDNN, cuFFT, cuSPARSE, DIGITS, DGX, DGX-1, DGX Station, NVIDIA DRIVE, NVIDIA DRIVE AGX, NVIDIA DRIVE Software, NVIDIA DRIVE OS, NVIDIA Developer Zone (aka «DevZone»), GRID, Jetson, NVIDIA Jetson Nano, NVIDIA Jetson AGX Xavier, NVIDIA Jetson TX2, NVIDIA Jetson TX2i, NVIDIA Jetson TX1, NVIDIA Jetson TK1, Kepler, NGX, NVIDIA GPU Cloud, Maxwell, Multimedia API, NCCL, NVIDIA Nsight Compute, NVIDIA Nsight Eclipse Edition, NVIDIA Nsight Graphics, NVIDIA Nsight Systems, NVLink, nvprof, Pascal, NVIDIA SDK Manager, Tegra, TensorRT, Tesla, Visual Profiler, VisionWorks and Volta are trademarks and/or registered trademarks of NVIDIA Corporation in the United States and other countries. Other company and product names may be trademarks of the respective companies with which they are associated.

    В© 2020 — 2020 NVIDIA Corporation. All rights reserved.

    Источник

    Adblock
    detector