Skip to content

Commit 0352fe0

Browse files
committed
Fix device count assignment based on zeDrivers array
Signed-off-by: Neil R. Spruit <[email protected]>
1 parent 564c0e3 commit 0352fe0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

source/adapters/level_zero/adapter.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,11 @@ ur_result_t initPlatforms(PlatformVec &platforms,
157157
}
158158
}
159159
} else {
160-
ZeDriverCount = ZeDriverGetCount;
161-
ZeDrivers.resize(ZeDriverCount);
160+
ZeDrivers.resize(ZeDriverGetCount);
162161
ZeDrivers.assign(ZeDriverGetHandles.begin(), ZeDriverGetHandles.end());
163162
}
163+
ZeDriverCount = ZeDrivers.size();
164+
logger::debug("\n{} L0 Drivers found.\n", ZeDriverCount);
164165
for (uint32_t I = 0; I < ZeDriverCount; ++I) {
165166
// Keep track of the first platform init for this Driver
166167
bool DriverPlatformInit = false;

0 commit comments

Comments
 (0)