Importing a NvSciSync Object into cuDLA
- Query
NvSciSyncObj
attributes (for waiting or signaling) from cuDLA.Use
cudlaGetNvSciSyncAttributes
API to query theNvSciSync
attributes from cuDLA for a given cuDLA device.NvSciSyncAttrLists
passed to this API must be created and managed by the application. NvSciSync
objects registration/unregistration with cuDLA.- Use
cudlaImportExternalSemaphore
API 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
NvSciSyncObject
passed earlier and can be used during DLA task submission to create wait events or signal events accordingly. - Use
cudlaMemUnregister
to unregister/destroy an already registered/importedNvSciSync
Object from the DLA address space.
- Use
- 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 HW. Such wait happens asynchronously on the DLA (i.e., the calling thread returns immediately). - Get an
NvSciSyncFence
.cudlaSignalEvents
takes a validNvSciSyncFence
. This is passed incudlaTask
when 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
NvSciSyncFence
is ignaled by the DLA when the task finishes, and any potential waiters waiting on theNvSciSyncFence
are unblocked.
Note: Previous content of the passed
NvSciSyncFence
will be overwritten.