Skip to content

Commit 6908294

Browse files
committed
added another retain
Signed-off-by: Byoungro So <[email protected]>
1 parent 040d81b commit 6908294

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
@@ -1841,6 +1841,8 @@ pi_result piDevicePartition(pi_device Device,
18411841
pi_device Dev = Platform->getDeviceFromNativeHandle(ZeSubdevices[I]);
18421842
if (Dev) {
18431843
OutDevices[I] = Dev;
1844+
// reusing the same pi_device needs to increment the reference count
1845+
piDeviceRetain(OutDevices[I]);
18441846
} else {
18451847
std::unique_ptr<_pi_device> PiSubDevice(
18461848
new _pi_device(ZeSubdevices[I], Platform));

0 commit comments

Comments
 (0)