Skip to content

Commit 4c34f93

Browse files
authored
[SYCL] Fix subdevices caching. (#3577)
This change corrects an error in the caching of subdevices. Signed-off-by: rdeodhar <[email protected]>
1 parent 6921608 commit 4c34f93

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sycl/plugins/level_zero/pi_level_zero.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2027,9 +2027,9 @@ pi_result piDevicePartition(pi_device Device,
20272027
return Result;
20282028
}
20292029
OutDevices[I] = PiSubDevice.get();
2030-
Platform->PiDevicesCache.push_back(std::move(PiSubDevice));
20312030
// save pointers to sub-devices for quick retrieval in the future.
2032-
Device->SubDevices.push_back(Dev);
2031+
Device->SubDevices.push_back(PiSubDevice.get());
2032+
Platform->PiDevicesCache.push_back(std::move(PiSubDevice));
20332033
}
20342034
}
20352035
delete[] ZeSubdevices;

0 commit comments

Comments
 (0)