Add workaround for hipStreamAddCallback function: call stream synchronize on host and then add execute the call back function

Change-Id: If361f8e053949904b19b9e09245d267f05e29f7b
Bu işleme şunda yer alıyor:
pensun
2016-10-22 23:59:39 -05:00
ebeveyn c39b40db58
işleme 7a0375854a
4 değiştirilmiş dosya ile 56 ekleme ve 16 silme
+10 -1
Dosyayı Görüntüle
@@ -198,4 +198,13 @@ hipError_t hipStreamGetFlags(hipStream_t stream, unsigned int *flags)
}
//---
hipError_t hipStreamAddCallback(hipStream_t stream, hipStreamCallback_t callback, void *userData, unsigned int flags)
{
HIP_INIT_API(stream, callback, userData, flags);
hipError_t e = hipSuccess;
//--- explicitly synchronize stream to add callback routines
hipStreamSynchronize(stream);
callback(stream, e, userData);
return ihipLogStatus(e);
}