mirror of
https://github.com/ollama/ollama.git
synced 2025-05-11 18:36:41 +02:00
Reload model if num_gpu
changes (#3920)
* reload model if `num_gpu` changes * dont reload on -1 * fix tests
This commit is contained in:
parent
993cf8bf55
commit
00b0699c75
2 changed files with 15 additions and 6 deletions
|
@ -490,6 +490,9 @@ func TestNeedsReload(t *testing.T) {
|
|||
require.False(t, resp)
|
||||
req.opts.NumGPU = 99
|
||||
resp = runner.needsReload(ctx, req)
|
||||
require.True(t, resp)
|
||||
req.opts.NumGPU = -1
|
||||
resp = runner.needsReload(ctx, req)
|
||||
require.False(t, resp)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue