Skip to content

Commit f7f6a00

Browse files
author
Piotr Stankiewicz
committed
inference: Fix nv-gpu-info path and wrap errors
Signed-off-by: Piotr Stankiewicz <[email protected]>
1 parent 9372ac3 commit f7f6a00

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pkg/gpuinfo/memory_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func getVRAMSize(modelRuntimeInstallPath string) (uint64, error) {
2020
return 1, nil
2121
}
2222

23-
nvGPUInfoBin := filepath.Join(modelRuntimeInstallPath, "com.docker.nv-gpu-info.exe")
23+
nvGPUInfoBin := filepath.Join(modelRuntimeInstallPath, "bin", "com.docker.nv-gpu-info.exe")
2424

2525
ctx, _ := context.WithTimeout(context.Background(), 30*time.Second)
2626
cmd := exec.CommandContext(ctx, nvGPUInfoBin)

pkg/inference/backends/llamacpp/llamacpp.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,19 +226,19 @@ func (l *llamaCpp) GetDiskUsage() (int64, error) {
226226
func (l *llamaCpp) GetRequiredMemoryForModel(model string, config *inference.BackendConfiguration) (*inference.RequiredMemory, error) {
227227
mdl, err := l.modelManager.GetModel(model)
228228
if err != nil {
229-
return nil, err
229+
return nil, fmt.Errorf("getting model(%s): %w", model, err)
230230
}
231231
mdlPath, err := mdl.GGUFPath()
232232
if err != nil {
233-
return nil, err
233+
return nil, fmt.Errorf("getting gguf path for model(%s): %w", model, err)
234234
}
235235
mdlGguf, err := parser.ParseGGUFFile(mdlPath)
236236
if err != nil {
237-
return nil, err
237+
return nil, fmt.Errorf("parsing gguf(%s): %w", mdlPath, err)
238238
}
239239
mdlConfig, err := mdl.Config()
240240
if err != nil {
241-
return nil, err
241+
return nil, fmt.Errorf("accessing model(%s) config: %w", model, err)
242242
}
243243

244244
contextSize := GetContextSize(&mdlConfig, config)

0 commit comments

Comments
 (0)