Ir.Backend_implImplementation-facing types and components.
module Lazy = Utils.Lazyval sexp_of_buffer :
'buffer_ptr. ('buffer_ptr -> Sexplib0.Sexp.t) ->
'buffer_ptr buffer ->
Sexplib0.Sexp.tmodule Buffer_types (Buffer_ptr : sig ... end) : sig ... endmodule type Buffer = sig ... endmodule type No_device_buffer_and_copying = sig ... endmodule No_device_buffer_and_copying
() :
No_device_buffer_and_copying with type buffer_ptr = Base.unit Ctypes.ptrmodule Device_types (Device_config : Backend_intf.Device_config) : sig ... endmodule Device_types_ll
(Device_config : Backend_intf.Device_config_common) :
sig ... endmodule type Device_slab = sig ... endThe device-level slab interface a Device functor consumes: the Backend_intf.Slab_alloc primitives plus the resolve_pool address resolution.
module Make_slab
(Device_types : Backend_intf.Device_types)
(Raw : No_device_buffer_and_copying) :
Device_slab
with type device = Device_types.device
and type buffer_ptr = Raw.buffer_ptrBacks the device-level slab interface with a backend's raw byte-buffer primitives and a private (device_id, pool_id) -> 'base table. Replaces the old Alloc_buffer_ignore_stream.
val next_global_device_id : Utils.atomic_intmodule Device
(Device_types : Backend_intf.Device_types)
(Slab : Device_slab with type device := Device_types.device) :
sig ... endmodule type Backend_impl_common = sig ... endParts shared by backend implementations.
module type For_add_scheduler = sig ... endAn interface to adding schedulers for stream-agnostic (typically CPU) backend implementations.
module type Lowered_no_device_backend = sig ... endLowered-level stream agnostic backend interface: implementation-facing API for CPU backends.
module type No_buffer_retrieval_or_syncing = sig ... endThe transfer/sync seam the shared Backends layer consumes. It speaks Backend_intf.buffer_loc only -- the concrete backend pointer never crosses this boundary; each backend resolves buffer_loc -> base internally.
module type With_scheduler = sig ... endAn intermediate stage for converting Lowered_no_device_backend backends into Lowered_backend. It could potentially be used for assignments-level backends too. This impl-facing stage may carry the backend-private resolve_pool (its base type does not escape to Backend_intf).
module type Lowered_backend = sig ... endLowered-level backend interface: implementation-facing API for device-based (GPU, or CPU after adding a scheduler) backends based on the Low_level IR.