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:
@@ -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);
|
||||
|
||||
Yeni konuda referans
Bir kullanıcı engelle