Skip to content

Commit 6117a1b

Browse files
[SYCL][L0] retain event when taking a reference into a list (#4405)
Signed-off-by: Sergey V Maslov <[email protected]>
1 parent d37b832 commit 6117a1b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sycl/plugins/level_zero/pi_level_zero.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5486,6 +5486,7 @@ pi_result piEnqueueMemBufferMap(pi_queue Queue, pi_mem Buffer,
54865486
if (Event) {
54875487
(*Event)->ZeCommandList = CommandList->first;
54885488
CommandList->second.append(*Event);
5489+
PI_CALL(piEventRetain(*Event));
54895490
}
54905491

54915492
if (Buffer->MapHostPtr) {
@@ -5604,6 +5605,7 @@ pi_result piEnqueueMemUnmap(pi_queue Queue, pi_mem MemObj, void *MappedPtr,
56045605
// Set the commandlist in the event
56055606
(*Event)->ZeCommandList = CommandList->first;
56065607
CommandList->second.append(*Event);
5608+
PI_CALL(piEventRetain(*Event));
56075609

56085610
const auto &ZeCommandList = CommandList->first;
56095611
if ((*Event)->WaitList.Length) {

0 commit comments

Comments
 (0)