Module Execute.Window

Control and statistics of the launch window.

type stats = Launch_window.stats = {
  1. submitted : int;
    (*

    JIT launches made through run/run_vectors

    *)
  2. issued : int;
    (*

    backend launches actually made

    *)
  3. fused_groups : int;
    (*

    groups of several launches issued as one kernel

    *)
  4. fused_built : int;
    (*

    distinct fused kernels built

    *)
  5. fused_refused : int;
    (*

    launch sequences whose fusion failed

    *)
}
val flush : unit -> unit

Issue every deferred launch now. Synchronisation points do this themselves; this is for callers that want the device to start early.

val stats : unit -> Launch_window.stats
val reset_stats : unit -> unit
val defers : string -> bool

true when JIT launches on this backend name are deferred.

val defers_device : Spoc_core.Device.t -> bool

true when JIT launches on this device are deferred: its backend's window is on and it is not a CPU device (whose host-pointer buffers alias host memory, so they can alias each other).

val enabled : unit -> bool

false when deferral is off for every backend.

val set_enabled : bool -> unit

Turn deferral on or off for every backend (flushes first). SAREK_OPT_DISABLE=window in the environment turns it off at start-up.

val set_backend_enabled : backend:string -> bool -> unit

Turn deferral on or off for one backend (flushes first). On by default for HIP, OpenCL, Vulkan, CUDA and Metal.

val epilogue_on : string -> bool

true when epilogue fusion may run on this backend under the process grants (HIP, Metal; the others with Cross_kernel_contraction).

val set_epilogue_backend : backend:string -> bool -> unit

Switch epilogue fusion off or back on for one backend (flushes first); never a grant.

val clear_fused_cache : unit -> unit

Forget every fused kernel built so far.