Skip to content

Commit 1f6566c

Browse files
committed
Fix ensureEnoughLocalMem not calling signalNotify after timeline increment
1 parent c1581ef commit 1f6566c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

driverapi/src/cmdqueue.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,7 @@ libreCudaStatus_t NvCommandQueue::ensureEnoughLocalMem(NvU32 localMemReq) {
435435
COMPUTE
436436
));
437437
timelineCtr++;
438+
LIBRECUDA_ERR_PROPAGATE(signalNotify(timelineSignal, timelineCtr, COMPUTE));
438439
}
439440

440441
LIBRECUDA_SUCCEED();
@@ -800,8 +801,9 @@ libreCudaStatus_t NvCommandQueue::startExecution() {
800801

801802
libreCudaStatus_t NvCommandQueue::signalWaitGpu(NvSignal *pSignal, NvU32 signalTarget) {
802803
if (pSignal->value == signalTarget) {
803-
// no need to wait, if cpu can confirm.
804-
804+
// No need to wait, if cpu can confirm.
805+
// if this change is visible, this means it was done on this stream by operations
806+
// that were already commenced and have already executed on the GPU.
805807
return LIBRECUDA_SUCCESS;
806808
}
807809
LIBRECUDA_ERR_PROPAGATE(enqueue(

tests/compute_chronological_consistency/main.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#include <librecuda.h>
22

33
#include <iostream>
4-
#include <iomanip>
54
#include <vector>
65
#include <fstream>
76
#include <cstring>

0 commit comments

Comments
 (0)