Fix test-runner GPU detection by preserving startup events

The log monitor was calling Reset() before each model test, which cleared
all GPU detection events that occurred during server startup. This caused
the validation to fail with 'GPU acceleration not detected' even though
GPU was being used successfully.

Root cause: GPU detection logs are written during server startup
(lines like 'offloaded 35/35 layers to GPU'), but monitor.Reset() was
clearing these events before validation could check them.

Solution: Comment out the monitor.Reset() call to preserve GPU detection
events from server startup. These events are still relevant for validating
that the model is using GPU acceleration.
This commit is contained in:
Shang Chieh Tseng
2025-10-30 15:27:40 +08:00
parent d9d3f7b0b4
commit 6bbdf3e148

View File

@@ -156,8 +156,8 @@ func runTests(configPath, profileName, ollamaBin, outputPath string, verbose, ke
fmt.Printf("\n[%d/%d] Testing model: %s\n", i+1, len(profile.Models), modelTest.Name)
fmt.Println(strings.Repeat("-", 60))
// Reset monitor events for this model
monitor.Reset()
// Don't reset monitor - we want to keep GPU detection events from server startup
// monitor.Reset()
// Run test
result := tester.TestModel(ctx, modelTest)