1 # Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
3 @page core_usecase2 System and Platform Information
6 @note SW Release Applicability: This tutorial is applicable to modules in both **NVIDIA DriveWorks** and **NVIDIA DRIVE Software** releases.
8 @section core_platforminfo_gpu GPU Enumeration and Selection
10 On NVIDIA DRIVE<sup>™</sup> systems, multiple GPUs are present and available for the SDK.
11 - Integrated GPU (iGPU) is a GPU that shares the same die as the
13 - Descrete GPU (dGPU) is a separate unit connected over a PCIEX bus with
16 At runtime, user applications can enumerate and select
17 these GPUs. Most of the NVIDIA<sup>®</sup> DriveWorks modules use the currently selected GPU.
20 #include <dw/core/Context.h>
24 // enumerate all available GPUs in the system and select first available dGPU
26 dwContext_getGPUCount(&numGPUs, sdkContext);
27 for (int32_t i=0; i < numGPUsl; i++)
30 dwContext_getGPUDeviceType(&type, i, sdkContext);
33 case DW_GPU_DEVICE_DISCRETE:
34 printf("GPU %d is a dGPU, set it as current GPU\n", i);
36 dwContext_selectGPUDevice(i, sdkContext);
40 case DW_GPU_DEVICE_INTEGRATED:
41 printf("GPU %d is an iGPU\n", i);
50 @note For applications that require access to GPU memory, ensure that such applications use the correct GPU.
52 @section core_platforminfo_dla DLA Engine Selection (Xavier SoC)
54 NVIDIA DRIVE<sup>™</sup> platforms with the NVIDIA Xavier SoC provide
55 a hardware-accelerated deep learning accelerator (DLA). DLA
56 accelerates inferencing of the networks, which frees up
57 NVIDIA<sup>®</sup> CUDA<sup>®</sup> units to perform
60 The following snippet shows how to activate a specific DLA engine for inferencing of DriveNet. For a full sample,
61 see @ref dwx_drivenet_sample.
65 // check if current platform supports DLA engine
67 dwContext_getDLAEngineCount(&numDLAs, sdkContext);
70 printf("The platform does not support DLA engine\n");
74 // setup DriveNet to use DLA engine for inferencing
75 dwDriveNetParams driveNetParams = {};
77 driveNetParams.processorType = DW_PROCESSOR_TYPE_DLA_0;
79 // DLA supports only FP16 precision
80 driveNetParams.networkPrecision = DW_PRECISION_FP16;
82 dwDriveNet_initialize(&driveNet, ..., &driveNetParams, sdkContext);