Skip to content

Commit 47c9403

Browse files
committed
[SYCL] Bug fix
Signed-off-by: Sergey V Maslov <[email protected]>
1 parent a229175 commit 47c9403

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
@@ -1437,7 +1437,7 @@ static pi_result populateDeviceCacheIfNeeded(pi_platform Platform) {
14371437
// Additionally we need to cache all sub-devices too, such that they
14381438
// are readily visible to the piextDeviceCreateWithNativeHandle.
14391439
//
1440-
pi_uint32 SubDevicesCount;
1440+
pi_uint32 SubDevicesCount = 0;
14411441
ZE_CALL(zeDeviceGetSubDevices,
14421442
(Device->ZeDevice, &SubDevicesCount, nullptr));
14431443

@@ -1449,7 +1449,7 @@ static pi_result populateDeviceCacheIfNeeded(pi_platform Platform) {
14491449
// cache.
14501450
for (uint32_t I = 0; I < SubDevicesCount; ++I) {
14511451
std::unique_ptr<_pi_device> PiSubDevice(
1452-
new _pi_device(ZeSubdevices[I], Platform));
1452+
new _pi_device(ZeSubdevices[I], Platform, true));
14531453
pi_result Result = PiSubDevice->initialize();
14541454
if (Result != PI_SUCCESS) {
14551455
delete[] ZeSubdevices;

0 commit comments

Comments
 (0)