Skip to content

Commit b44711d

Browse files
committed
SWDEV-569101 - increase signal list size to at least DEBUG_HIP_GRAPH_BATCH_SIZE
1 parent ee7305e commit b44711d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

projects/clr/rocclr/device/rocm/rocvirtual.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ bool VirtualGPU::HwQueueTracker::CreateSignal(ProfilingSignal* signal, bool inte
396396

397397
// ================================================================================================
398398
bool VirtualGPU::HwQueueTracker::Create() {
399-
const uint kSignalListSize = ROC_SIGNAL_POOL_SIZE;
399+
const uint kSignalListSize = std::max(ROC_SIGNAL_POOL_SIZE, DEBUG_HIP_GRAPH_BATCH_SIZE);
400400
signal_list_.resize(kSignalListSize);
401401
for (uint i = 0; i < kSignalListSize; ++i) {
402402
std::unique_ptr<ProfilingSignal> signal(new ProfilingSignal());
@@ -436,8 +436,8 @@ hsa_signal_t VirtualGPU::HwQueueTracker::ActiveSignal(hsa_signal_value_t init_va
436436

437437
bool new_signal = false;
438438

439-
// Peep signal +2 ahead to see if its done
440-
auto temp_id = (current_id_ + 2) % signal_list_.size();
439+
// Peep signal +DEBUG_HIP_GRAPH_BATCH_SIZE ahead to see if its done
440+
auto temp_id = (current_id_ + DEBUG_HIP_GRAPH_BATCH_SIZE) % signal_list_.size();
441441

442442
// If GPU is still busy with processing, then add more signals to avoid more frequent stalls
443443
if (Hsa::signal_load_relaxed(signal_list_[temp_id]->signal_) > 0) {

projects/clr/rocclr/utils/flags.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ release(uint, ROC_P2P_SDMA_SIZE, 1024, \
221221
"The minimum size in KB for P2P transfer with SDMA") \
222222
release(uint, ROC_AQL_QUEUE_SIZE, 16384, \
223223
"AQL queue size in AQL packets") \
224-
release(uint, ROC_SIGNAL_POOL_SIZE, 64, \
224+
release(uint, ROC_SIGNAL_POOL_SIZE, 256, \
225225
"Initial size of HSA signal pool") \
226226
release(uint, DEBUG_CLR_LIMIT_BLIT_WG, 16, \
227227
"Limit the number of workgroups in blit operations") \

0 commit comments

Comments
 (0)