Skip to main content
sf.config(...) sets runtime options. Like errstate, it works as a plain call, a context manager, or a decorator, and the settings are local to the current thread or asyncio task.

Options

"raise" | "warn" | "ignore"
default:"raise"
What to do when the host proves a heavy operation would saturate on every element. raise refuses it before launch with SFOverflowError; warn launches with SFPreflightWarning; ignore launches silently.
"warn" | "raise" | "verify" | "ignore"
default:"warn"
What to do when the golden-vector probe suspects saturation everywhere. warn launches with SFPreflightWarning; raise refuses; verify replays the whole operation on the host and refuses only on proof; ignore launches silently.
bool
default:"true"
Run the probe at all for operations the range bound cannot decide.
int
default:"256"
How many elements the probe samples from the real inputs.
"scan" | "replay"
default:"scan"
How status.saturated is obtained on a target without flags. scan counts outputs at ±max (a bound for elementwise ops, unknown for reductions); replay recomputes the events on the host for an exact count.
int | None
default:"None"
Host operations with more elements than this run on default_device instead. None never offloads.
str
default:"\"atreides\""
The target used by offloading and by the PyTorch compile backend.
"interp" | "c"
default:"interp"
Stage 3: how the simulator executes kernels.

The error policy is separate

sf.config controls the device path. What happens on an event (raise, warn, ignore) is sf.seterr / sf.errstate, documented under Error policy. The two compose: pre-flight decides whether to launch, and the policy decides how an event is surfaced, before or after.