vulkan: Get FilterID from Backend for Vulkan (#12655)

* vulkan: Get FilterID from Backend for Vulkan

* Fixing patch
This commit is contained in:
Thomas Stocker
2025-10-16 18:07:35 +02:00
committed by GitHub
parent 4be41d2d45
commit c744134287
6 changed files with 11 additions and 9 deletions

View File

@@ -550,13 +550,6 @@ func bootstrapDevices(ctx context.Context, ollamaLibDirs []string, extraEnvs []s
}
logutil.Trace("runner enumerated devices", "OLLAMA_LIBRARY_PATH", ollamaLibDirs, "devices", devices)
// Enumerate returned devices starting at 0 per library and assign the per-library index as FilteredID
libCounts := make(map[string]int)
for i := range devices {
lib := devices[i].Library
devices[i].FilteredID = strconv.Itoa(libCounts[lib])
libCounts[lib]++
}
return devices
}