Setup

Allocate, configure, and set up all resources before attempting any runtime calls. Due to safety requirements, NVIDIA does not recommend calling these setup APIs during runtime.

  1. Create an instance.

    Configure and create an instance of a specified DLA hardware engine using NvMediaDlaCreate(). For specific information, see Deep Learning Accelerator in Understanding NvMedia.

    Note:

    A maximum of sixteen (16) NvMedia DLA instances can be created.

  2. Initialize the instance.

    Initialize the instance with the instance ID and number of tasks with API NvMediaDlaInit().

  3. Create the loadable.

    Create a loadable opaque handle with NvMediaDlaLoadableCreate(). The handle is populated when the loadable is loaded into the instance.

  4. Load the loadable.

    Load a binary loadable into a DLA instance with the provided APIs in the following order:

    NvMediaDlaAppendLoadable
    NvMediaDlaLoadLoadable

    Only one loadable can be appended to the instance. Clients must call NvMediaSetCurrentLoadable to specify which loadable to work on.

    The binary loadable is created by the TensorRT builder. One example test app to create a binary loadable is located here:

  5. Register buffers.

    Register all buffers that will be used with the instance. Registration API is NvMediaDlaDataRegister.

  6. Fill the NvSciSync attribute list.

    The DLA instance fills in the NvSciSync attributes to provided memory with NvMediaDlaFillNvSciSyncAttrList.

  7. Register NvSciSync.

    Register all NvSciSync objects that will be used with the instance. Registration API is NvMediaDlaRegisterNvSciSyncObj.

  8. Set the NvSciSync object.

    Set end-of-frame (EOF) NvSciSync object or start-of-frame (SOF) NvSciSync object to the instance, if needed. The related APIs are NvMediaSetNvSciSyncObjforSOF and NvMediaSetNvSciSyncObjforEOF.