DriveWorks SDK Reference
4.0.0 Release
For Test and Development only

Hello World Sample

Description

The Hello World sample application shows how to initialize the NVIDIA® DriveWorks SDK context and access GPU properties. This sample application prints the DriveWorks version and GPU properties.

Running the Sample

The command line for the sample application is:

./sample_hello_world

Output

The sample application prints the following information on console:

./sample_hello_world
*************************************************
Welcome to Driveworks SDK
[27-07-2021 01:50:42] Platform: Detected DDPX - Tegra A
[27-07-2021 01:50:42] TimeSource: monotonic epoch time offset is 1626982515910358
[27-07-2021 01:50:42] PTP Time is available from NVPPS Driver
[27-07-2021 01:50:42] Platform: number of GPU devices detected 2
[27-07-2021 01:50:42] Platform: currently selected GPU device discrete ID 0
[27-07-2021 01:50:42] Context::mountResourceCandidateDataPath resource FAILED to mount from '/usr/local/driveworks-4.0/bin/data/': VirtualFileSystem: Failed to mount '/usr/local/driveworks-4.0/bin/data/[.pak]'
[27-07-2021 01:50:42] Context::findDataRootInPathWalk data/DATA_ROOT found at: /usr/local/driveworks-4.0/bin/../data
[27-07-2021 01:50:42] Context::mountResourceCandidateDataPath VirtualFileSystem mounted from '/usr/local/driveworks-4.0/bin/../data/'
[27-07-2021 01:50:42] SDK: Resources mounted from /usr/local/driveworks-4.0/bin/../data/
[27-07-2021 01:50:42] SDK: Create NvMediaDevice
[27-07-2021 01:50:42] SDK: Create NvMedia2D
[27-07-2021 01:50:42] egl::Display: found 2 EGL devices
[27-07-2021 01:50:42] egl::Display: use drm device: drm-nvdc
[27-07-2021 01:50:43] Initialize DriveWorks SDK v4.0.-1-experimental
[27-07-2021 01:50:43] Experimental Release build with GNU 7.3.1 from no-gitversion-build against Drive PDK v5.1.15.2
Context of Driveworks SDK successfully initialized.
Version: 4.0.-1
GPU devices detected: 2
[27-07-2021 01:50:43] Platform: currently selected GPU device discrete ID 0
----------------------------------------------
Device: 0, Graphics Device
CUDA Driver Version / Runtime Version : 10.2 / 10.2
CUDA Capability Major/Minor version number: 7.5
Total amount of global memory in MBytes:7679.94
Memory Clock rate Khz: 1440000
Memory Bus Width bits: 256
L2 Cache Size: 4194304
Maximum 1D Texture Dimension Size (x): 131072
Maximum 2D Texture Dimension Size (x,y): 131072, 65536
Maximum 3D Texture Dimension Size (x,y,z): 16384, 16384, 16384
Maximum Layered 1D Texture Size, (x): 32768 num: 2048
Maximum Layered 2D Texture Size, (x,y): 32768, 32768 num: 2048
Total amount of constant memory bytes: 65536
Total amount of shared memory per block bytes: 49152
Total number of registers available per block: 65536
Warp size: 32
Maximum number of threads per multiprocessor: 1024
Maximum number of threads per block: 1024
Max dimension size of a thread block (x,y,z): 1024,1024,64
Max dimension size of a grid size (x,y,z): 2147483647,65535,65535
Maximum memory pitch bytes: 2147483647
Texture alignment bytes: 512
Concurrent copy and kernel execution: Yes, copy engines num: 3
Run time limit on kernels: No
Integrated GPU sharing Host Memory: No
Support host page-locked memory mapping: Yes
Alignment requirement for Surfaces: Yes
Device has ECC support: Disabled
Device supports Unified Addressing (UVA): Yes
Device PCI Domain ID: 1, Device PCI Bus ID: 1, Device PCI location ID: 0
Compute Mode: Default (multiple host threads can use ::cudaSetDevice() with device simultaneously)
Concurrent kernels: 1
Concurrent memory: 0

[27-07-2021 01:50:43] Platform: currently selected GPU device integrated ID 1
----------------------------------------------
Device: 1, Xavier
CUDA Driver Version / Runtime Version : 10.2 / 10.2
CUDA Capability Major/Minor version number: 7.2
Total amount of global memory in MBytes:28409.2
Memory Clock rate Khz: 1109000
Memory Bus Width bits: 256
L2 Cache Size: 524288
Maximum 1D Texture Dimension Size (x): 131072
Maximum 2D Texture Dimension Size (x,y): 131072, 65536
Maximum 3D Texture Dimension Size (x,y,z): 16384, 16384, 16384
Maximum Layered 1D Texture Size, (x): 32768 num: 2048
Maximum Layered 2D Texture Size, (x,y): 32768, 32768 num: 2048
Total amount of constant memory bytes: 65536
Total amount of shared memory per block bytes: 49152
Total number of registers available per block: 65536
Warp size: 32
Maximum number of threads per multiprocessor: 2048
Maximum number of threads per block: 1024
Max dimension size of a thread block (x,y,z): 1024,1024,64
Max dimension size of a grid size (x,y,z): 2147483647,65535,65535
Maximum memory pitch bytes: 2147483647
Texture alignment bytes: 512
Concurrent copy and kernel execution: Yes, copy engines num: 1
Run time limit on kernels: No
Integrated GPU sharing Host Memory: Yes
Support host page-locked memory mapping: Yes
Alignment requirement for Surfaces: Yes
Device has ECC support: Disabled
Device supports Unified Addressing (UVA): Yes
Device PCI Domain ID: 0, Device PCI Bus ID: 0, Device PCI location ID: 0
Compute Mode: Default (multiple host threads can use ::cudaSetDevice() with device simultaneously)
Concurrent kernels: 1
Concurrent memory: 0

[27-07-2021 01:50:43] Releasing Driveworks SDK Context
[27-07-2021 01:50:43] SDK: Release NvMediaDevice
[27-07-2021 01:50:43] SDK: Release NvMedia2D
Happy autonomous driving!

Additional information

For more details see: