[SYCL][L0] Fix memory leak in USM prefetch#5461
Conversation
Signed-off-by: Byoungro So <byoungro.so@intel.com>
L0 plugin increments the ref count of the dependency event twice in USM prefetch. The fix is to remove the unnecessary retain call. Signed-off-by: Byoungro So <byoungro.so@intel.com>
| EventWaitList, Queue)) | ||
| return Res; | ||
|
|
||
| // Get a new command list to be used on this call |
There was a problem hiding this comment.
We already call createAndRetainPiZeEventList for the EventWaitList at line 7313 below.
This code unnecessarily increment the reference count twice, which leads to memory leak.
There was a problem hiding this comment.
In all other cases we create TmpWaitList before creating the real Event (and I don't remember why now). Please investigate/document and make your change in line with the rest of the code (presumably remove the other call to createAndRetainPiZeEventList, not this one)
| EventWaitList, Queue)) | ||
| return Res; | ||
|
|
||
| // Get a new command list to be used on this call |
There was a problem hiding this comment.
In all other cases we create TmpWaitList before creating the real Event (and I don't remember why now). Please investigate/document and make your change in line with the rest of the code (presumably remove the other call to createAndRetainPiZeEventList, not this one)
|
@smaslov-intel , |
|
See #3081 for why |
Signed-off-by: Byoungro So <byoungro.so@intel.com>
|
Thanks @smaslov-intel. |
|
Hold the review. It seems it is mixed up with some other changes. |
This reverts commit 1b8a422.
Yes, please update. And please also add comment to |
Signed-off-by: Byoungro So <byoungro.so@intel.com>
Signed-off-by: Byoungro So <byoungro.so@intel.com>
|
Ok. Now it shows the correct changeset. |
* upstream/sycl: (3571 commits) [ESIMD] Doxygen update part III - core APIs. (intel#5472) [SYCL][DOC] Move proposed FPGA extensions (intel#5453) [SYCL] Add -fsycl-fp32-prec-sqrt flag (intel#5309) [SYCL] Emit program build logs for warning levels >= 2 (intel#5319) [SYCL] Add clang support for code_location in KernelInfo (intel#5335) [SYCL][Doc] Move FPGA extensions (intel#5470) [ESIMD] Fix public simd and simd_view APIs. (intel#5465) [SYCL] Deprecate sycl::atomics in SYCL 2020 mode (intel#5440) [SYCL] Add unit test for PR 5414 (intel#5450) [XPTI] Allow arbitrary data types in metadata (intel#4998) [SYCL][DOC] Move discard queue events to supported (intel#5452) [Driver][SYCL] Initial support for allowing fat static -lname processing (intel#5413) [SYCL] Fix dead pointer usage if leaf buffer overflows (intel#5417) [SYCL][L0] Fix memory leak in USM prefetch (intel#5461) [SYCL][Doc] Add new free function queries proposal (intel#5106) [SYCL][ESIMD] Update vc-intrinsics deps to the top of the trunk (intel#5460) [SYCL][DOC] Move old spec constant extension spec (intel#5456) [SYCL][DOC] Move deprecated extensions (intel#5458) [SYCL][DOC] Fix links to old SubGroupMask doc (intel#5459) [ESIMD] Doxygen update part II - memory APIs. (intel#5443) ...
L0 plugin increments the ref count of the dependency event twice in USM prefetch.
The fix is to remove the unnecessary retain call.