diff --git a/crates/cuda-driver/src/deferred_status.rs b/crates/cuda-driver/src/deferred_status.rs index a63de325..68f8aff0 100644 --- a/crates/cuda-driver/src/deferred_status.rs +++ b/crates/cuda-driver/src/deferred_status.rs @@ -1,4 +1,4 @@ -//! `LELEKA_PREFILL_DEFER_GUARDS=1` (EXPERIMENTAL, claude/schedule): deferred guard status for the prompt producer's `run`. +//! `LELEKA_PREFILL_DEFER_GUARDS` (default on, `=0` restores the immediate guards; claude/schedule): deferred guard status for the prompt producer's `run`. //! //! Today every `OriginalPromptDevice::run` (the hyper-connection reads and injections: about 560 per 8192-token chunk) zeroes its status //! words with a synchronous upload, runs its kernels, drains the whole context, reads the words back and refuses on the first set one: @@ -50,7 +50,7 @@ pub(crate) fn evaluate(readback: &[u8], stride: usize, order: &[usize], labels: /// Read once: the switch. Off by default (experimental mode). pub(crate) fn enabled() -> bool { static ON: std::sync::OnceLock = std::sync::OnceLock::new(); - *ON.get_or_init(|| std::env::var("LELEKA_PREFILL_DEFER_GUARDS").is_ok_and(|v| v == "1")) + *ON.get_or_init(|| std::env::var("LELEKA_PREFILL_DEFER_GUARDS").map_or(true, |v| v != "0")) } #[cfg(all(feature = "cuda-driver", target_os = "linux", target_pointer_width = "64"))]