SWDEV-193956 - [hipclang-vdi-rocm][perf]

~45% to 50% of Performance drop on rocBLAS_int8 test

Add support for active waits without blocking the host thread.

Change-Id: Ie7bb48dcafcb4c93d448bf74749b829b626c3578
Bu işleme şunda yer alıyor:
German Andryeyev
2020-03-02 11:39:13 -05:00
ebeveyn 9106a7dff4
işleme 0fc433e076
3 değiştirilmiş dosya ile 32 ekleme ve 6 silme
+10 -5
Dosyayı Görüntüle
@@ -190,12 +190,17 @@ bool Event::awaitCompletion() {
}
ClPrint(LOG_DEBUG, LOG_WAIT, "waiting for event %p to complete, current status %d", this, status_);
if (command().queue()->vdev()->ActiveWait()) {
while (status_ > CL_COMPLETE) {
amd::Os::yield();
}
} else {
ScopedLock lock(lock_);
ScopedLock lock(lock_);
// Wait until the status becomes CL_COMPLETE or negative.
while (status_ > CL_COMPLETE) {
lock_.wait();
// Wait until the status becomes CL_COMPLETE or negative.
while (status_ > CL_COMPLETE) {
lock_.wait();
}
}
ClPrint(LOG_DEBUG, LOG_WAIT, "event %p wait completed", this);