docs: explain how auto-fit treats a card listed by two backends and an integrated GPU

backend.md (several GPUs): a card that CUDA and Vulkan both list counts once,
the vendor's backend keeps it and the other listing is shown in the plan as
not used automatically; an integrated GPU is the main device only when no
graphics card has memory left and never holds parked weights.

convivenza_applicazioni.md: the same for the case of CUDA and Vulkan in one
folder on a laptop, with the note that it adds no speed because a module is
not divided between backends. The match of the PCI ids on a real machine is
listed among the things that are not verified yet: the logic is only tested
with simulated devices.

Claude-Session: https://claude.ai/code/session_01EhZzDBkuuMp1jBf4WtEySC
This commit is contained in:
Claude 2026-10-15 15:21:52 +02:00
parent 32d3357671
commit 5e1bf3d559
No known key found for this signature in database
2 changed files with 21 additions and 0 deletions

View file

@ -281,6 +281,15 @@ What it does and does not do:
- Only discrete GPUs of the same backend are combined. Integrated GPUs share the
system RAM, and a CUDA GPU cannot share a module with a Vulkan one; in that case
the log says so and only the best GPU is used unless modules are assigned with `--backend`.
- A card that two backends list counts once. With the CUDA and the Vulkan builds
installed side by side, an NVIDIA card is both `CUDA0` and `Vulkan0`. Listings that
report the same PCI bus id are one GPU: the vendor's backend keeps it, and the Vulkan
or OpenCL listing appears in the plan as `same GPU as CUDA0, not used automatically`.
It can still be named with `--backend`. A backend that reports no PCI bus id is not matched.
- An integrated GPU is the main device only when no graphics card has memory left.
Its memory is the system RAM, so it reports more than a card does, and it computes
several times slower. Weights are never parked in it either, because that is the
same RAM the plan has just found too small.
- A module assigned with `--backend` is never moved or split, and a module whose
`--split-mode` is `row` is never split automatically. An explicit
`--params-backend` disables auto-fit, and with it this planning.

View file

@ -142,6 +142,15 @@ Da sapere:
GPU del motore se il modello non sta nella prima. Per tenere il motore su una
GPU sola: `--multi-gpu off`. Un modulo assegnato con `--backend` non viene mai
spostato.
- **CUDA e Vulkan nella stessa cartella** (per esempio per avere anche la GPU
AMD): la stessa scheda NVIDIA compare due volte, come `CUDA0` e `Vulkan0`. Il
motore la riconosce dall'indirizzo PCI che entrambi i backend riportano, la
conta una volta e usa CUDA; nel piano la riga di `Vulkan0` dice
`same GPU as CUDA0, not used automatically`. La GPU integrata (`Vulkan1` su un
portatile AMD) non viene scelta finché una scheda ha memoria libera, perché la
sua «memoria» è la RAM di sistema, e non ospita mai i pesi. Si possono
comunque nominare con `--backend`. Non aggiunge velocità: il motore non
divide un modulo fra backend diversi.
- **La GPU integrata** usa la RAM di sistema: per `--profile auto` non conta
come memoria veloce (contano solo GPU discrete e acceleratori), e per una
chat sulla GPU integrata la risorsa contesa è la RAM, non la memoria video.
@ -381,6 +390,9 @@ Verificato, su Linux, **solo CPU**, con un modello sintetico:
- La convivenza con una chat reale (llama.cpp, LM Studio, WebGPU).
- Windows: condivisione della porta, chiusura del processo figlio.
- L'ordine dei dispositivi Vulkan su un portatile con GPU integrata e discreta.
- La corrispondenza degli indirizzi PCI fra CUDA e Vulkan su una macchina reale
(la riga `same GPU as` nel piano): la logica è provata solo con dispositivi
simulati.
- Il comportamento del motore con il ripiego sulla RAM dei driver NVIDIA.
- Il costo del ricaricamento di un modello reale.
- Quanto si scalda la macchina con il motore e l'altra applicazione accesi per