Module Realize.Runner
Common dispatch interface.
A runner wraps a single dispatchable operation (compiled kernel, buffer copy, view). Dispatch takes a list of buffers and name-keyed variable bindings and optionally returns execution time.
val make :
display_name:string ->
device:Device.t ->
?estimates:Program_spec.Estimates.t ->
(Device.Buffer.t list ->
(string * int) list ->
wait:bool ->
timeout:int option ->
float option) ->
tmake ~display_name ~device ?estimates call is a runner that dispatches via call.
estimates defaults to Program_spec.Estimates.zero.
val display_name : t -> stringdisplay_name t is t's human-readable name for debug output.
val estimates : t -> Program_spec.Estimates.testimates t is t's cost estimates.
val call :
t ->
Device.Buffer.t list ->
(string * int) list ->
wait:bool ->
timeout:int option ->
float optioncall t bufs var_vals ~wait ~timeout dispatches the operation on bufs with variable bindings var_vals.
Returns Some time when wait is true and the backend supports timing, None otherwise.
val exec :
t ->
Device.Buffer.t list ->
?var_vals:(string * int) list ->
unit ->
float optionexec t bufs ?var_vals () is call with ~wait:false and ~timeout:None. Always returns None.
var_vals defaults to [].