NVIDIA Tegra
NVIDIA DRIVE OS 5.1 Linux SDK

Developer Guide
5.1.12.0 Release


 
Deep Learning Accelerator Programming Interface (nvm_dlaSample)
 
Architecture
Running the Sample Application
Command Line Switches
Examples
The NvMedia nvm_dlaSample sample application demonstrates how to use the NvMedia Deep Learning Accelerator (DLA) APIs to perform deep learning inference operations. The sample uses the NVIDIA® SoC DLA hardware engine.
For related information, see Deep Learning Accelerator in Understanding NvMedia.
The nvm_dlaSample application has two testing modes:
1. Runtime mode.
Single thread.
Demonstrates how to create and initialize DLA instances.
Demonstrates how to run DLA with provided input data and network.
2. SciSync mode.
Single thread.
Demonstrates how to create and initialize DLA instances.
Demonstrates how to run DLA with provided input data and network.
3. Ping mode.
Pings the specified instance, if it exists.
Architecture
The following diagram shows the architecture of the nvm_dlaSample application.
C:\Users\emilyh\AppData\Local\Microsoft\Windows\INetCache\Content.MSO\A47193D0.tmp
The following diagram shows the architecture of SciSync mode:
C:\Users\emilyh\AppData\Local\Microsoft\Windows\INetCache\Content.MSO\65B2BA5E.tmp
The CPU Signaler generates NvSciFence and sends it to the DLA Worker. Later, CPU signaler signals these NvSciFences.
The DLA worker:
Sets the NvSciFence from CPU Signaler as previous fence. Submits tasks to DLA.
Submits tasks to the DLA instance.
Gets EOF fences from the DLA instance and sends it to CPU Waiter.
CPU water waits on the fences from DLA Worker.
Running the Sample Application
Prerequisites
You have followed the procedures in Building and Running the NvMedia Samples in NvMedia Sample Applications.
To run the sample
1. Navigate to:
samples/nvmedia/dla_sample/
2. Launch the application:
$ nvm_dlaSample -mode runtime -d instanceId -n numTasks --loadable /path/to/loadable
Command Line Switches
This is the nvm_dlaSample command syntax:
$ nvm_dlaSample [-h] [-v <Logging Level>] [--mode <Mode>] [-d <Instance ID>] [-n numTasks>] [--loadable /path/to/loadable]
The following table describes the command line switches.
 
Switch
Parameter
Description
-h
N/A
Displays guidance on using this application.
-d
[Instance ID]
Specifies the hardware engine ID on which to run the test. The value may be 0 or 1. The default is 0.
-n
[numTasks]
Specifies the number of simultaneous tasks that can be sent to a DLA instance.
--mode
[mode]
Specifies the mode of the test to run. The value may be:
runtime
scisync
ping
--loadable
[path]
Path to the loadable file.
-v
N/A
Enables verbose descriptions.
Examples
Ping mode
$ nvm_dlaSample --mode ping
Runtime mode
$ nvm_dlaSample --mode runtime -d 0 -n 8 -loadable /path/to/loadable
Scisync mode
$ nvm_dlaSample --mode scisync -d 0 -n 8 -loadable /path/to/loadable