Skip to content

Commit 794953b

Browse files
committed
fix(Vulkan): device deduplication logic
1 parent 41eb510 commit 794953b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

llama/gpuInfo/vulkan-gpu-info.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ static std::vector<vk::PhysicalDevice> dedupedDevices() {
4444
oldDevice.getProperties2(&oldProps);
4545

4646
bool equals = std::equal(std::begin(oldId.deviceUUID), std::end(oldId.deviceUUID), std::begin(newId.deviceUUID));
47-
equals |= oldId.deviceLUIDValid && newId.deviceLUIDValid &&
48-
std::equal(std::begin(oldId.deviceLUID), std::end(oldId.deviceLUID), std::begin(newId.deviceLUID));
47+
equals = equals || (
48+
oldId.deviceLUIDValid && newId.deviceLUIDValid &&
49+
std::equal(std::begin(oldId.deviceLUID), std::end(oldId.deviceLUID), std::begin(newId.deviceLUID))
50+
);
4951

5052
return equals;
5153
}

0 commit comments

Comments
 (0)