Commit ac2aef2
fix(llamacpp): address PR #473 review comments
- Warn when user gpu_layers override is applied after a non-SUCCESS
llama_params_fit result: the fit call deliberately fell back to
n_gpu_layers=0 to avoid an OOM, and silently reinstating the user's
override reintroduces exactly that risk. We still honour the explicit
override (existing behaviour) but a RAC_LOG_WARNING now surfaces the
risk in logs so it's visible when a subsequent load crashes.
(greptile #3082185212)
- Clarify in a comment that the zero-initialized tensor_buft_overrides
vector already contains a valid llama.cpp sentinel entry (pattern ==
nullptr), so an empty vector means "no overrides." (greptile
#3082185321)
- Clamp ctx_params.n_ctx (uint32_t) to INT_MAX before the int cast used
in std::min, so a pathological > 2.1B context value can't wrap to
negative and win std::min as the "smallest" context size. Added
<climits> for INT_MAX. (greptile #3082185505)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 1eb7542 commit ac2aef2
1 file changed
Lines changed: 22 additions & 1 deletion
Lines changed: 22 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
262 | 263 | | |
263 | 264 | | |
264 | 265 | | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
265 | 270 | | |
266 | 271 | | |
267 | 272 | | |
| |||
342 | 347 | | |
343 | 348 | | |
344 | 349 | | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
345 | 361 | | |
346 | 362 | | |
347 | 363 | | |
| |||
364 | 380 | | |
365 | 381 | | |
366 | 382 | | |
367 | | - | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
368 | 389 | | |
369 | 390 | | |
370 | 391 | | |
| |||
0 commit comments