mirror of
https://github.com/ollama/ollama.git
synced 2026-09-01 17:01:22 +00:00
On Windows hybrid-graphics systems (Intel iGPU + NVIDIA dGPU), discovery could classify the integrated GPU as discrete and the discrete GPU as integrated, dropping the dGPU's Vulkan device and scheduling models onto the iGPU's shared system RAM (#16667). Two index-keyed correlations between independently-ordered device enumerations caused this: 1. The native probe's stderr was concatenated into the output passed to parseVulkanUMA. The probe enumerates Vulkan devices in its own order, so its ggml_vulkan uma lines overwrote llama-server's index-keyed UMA map with inverted values. Parse UMA metadata only from llama-server's own output. 2. applyWindowsVulkanRefinement required the raw vkEnumeratePhysicalDevices count to equal llama-server's Vulkan device count. The raw enumeration is a superset on real systems (D3D12 mapping-layer devices, Microsoft Basic Render Driver), so the refinement that reads the authoritative VkPhysicalDeviceType was always skipped. Match devices by name against the probed superset instead, bailing only when a device has no match or matches conflicting device types. Verified on the hardware from #16667 (Intel RaptorLake-S + RTX 4080 Laptop): the raw probe returns 5 devices vs llama-server's 2; with this change the iGPU is dropped as integrated, the dGPU's Vulkan device dedupes against CUDA0, and the model loads on the dGPU with no environment overrides. Fixes #16667 |
||
|---|---|---|
| .. | ||
| amd.go | ||
| amd_test.go | ||
| cpu_linux.go | ||
| cpu_windows.go | ||
| cuda_compat.go | ||
| gpu.go | ||
| gpu_darwin.go | ||
| gpu_info_darwin.h | ||
| gpu_info_darwin.m | ||
| llama_server.go | ||
| llama_server_test.go | ||
| native_probe.go | ||
| native_probe_linux.go | ||
| native_probe_linux_nocgo.go | ||
| native_probe_platform.go | ||
| native_probe_stub.go | ||
| native_probe_test.go | ||
| native_probe_windows.go | ||
| runner.go | ||
| runner_test.go | ||
| types.go | ||
| vulkan.go | ||
| vulkan_refine_stub.go | ||
| vulkan_refine_windows.go | ||