Skip to content

Commit

Permalink
Fix missing dep path on windows CPU runners (ollama#6884)
Browse files Browse the repository at this point in the history
GPUs handled the dependency path properly, but CPU runners didn't which
results in missing vc redist libraries on systems where the user didn't
already have it installed from some other app.
  • Loading branch information
dhiltgen authored Sep 21, 2024
1 parent 2a038c1 commit 6c2eb73
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions gpu/gpu.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,16 @@ func GetGPUInfo() GpuInfoList {
if err != nil {
slog.Warn("error looking up system memory", "error", err)
}
depPath := LibraryDir()

cpus = []CPUInfo{
{
GpuInfo: GpuInfo{
memInfo: mem,
Library: "cpu",
Variant: cpuCapability.String(),
ID: "0",
memInfo: mem,
Library: "cpu",
Variant: cpuCapability.String(),
ID: "0",
DependencyPath: depPath,
},
},
}
Expand All @@ -224,8 +227,6 @@ func GetGPUInfo() GpuInfoList {
return GpuInfoList{cpus[0].GpuInfo}
}

depPath := LibraryDir()

// Load ALL libraries
cHandles = initCudaHandles()

Expand Down

0 comments on commit 6c2eb73

Please sign in to comment.