GPU Enumeration and Selection
On NVIDIA DRIVE™ systems, multiple GPUs are present and available for the SDK.
- Integrated GPU (iGPU) is a GPU that shares the same die as the ARM CPU.
- Descrete GPU (dGPU) is a separate unit connected over a PCIEX bus with the main CPU.
At runtime, user applications can enumerate and select these GPUs. Most of the NVIDIA® DriveWorks modules use the currently selected GPU.
...
int32_t numGPUs = 0;
for (int32_t i=0; i < numGPUsl; i++)
{
switch (type)
{
printf("GPU %d is a dGPU, set it as current GPU\n", i);
break;
printf("GPU %d is an iGPU\n", i);
break;
default:
}
}
- Note
- For applications that require access to GPU memory, ensure that such applications use the correct GPU.
DLA Engine Selection (Xavier SoC)
NVIDIA DRIVE™ platforms with the NVIDIA Xavier SoC provide a hardware-accelerated deep learning accelerator (DLA). DLA accelerates inferencing of the networks, which frees up NVIDIA® CUDA® units to perform other tasks.
The following snippet shows how to activate a specific DLA engine for inferencing of DriveNet. For a full sample, see dwx_drivenet_sample.
int32_t numDLAs = 0;
if (numDLAs == 0)
{
printf("The platform does not support DLA engine\n");
return 0;
}
dwDriveNetParams driveNetParams = {};
...
dwDriveNet_initialize(&driveNet, ..., &driveNetParams, sdkContext);