Commit b9f658f
authored
fix: correct memory suitability checks in llamacpp extension (#6504)
The previous implementation mixed model size and VRAM checks, leading to inaccurate status reporting (e.g., false RED results).
- Simplified import statement for `readGgufMetadata`.
- Fixed RAM/VRAM comparison by removing unnecessary parentheses.
- Replaced ambiguous `modelSize > usableTotalMemory` check with a clear `totalRequired > usableTotalMemory` hard‑limit condition.
- Refactored the status logic to explicitly handle the CPU‑GPU hybrid scenario, returning **YELLOW** when the total requirement fits combined memory but exceeds VRAM.
- Updated comments for better readability and maintenance.1 parent 6304632 commit b9f658f
1 file changed
+10
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
41 | | - | |
| 39 | + | |
42 | 40 | | |
43 | 41 | | |
44 | 42 | | |
| |||
2162 | 2160 | | |
2163 | 2161 | | |
2164 | 2162 | | |
2165 | | - | |
| 2163 | + | |
2166 | 2164 | | |
2167 | 2165 | | |
2168 | 2166 | | |
| |||
2425 | 2423 | | |
2426 | 2424 | | |
2427 | 2425 | | |
2428 | | - | |
2429 | | - | |
2430 | | - | |
| 2426 | + | |
| 2427 | + | |
| 2428 | + | |
2431 | 2429 | | |
2432 | 2430 | | |
2433 | 2431 | | |
2434 | 2432 | | |
2435 | 2433 | | |
2436 | 2434 | | |
2437 | 2435 | | |
2438 | | - | |
2439 | | - | |
2440 | | - | |
2441 | | - | |
2442 | | - | |
2443 | | - | |
2444 | | - | |
2445 | | - | |
| 2436 | + | |
| 2437 | + | |
| 2438 | + | |
| 2439 | + | |
| 2440 | + | |
2446 | 2441 | | |
2447 | 2442 | | |
2448 | 2443 | | |
| |||
0 commit comments