diff --git a/llama/patches/0026-vulkan-get-GPU-ID-ollama-v0.11.5.patch b/llama/patches/0026-vulkan-get-GPU-ID-ollama-v0.11.5.patch index c8d09ad01..4af0e1b7d 100644 --- a/llama/patches/0026-vulkan-get-GPU-ID-ollama-v0.11.5.patch +++ b/llama/patches/0026-vulkan-get-GPU-ID-ollama-v0.11.5.patch @@ -21,13 +21,15 @@ index 4070e248..1c8c15d5 100644 + + std::vector devices = vk_instance.instance.enumeratePhysicalDevices(); + -+ vk::PhysicalDeviceProperties props; -+ devices[device].getProperties(&props); ++ vk::PhysicalDeviceProperties2 props; ++ vk::PhysicalDeviceIDProperties deviceIDProps; ++ props.pNext = &deviceIDProps; ++ devices[device].getProperties2(&props); + -+ const auto& uuid = props.pipelineCacheUUID; ++ const auto& uuid = deviceIDProps.deviceUUID; + char id[64]; + snprintf(id, sizeof(id), -+ "GPU-%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X", ++ "GPU-%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x", + uuid[0], uuid[1], uuid[2], uuid[3], + uuid[4], uuid[5], + uuid[6], uuid[7], diff --git a/ml/backend/ggml/ggml/src/ggml-vulkan/ggml-vulkan.cpp b/ml/backend/ggml/ggml/src/ggml-vulkan/ggml-vulkan.cpp index 1c8c15d52..671323ad0 100644 --- a/ml/backend/ggml/ggml/src/ggml-vulkan/ggml-vulkan.cpp +++ b/ml/backend/ggml/ggml/src/ggml-vulkan/ggml-vulkan.cpp @@ -10199,13 +10199,15 @@ static std::string ggml_vk_get_device_id(int device) { std::vector devices = vk_instance.instance.enumeratePhysicalDevices(); - vk::PhysicalDeviceProperties props; - devices[device].getProperties(&props); + vk::PhysicalDeviceProperties2 props; + vk::PhysicalDeviceIDProperties deviceIDProps; + props.pNext = &deviceIDProps; + devices[device].getProperties2(&props); - const auto& uuid = props.pipelineCacheUUID; + const auto& uuid = deviceIDProps.deviceUUID; char id[64]; snprintf(id, sizeof(id), - "GPU-%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X", + "GPU-%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x", uuid[0], uuid[1], uuid[2], uuid[3], uuid[4], uuid[5], uuid[6], uuid[7],