The GPU Environment Check app is an interactive tool to verify and set up the GPU code generation environment on your development computer and embedded hardware platforms such as the NVIDIA® DRIVE and Jetson.
To start the app, in the MATLAB® Command Window, enter:
gpucoderSetup
Verify the host development computer environment for the NVIDIA compilers and libraries necessary for GPU code generation.
Perform basic code generation and test the execution of the generated code on the GPU device in the host computer. The tests validate code execution by comparing the results with MATLAB simulation.
Perform deep learning code generation and execution tests on the development computer. You can target the NVIDIA cuDNN or TensorRT libraries. Requires the GPU Coder™ Interface for Deep Learning Libraries support package.
Connect to embedded NVIDIA boards such as DRIVE and Jetson to perform code generation and execution tests. Requires the GPU Coder Support Package for NVIDIA GPUs.
Specify the location of the libraries and generate a MATLAB script that sets up the environment variables required by GPU Coder.
Note
The gpucoderSetup
app generates a report file in the current
folder. If you do not have write permissions in the current folder, before running the
app, change the folder by using the MATLAB
cd
command.
The Check/Setup panel of the app provides drop-down lists that enable you to select a GPU device on the host development computer or hardware platforms such as the NVIDIA DRIVE and Jetson.
Option | Values | Description |
---|---|---|
Select Hardware |
| Perform code generation, code execution, and environment checks on the host development computer. The app generates CUDA® MEX to perform tests. If your development computer has multiple GPU devices, use the Select GPU option to select an appropriate GPU device. |
| Perform code generation and code execution checks on an NVIDIA DRIVE target platform. After installing the GPU Coder Support Package for NVIDIA GPUs, use the Board Settings panel to specify connection parameters for the target. | |
| Perform code generation and code execution checks on an NVIDIA Jetson target platform. After installing the GPU Coder Support Package for NVIDIA GPUs, use the Board Settings panel to specify connection parameters for the target. | |
Select GPU |
| Select the GPU device to run tests. When there are multiple devices, the first device is the default. This option is visible only when
the Select Hardware option is set to |
Specify the connection parameters for hardware platforms such as the NVIDIA DRIVE and Jetson. The app uses the jetson
(GPU Coder Support Package for NVIDIA GPUs) or drive
(GPU Coder Support Package for NVIDIA GPUs) functions of the GPU Coder Support Package for NVIDIA GPUs to create a live hardware connection object. The support package software uses an SSH connection over TCP/IP to execute commands while building and running the generated CUDA code on the DRIVE or Jetson platforms. The target platform must be on the same network as the host computer. Alternatively, you can use an Ethernet crossover cable to connect the board directly to the host computer. For more information on requirements, setup, and configuration steps for your NVIDIA boards, see Install and Setup Prerequisites for NVIDIA Boards (GPU Coder Support Package for NVIDIA GPUs).
Option | Description |
---|---|
Device Address | IP address or host name of the hardware. For example,
To use the host name, you must connect an Ethernet cable to the Ethernet port of the board. Then, use Linux commands to configure the hardware IP address and associate the host name with the IP address. |
Username | Valid Linux® user name for the operating system on the board. |
Password | Valid password for the Linux user name specified. |
Execution Timeout | Specify the time in seconds that the app waits for before validating the execution tests on the target. The default value is 10 seconds. |
GPU Device ID | In a multi GPU environment such as NVIDIA Drive platforms, specify the CUDA GPU device to target. |
There are two types of workflow checks that you can perform by using the app:
Basic code generation and execution tests on the development computer. These tests validate code execution by comparing the results with MATLAB simulation.
Option | Description |
---|---|
Generate Code | Test basic code generation and building. This test requires a valid CUDA code generation environment on the specified hardware. |
Generate Code and Execute | Test basic code generation, building, and execution on the device in Specified Hardware. This test requires a valid CUDA code generation environment and GPU device on the specified hardware. |
SIL Profiling | Perform basic SIL profiling tests on the host computer. |
Deep learning code generation and execution tests on the development computer. You can target the cuDNN or TensorRT libraries.
Option | Description |
---|---|
Generate Code | Test deep learning code generation and building. This test requires a valid CUDA code generation environment on the specified hardware. |
Generate Code and Execute | Test deep learning code generation, building, and execution on the device in Specified Hardware. This test requires a valid CUDA code generation environment and GPU device on the specified hardware. |
Target | Specify the deep learning library to generate code for. Valid options are |
Data Type Check | Specify the precision of the tensor data type input to the network or the tensor output of a layer. To perform inference in 32-bit floats, use
|
Specify the location of the libraries for checking the CUDA development environment on your host computer. Generate a MATLAB script gpuEnvSettings.m
that sets up the environment variables required by GPU Coder. For more information, see Setting Up the Prerequisite Products.
Option | Description |
---|---|
CUDA Installation Path | Path to the CUDA toolkit installation. For example:
|
cuDNN | Path to the root folder of cuDNN library installation. For example:
|
TensorRT | Path to the root folder of TensorRT™ library installation. For example:
|
NVTX Library Path | Path to the On a standard CUDA toolkit installation, this path is usually the CUDA library folder. For example:
|
When you select Run Checks, the gpucoderSetup
app performs environment, code generation, and other checks based on the settings that you have selected. It then generates gpucoderSetupReport
report that indicates if a test has passed and provides additional information for tests that have failed. A HTML version of the report of the same name is created in the current folder.