Backend_intf.Deviceinclude Device_typesinclude Device_configinclude Device_config_commonval sexp_of_dev : dev -> Sexplib0.Sexp.tval sexp_of_runner : runner -> Sexplib0.Sexp.tAn event tracks if a device's runner finished computing past a particular point in its schedule. These values are used internally for scheduling across devices/queues of the backend, and can be used for explicit scheduling.
val sexp_of_event : event -> Sexplib0.Sexp.tThe optimization context for compiling code, in particular Low_level.optimize_ctx for low-level backends.
val sexp_of_optimize_ctx : optimize_ctx -> Sexplib0.Sexp.tval empty_optimize_ctx : Base.unit -> optimize_ctxval sexp_of_device : device -> Sexplib0.Sexp.ttype nonrec context = (dev, runner, event, optimize_ctx) contextval sexp_of_context : context -> Sexplib0.Sexp.tinclude Slab_alloc with type device := deviceval alloc_pool :
?mode:Tnode.memory_mode ->
device ->
pool_id:Base.int ->
size_in_bytes:Base.int ->
alignment:Base.int ->
Base.unitAllocates the slab for pool_id on device. The optional ?mode carries the tnode's memory mode so backends can pick a storage mode (Metal private vs. shared); backends that do not care ignore it.
val free_pool : (device -> pool_id:Base.int -> Base.unit) Base.optionFrees the slab for pool_id and drops its table entry. None for backends that rely on GC.
val memset_zero :
device ->
pool_id:Base.int ->
offset:Base.int ->
size_in_bytes:Base.int ->
Base.unitZero-initializes size_in_bytes at base_of pool_id + offset.
val make_context :
?ctx_buffers:ctx_buffers ->
?optimize_ctx:optimize_ctx ->
device ->
contextReturns a context without a parent.
val make_child :
?ctx_buffers:ctx_buffers ->
?optimize_ctx:optimize_ctx ->
?merge_buffer_node:Tnode.t Base.option ->
context ->
contextReturns a context with the same Backend_intf.context.device, Backend_intf.context.ctx_buffers, Backend_intf.context.optimize_ctx, Backend_intf.context.merge_buffer_node if omitted, as the given context's, which is also the Backend_intf.context.parent.
val get_name : device -> Base.string