flybrain/services/flysim/crates/flybrain-core/Cargo.toml
acamilo 7d2650ae5e gpu-02 notes: a GPU failure falls back to the CPU for the process lifetime
A CUDA failure (a failed batch or read-back, or an attach that fails at a restart) now marks the
GPU unusable for the process: the replacement agent worker is created on the CPU and restores the
last checkpoint, so a lost device no longer leaves the session unable to restore and a flaky one is
never re-attached in a loop. Worker processes share the record through a marker file the launcher
owns and empties when it starts. Exposed as the LIF_GPU_FALLBACK log line,
fly_brain_backend{backend}, fly_brain_backend_wanted and fly_brain_backend_fallbacks_total, and
fly-watchdog check 11 (report only).

Adds a committed fault-injection hook for the cuda feature (FLY_LIF_CUDA_FAULT or the inject
setters), the recovery harness in legacy_parity, and the cuda_fallback test: init failure, transient
(host current) and permanent (in-process and process) faults, each equal to the CPU reference.
Corrects the runbook, documents the stale host arrays on LifNetwork, and has cuda_session assert
that no fallback hid a CPU pass.
2026-10-02 10:15:03 +00:00

43 lines
1.1 KiB
TOML

[package]
name = "flybrain-core"
description = "Bit-exact Rust port of the flybrain neural core (dataset, LIF kernel, plasticity, readout, agent loop, checkpoint envelope)."
version.workspace = true
edition = "2021"
rust-version.workspace = true
license.workspace = true
publish.workspace = true
[features]
# The LIF tick on the GPU, bit-exact with the CPU kernel. Uses the CUDA driver API through
# `cudarc` with dynamic loading, so a build without a CUDA toolkit still works and a CPU-only run
# never opens libcuda.
cuda = ["dep:cudarc"]
[dependencies]
cudarc = { workspace = true, optional = true }
flate2.workspace = true
indexmap.workspace = true
libm.workspace = true
ryu-js.workspace = true
serde.workspace = true
serde_json.workspace = true
sha2.workspace = true
[target.'cfg(target_os = "linux")'.dependencies]
# sched_getaffinity / sched_setaffinity for the opt-in worker placement (pool::place_workers).
libc = "0.2"
[dev-dependencies]
base64.workspace = true
tempfile = "3"
[[example]]
name = "bench"
[[example]]
name = "cuda_exact"
required-features = ["cuda"]
[[example]]
name = "cuda_bench"
required-features = ["cuda"]