Module Sarek_execute.Window_gate

type refusal =
  1. | Switched_off
    (*

    Execute.Window.set_enabled false

    *)
  2. | Restricted
    (*

    SAREK_OPT_DISABLE=window

    *)
  3. | Cpu_device
    (*

    host-pointer buffers alias host memory, and distinct vectors can alias each other through it, so buffer identity is no longer the vector's

    *)
  4. | Not_on of string
    (*

    the backend (framework name) is not in backends

    *)
  5. | Streamed
    (*

    a launch on a stream

    *)
  6. | Soa_params
    (*

    structure-of-arrays arguments

    *)

Why a launch is not deferred, in the order the reasons are checked.

val enabled : bool Stdlib.Atomic.t
val default_backends : string list

Backends deferred by default (specs/launch-window.md); Native, Interpreter and WebGPU stay immediate. set_backend_enabled opts in or out.

val backends : string list Stdlib.Atomic.t
val refusal : framework:string -> is_cpu:bool -> streamed:bool -> soa_params:'a list -> refusal option

refusal ~framework ~is_cpu ~streamed ~soa_params: None when a JIT launch on a device of framework is deferred.

val defers : string -> bool

true when launches on backend are deferred.

val defers_device : framework:string -> is_cpu:bool -> bool

true when JIT launches on a device of framework are deferred: its backend's window is on and it is not a CPU device.