Importing a NvSciSync Object into cuDLA#
Query
NvSciSyncObjattributes (for waiting or signaling) from cuDLA.
Use cudlaGetNvSciSyncAttributes API to query the NvSciSync attributes from cuDLA for a given cuDLA device. NvSciSyncAttrLists passed to this API must be created and managed by the application.
NvSciSyncobjects registration/unregistration with cuDLA.Use
cudlaImportExternalSemaphoreAPI to register/import an NvSciSync object into the DLA address space. This API accepts a valid NvSciSyncObject as a parameter tocudlaExternalSemaphoreHandleDesc.On completion, the pointer returned by the above API internally holds a reference to the
NvSciSyncObjectpassed earlier and can be used during DLA task submission to create wait events or signal events accordingly.Use
cudlaMemUnregisterto unregister/destroy an already registered/importedNvSciSyncObject from the DLA address space.
Wait for an
NvSciSyncFence.
All events that the application wishes to wait on must be specified in the waitEvents field for a particular task. The corresponding task would wait for all the wait dependencies to be met before beginning execution on the DLA hardware. Such wait happens asynchronously on the DLA (i.e., the calling thread returns immediately).
Get an
NvSciSyncFence.cudlaSignalEventstakes a validNvSciSyncFence. This is passed incudlaTaskwhen the task is triggered.Upon return, the fence tracks the completion of all work submitted on that cuDLA task.
Waiting on a fence is equivalent to waiting for the completion of that cuDLA task. The
NvSciSyncFenceis ignaled by the DLA when the task finishes, and any potential waiters waiting on theNvSciSyncFenceare unblocked.
Note
Previous content of the passed NvSciSyncFence will be overwritten.