The GPU Environment Check app is an interactive tool to verify and set
up the GPU code generation environment on your development computer and hardware
platforms such as the NVIDIA® DRIVE and Jetson. To start the app, enter
gpucoderSetup
in the MATLAB® Command Window. You can:
Verify your development computer environment for all the NVIDIA compilers and libraries required for GPU code generation.
Perform basic code generation and execution tests on the development 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 cuDNN or TensorRT libraries.
Connect to 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.
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 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.
Select Hardware | Description |
---|---|
| 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 drop-down list 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. |
The Select GPU drop-down list enables you to select among
multiple GPU devices. When there are multiple devices, the first device is the
default. This option is visible only when the Select
Hardware option is set to Host (for
MEX)
. If the DRIVE and Jetson hardware has multiple GPUs, use
the GPU Device ID option available in the Board
Settings panel
to select a particular GPU device.
Specify the connection parameters for hardware platforms such as the
NVIDIA DRIVE and Jetson. The app uses the jetson
or drive
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).
Menu Item | 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. |
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.
Menu Item | 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.
Menu Item | 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.
Menu Item | 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 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.
GPU
Coder | GPU
Environment Check | codegen
| coder.checkGpuInstall
| coder.gpuEnvConfig