Module Backends

A collection of the execution backends

module Schedulers : sig ... end
val finalize : 'buffer_ptr 'dev 'runner 'event. (module Ir.Backend_intf.Backend with type buffer_ptr = 'buffer_ptr and type dev = 'dev and type event = 'event and type runner = 'runner) -> ('buffer_ptr, ('buffer_ptr, 'dev, 'runner, 'event) Ir.Backend_intf.stream) Ir.Backend_intf.context -> Base.unit

Frees the arrays that are specific to the context -- not contained in the parent context. Note: use finalize to optimize memory, it is not obligatory because all arrays are freed when their buffer_ptrs are garbage-collected.

Note: this type will get simpler with modular explicits.

val fresh_backend : ?backend_name:Base.string -> ?config:Ir.Backend_intf.config -> Base.unit -> (module Ir.Backend_intf.Backend)

Creates a new backend corresponding to backend_name, or if omitted, selected via the global backend setting. It should be safe to reinitialize the tensor system before fresh_backend.