SWDEV-538195 - Introduce threshold for handler submission (#723)
- When doing device/stream sync, we can submit a handler which may
introduce some host side delays. Use DEBUG_CLR_BATCH_CPU_SYNC_SIZE to
batch commands for host wait. Default for HIP is 8 commands.
- Investigation is underway in ROCr but need to address this for now in
HIP runtime.
[ROCm/clr commit: 9b045922a8]
This commit is contained in:
کامیت شده توسط
GitHub
والد
9cbbee4d6e
کامیت
3a849c6962
@@ -32,6 +32,7 @@ namespace hip {
|
||||
|
||||
// ================================================================================================
|
||||
hip::Stream* Device::NullStream(bool wait) {
|
||||
ClPrint(amd::LOG_DEBUG, amd::LOG_WAIT, "NullStream %p, wait %d", null_stream_, wait);
|
||||
if (null_stream_ == nullptr) {
|
||||
amd::ScopedLock lock(lock_);
|
||||
if (null_stream_ == nullptr) {
|
||||
@@ -188,6 +189,7 @@ void Device::WaitActiveStreams(hip::Stream* blocking_stream, bool wait_null_stre
|
||||
|
||||
if (wait_null_stream) {
|
||||
if (null_stream_) {
|
||||
ClPrint(amd::LOG_DEBUG, amd::LOG_WAIT, "Waiting on nullstream %p", null_stream_);
|
||||
waitForStream(null_stream_);
|
||||
}
|
||||
} else {
|
||||
@@ -198,6 +200,7 @@ void Device::WaitActiveStreams(hip::Stream* blocking_stream, bool wait_null_stre
|
||||
((active_stream->Flags() & hipStreamNonBlocking) == 0) &&
|
||||
// and it's not the current stream
|
||||
(active_stream != blocking_stream)) {
|
||||
ClPrint(amd::LOG_DEBUG, amd::LOG_WAIT, "Waiting on active stream %p", active_stream);
|
||||
// Get the last valid command
|
||||
waitForStream(active_stream);
|
||||
}
|
||||
|
||||
مرجع در شماره جدید
Block a user