Module Sarek_execute.Launch_limits

Per-backend limits on the signature of a launch the window may issue: kernel argument slots and push-constant bytes. A backend with no entry is unbounded as far as the window is concerned. Depends only on the IR and Stdlib, like Launch_window.

val slot_limits : (string * int) list Stdlib.Atomic.t
val arg_slot_limit : string -> int

Kernel argument slots a launch's signature may use on backend: Metal binds every argument at one of 31 [buffer(n)] indices. A backend with no limit configured here is unbounded as far as the window is concerned.

val set_limit : ('a * 'b) list Stdlib.Atomic.t -> backend:'a -> 'b -> unit
val set_arg_slot_limit : backend:string -> int -> unit

Set the argument slot limit of backend (for tests and for backends whose limit becomes known).

val push_limits : (string * int) list Stdlib.Atomic.t
val push_constant_limit : string -> int

Bytes of push constants a launch's signature may use on backend: Vulkan declares one 128-byte range in every pipeline layout and refuses a launch whose block is larger. A backend with no limit configured here is unbounded as far as the window is concerned.

val set_push_constant_limit : backend:string -> int -> unit

Set the push-constant byte limit of backend (for tests and for backends whose limit becomes known).

val push_bytes_ok : backend:string -> Sarek_ir_types.decl list list -> bool

true when a group whose members have these parameter lists keeps its kernel's push-constant block within backend's limit: the fused kernel's block for two or more members, the launch's own for one. Answers at once when the backend has no limit.