Add hipStreamQuery
Change-Id: Ib0813b1065feba4fe9ae861d24cfc6f9c5f580be
[ROCm/clr commit: fd67689114]
Cette révision appartient à :
1 Parent
c5f7fd723a
révision
c75953a822
7 fichiers modifiés
+102
-30
Aucun fichier ne correspond à votre recherche
@@ -115,6 +115,27 @@ hipError_t hipStreamWaitEvent(hipStream_t stream, hipEvent_t event, unsigned int
|
||||
};
|
||||
|
||||
|
||||
//---
|
||||
hipError_t hipStreamQuery(hipStream_t stream)
|
||||
{
|
||||
HIP_INIT_API(stream);
|
||||
|
||||
// Use default stream if 0 specified:
|
||||
if (stream == hipStreamNull) {
|
||||
ihipCtx_t *device = ihipGetTlsDefaultCtx();
|
||||
stream = device->_defaultStream;
|
||||
}
|
||||
|
||||
LockedAccessor_StreamCrit_t crit(stream->_criticalData);
|
||||
int pendingOps = crit->_av.get_pending_async_ops();
|
||||
|
||||
|
||||
hipError_t e = (pendingOps > 0) ? hipErrorNotReady : hipSuccess;
|
||||
|
||||
return ihipLogStatus(e);
|
||||
}
|
||||
|
||||
|
||||
//---
|
||||
hipError_t hipStreamSynchronize(hipStream_t stream)
|
||||
{
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur