feat: GPU-Wahl in Oberfläche, CLI und Status, Doku und Klicktests (#1272)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-02 17:43:00 +01:00
parent 16311679dc
commit d205c14343
13 changed files with 237 additions and 27 deletions

View File

@ -1399,22 +1399,27 @@ impl Shared {
context: plan.context,
extra_args: plan.extra_args.clone(),
};
// Ob der Fehlschlag dafür spricht, dass eine einzelne GPU zu klein war.
let mut zu_klein_moeglich = false;
let ergebnis = match self.ram_fehlt(&plan) {
Some(grund) => Err((grund, None)),
None => {
let fremd = self.fremdbelegung(&plan).await;
match engine.start(&spec).await {
Ok(handle) => Ok(handle),
Err(source) => Err((self.startgrund(&plan, &source, fremd), Some(source))),
Err(source) => {
use nexus_adapter::AdapterError as E;
// Nicht bei fremder Belegung: Dann läge die zweite Wahl mitten darin.
zu_klein_moeglich = fremd.is_none()
&& matches!(source, E::ExitedEarly { .. } | E::NotReady { .. });
Err((self.startgrund(&plan, &source, fremd), Some(source)))
}
}
}
};
let handle = match ergebnis {
Ok(handle) => handle,
Err((grund, source)) => {
let engine_gescheitert = source
.as_ref()
.is_some_and(|e| !matches!(e, nexus_adapter::AdapterError::InvalidProfile(_)));
let source: String = source
.as_ref()
.map_or_else(|| grund.clone(), ToString::to_string);
@ -1454,7 +1459,7 @@ impl Shared {
});
let mut inner = self.lock();
// Der erste Versuch auf einer einzelnen GPU kann an einer zu niedrigen Schätzung liegen.
if engine_gescheitert
if zu_klein_moeglich
&& waehlbar(&plan)
&& plan.gpus.len() == 1
&& plan.gemessen_einzeln_mb.is_none()