diff --git a/dev/arrayjit/Arrayjit/Backend_impl/module-type-Lowered_backend/index.html b/dev/arrayjit/Arrayjit/Backend_impl/module-type-Lowered_backend/index.html index 856f1061..b85c19dc 100644 --- a/dev/arrayjit/Arrayjit/Backend_impl/module-type-Lowered_backend/index.html +++ b/dev/arrayjit/Arrayjit/Backend_impl/module-type-Lowered_backend/index.html @@ -1,7 +1,7 @@ Lowered_backend (arrayjit.Arrayjit.Backend_impl.Lowered_backend)

Module type Backend_impl.Lowered_backend

Lowered-level backend interface: implementation-facing API for device-based (GPU, or CPU after adding a scheduler) backends.

include Backend_intf.Backend_device_common
include Backend_intf.Device
include Backend_intf.Device_types
include Backend_intf.Device_config
include Backend_intf.Buffer
type buffer_ptr
include sig ... end
type dev

Interface to a device driver.

type runner

Interface to a stream driver.

type event

An event tracks if a stream finished computing past a particular point in its schedue. These values are used internally for scheduling across streams of the backend, and can be used for explicit scheduling.

include Backend_intf.Alloc_buffer with type buffer_ptr := buffer_ptr - and type stream := {stream}1421
include Backend_intf.Buffer with type buffer_ptr := buffer_ptr
include sig ... end
include Backend_intf.Backend_any_common with type buffer_ptr := buffer_ptr
include Backend_intf.Buffer with type buffer_ptr := buffer_ptr
include sig ... end
include No_buffer_retrieval_or_syncing + and type stream := {stream}1427
include Backend_intf.Buffer with type buffer_ptr := buffer_ptr
include sig ... end
include Backend_intf.Backend_any_common with type buffer_ptr := buffer_ptr
include Backend_intf.Buffer with type buffer_ptr := buffer_ptr
include sig ... end
include No_buffer_retrieval_or_syncing with type buffer_ptr := buffer_ptr and type dev := dev and type runner := runner @@ -24,14 +24,14 @@ with type event := event
include Backend_intf.Buffer with type buffer_ptr := buffer_ptr
include sig ... end
val sexp_of_dev : dev -> Sexplib0.Sexp.t
val sexp_of_runner : runner -> Sexplib0.Sexp.t
val sexp_of_event : event -> Sexplib0.Sexp.t
val name : Base.string
type nonrec device = (buffer_ptr, dev, runner, event) Backend_intf.device
val sexp_of_device : device -> Sexplib0.Sexp.t
type nonrec stream = (buffer_ptr, dev, runner, event) Backend_intf.stream
val sexp_of_stream : stream -> Sexplib0.Sexp.t
type nonrec context = (buffer_ptr, stream) Backend_intf.context
val sexp_of_context : context -> Sexplib0.Sexp.t
include Backend_intf.Alloc_buffer with type buffer_ptr := buffer_ptr and type stream := stream
include Backend_intf.Buffer with type buffer_ptr := buffer_ptr
include sig ... end
val alloc_buffer : - ?old_buffer:{buffer}1767 -> + ?old_buffer:{buffer}1773 -> size_in_bytes:Base.int -> stream -> - {buffer}1767
val alloc_zero_init_array : + {buffer}1773
val alloc_zero_init_array : Ops.prec -> dims:Base.int Base.array -> stream -> - buffer_ptr
val free_buffer : (stream -> buffer_ptr -> Base.unit) Base.option
val make_device : dev -> ordinal:Base.int -> device
val make_stream : device -> runner -> stream_id:Base.int -> stream
val make_context : ?ctx_arrays:{ctx_arrays}1694 -> stream -> context

Returns a context without a parent.

val make_child : ?ctx_arrays:{ctx_arrays}1694 -> context -> context

Returns a context with the same stream, and ctx_arrays if omitted, as the given context's, which is also the parent.

val get_name : stream -> Base.string
include Backend_intf.Backend_any_common with type buffer_ptr := buffer_ptr
include Backend_intf.Buffer with type buffer_ptr := buffer_ptr
val sexp_of_buffer_ptr : buffer_ptr -> Sexplib0.Sexp.t
val c_ptr_to_string : (buffer_ptr -> Ops.prec -> Base.string) Base.option
include sig ... end
type nonrec buffer = buffer_ptr Backend_intf.buffer
val sexp_of_buffer : buffer -> Sexplib0.Sexp.t
type nonrec ctx_arrays = buffer_ptr Backend_intf.ctx_arrays
val sexp_of_ctx_arrays : ctx_arrays -> Sexplib0.Sexp.t
val initialize : Backend_intf.config -> Base.unit

Initializes a backend before first use. Typically does nothing if the backend is already initialized, but some backends can do some safe cleanups.

val is_initialized : Base.unit -> Base.bool

Returns false if there was no previous initialize call. If it returns false, one must call initialize before using the backend.

val sync : event -> Base.unit

Blocks till the event completes, if it's not done already.

val is_done : event -> Base.bool

Whether the event completed.

val will_wait_for : context -> event -> Base.unit

Schedules waiting for the given event on the context's stream.

NOTE: it should rarely be needed to call will_wait_for explicitly, because it is typically called internally when necessary.

val get_used_memory : device -> Base.int

Returns (an upper bound of) the memory used for arrays, in bytes.

val await : stream -> Base.unit

Blocks till the stream becomes idle, i.e. synchronizes the stream.

val all_work : stream -> event

Returns the event indicating if any currently running or scheduled computations on the stream have completed.

val is_idle : stream -> Base.bool

Whether the stream is currently waiting for work.

val get_device : ordinal:Base.int -> device
val num_devices : Base.unit -> Base.int
val suggested_num_streams : device -> Base.int

The optimal number of streams for the given device to follow the config strategy.

val new_stream : device -> stream
val from_host : dst_ptr:buffer_ptr -> dst:context -> Ndarray.t -> Base.unit

Like Backend.from_host, but without synchronization and buffer retrieval.

val to_host : src_ptr:buffer_ptr -> src:context -> Ndarray.t -> Base.unit

Like Backend.to_host, but without synchronization and buffer retrieval.

val device_to_device : + buffer_ptr
val free_buffer : (stream -> buffer_ptr -> Base.unit) Base.option
val make_device : dev -> ordinal:Base.int -> device
val make_stream : device -> runner -> stream_id:Base.int -> stream
val make_context : ?ctx_arrays:{ctx_arrays}1700 -> stream -> context

Returns a context without a parent.

val make_child : ?ctx_arrays:{ctx_arrays}1700 -> context -> context

Returns a context with the same stream, and ctx_arrays if omitted, as the given context's, which is also the parent.

val get_name : stream -> Base.string
include Backend_intf.Backend_any_common with type buffer_ptr := buffer_ptr
include Backend_intf.Buffer with type buffer_ptr := buffer_ptr
val sexp_of_buffer_ptr : buffer_ptr -> Sexplib0.Sexp.t
val c_ptr_to_string : (buffer_ptr -> Ops.prec -> Base.string) Base.option
include sig ... end
type nonrec buffer = buffer_ptr Backend_intf.buffer
val sexp_of_buffer : buffer -> Sexplib0.Sexp.t
type nonrec ctx_arrays = buffer_ptr Backend_intf.ctx_arrays
val sexp_of_ctx_arrays : ctx_arrays -> Sexplib0.Sexp.t
val initialize : Backend_intf.config -> Base.unit

Initializes a backend before first use. Typically does nothing if the backend is already initialized, but some backends can do some safe cleanups.

val is_initialized : Base.unit -> Base.bool

Returns false if there was no previous initialize call. If it returns false, one must call initialize before using the backend.

val sync : event -> Base.unit

Blocks till the event completes, if it's not done already.

val is_done : event -> Base.bool

Whether the event completed.

val will_wait_for : context -> event -> Base.unit

Schedules waiting for the given event on the context's stream.

NOTE: it should rarely be needed to call will_wait_for explicitly, because it is typically called internally when necessary.

val get_used_memory : device -> Base.int

Returns (an upper bound of) the memory used for arrays, in bytes.

val get_global_debug_info : Base.unit -> Base.Sexp.t

Global debug information; backend-specific and might evolve independently on the backends.

val get_debug_info : stream -> Base.Sexp.t

Per-stream debug information; backend-specific and might evolve independently on the backends

val await : stream -> Base.unit

Blocks till the stream becomes idle, i.e. synchronizes the stream.

val all_work : stream -> event

Returns the event indicating if any currently running or scheduled computations on the stream have completed.

val is_idle : stream -> Base.bool

Whether the stream is currently waiting for work.

val get_device : ordinal:Base.int -> device
val num_devices : Base.unit -> Base.int
val suggested_num_streams : device -> Base.int

The optimal number of streams for the given device to follow the config strategy.

val new_stream : device -> stream
val from_host : dst_ptr:buffer_ptr -> dst:context -> Ndarray.t -> Base.unit

Like Backend.from_host, but without synchronization and buffer retrieval.

val to_host : src_ptr:buffer_ptr -> src:context -> Ndarray.t -> Base.unit

Like Backend.to_host, but without synchronization and buffer retrieval.

val device_to_device : Tnode.t -> into_merge_buffer:Backend_intf.merge_buffer_use -> dst_ptr:buffer_ptr Base.option -> diff --git a/dev/arrayjit/Arrayjit/Backend_impl/module-type-No_buffer_retrieval_or_syncing/index.html b/dev/arrayjit/Arrayjit/Backend_impl/module-type-No_buffer_retrieval_or_syncing/index.html index 443f9202..d69582a6 100644 --- a/dev/arrayjit/Arrayjit/Backend_impl/module-type-No_buffer_retrieval_or_syncing/index.html +++ b/dev/arrayjit/Arrayjit/Backend_impl/module-type-No_buffer_retrieval_or_syncing/index.html @@ -2,14 +2,14 @@ No_buffer_retrieval_or_syncing (arrayjit.Arrayjit.Backend_impl.No_buffer_retrieval_or_syncing)

Module type Backend_impl.No_buffer_retrieval_or_syncing

include Backend_impl_common
include Backend_intf.Buffer
type buffer_ptr
include sig ... end
val use_host_memory : Base.bool

If true, the backend will read from and write to the host memory directly whenever possible.

use_host_memory can only be true on unified memory devices, like CPU and Apple Metal.

include Backend_intf.Backend_device_common with type buffer_ptr := buffer_ptr
include Backend_intf.Device with type buffer_ptr := buffer_ptr
include Backend_intf.Device_types with type buffer_ptr := buffer_ptr
include Backend_intf.Device_config with type buffer_ptr := buffer_ptr
include Backend_intf.Buffer with type buffer_ptr := buffer_ptr
include sig ... end
type dev

Interface to a device driver.

val sexp_of_dev : dev -> Sexplib0.Sexp.t
type runner

Interface to a stream driver.

val sexp_of_runner : runner -> Sexplib0.Sexp.t
type event

An event tracks if a stream finished computing past a particular point in its schedue. These values are used internally for scheduling across streams of the backend, and can be used for explicit scheduling.

val sexp_of_event : event -> Sexplib0.Sexp.t
val name : Base.string
type nonrec device = (buffer_ptr, dev, runner, event) Backend_intf.device
val sexp_of_device : device -> Sexplib0.Sexp.t
type nonrec stream = (buffer_ptr, dev, runner, event) Backend_intf.stream
val sexp_of_stream : stream -> Sexplib0.Sexp.t
type nonrec context = (buffer_ptr, stream) Backend_intf.context
val sexp_of_context : context -> Sexplib0.Sexp.t
include Backend_intf.Alloc_buffer with type buffer_ptr := buffer_ptr and type stream := stream
include Backend_intf.Buffer with type buffer_ptr := buffer_ptr
include sig ... end
val alloc_buffer : - ?old_buffer:{buffer}581 -> + ?old_buffer:{buffer}583 -> size_in_bytes:Base.int -> stream -> - {buffer}581
val alloc_zero_init_array : + {buffer}583
val alloc_zero_init_array : Ops.prec -> dims:Base.int Base.array -> stream -> - buffer_ptr
val free_buffer : (stream -> buffer_ptr -> Base.unit) Base.option
val make_device : dev -> ordinal:Base.int -> device
val make_stream : device -> runner -> stream_id:Base.int -> stream
val make_context : ?ctx_arrays:{ctx_arrays}508 -> stream -> context

Returns a context without a parent.

val make_child : ?ctx_arrays:{ctx_arrays}508 -> context -> context

Returns a context with the same stream, and ctx_arrays if omitted, as the given context's, which is also the parent.

val get_name : stream -> Base.string
include Backend_intf.Backend_any_common with type buffer_ptr := buffer_ptr
include Backend_intf.Buffer with type buffer_ptr := buffer_ptr
val sexp_of_buffer_ptr : buffer_ptr -> Sexplib0.Sexp.t
val c_ptr_to_string : (buffer_ptr -> Ops.prec -> Base.string) Base.option
include sig ... end
type nonrec buffer = buffer_ptr Backend_intf.buffer
val sexp_of_buffer : buffer -> Sexplib0.Sexp.t
type nonrec ctx_arrays = buffer_ptr Backend_intf.ctx_arrays
val sexp_of_ctx_arrays : ctx_arrays -> Sexplib0.Sexp.t
val initialize : Backend_intf.config -> Base.unit

Initializes a backend before first use. Typically does nothing if the backend is already initialized, but some backends can do some safe cleanups.

val is_initialized : Base.unit -> Base.bool

Returns false if there was no previous initialize call. If it returns false, one must call initialize before using the backend.

val sync : event -> Base.unit

Blocks till the event completes, if it's not done already.

val is_done : event -> Base.bool

Whether the event completed.

val will_wait_for : context -> event -> Base.unit

Schedules waiting for the given event on the context's stream.

NOTE: it should rarely be needed to call will_wait_for explicitly, because it is typically called internally when necessary.

val get_used_memory : device -> Base.int

Returns (an upper bound of) the memory used for arrays, in bytes.

val await : stream -> Base.unit

Blocks till the stream becomes idle, i.e. synchronizes the stream.

val all_work : stream -> event

Returns the event indicating if any currently running or scheduled computations on the stream have completed.

val is_idle : stream -> Base.bool

Whether the stream is currently waiting for work.

val get_device : ordinal:Base.int -> device
val num_devices : Base.unit -> Base.int
val suggested_num_streams : device -> Base.int

The optimal number of streams for the given device to follow the config strategy.

val new_stream : device -> stream
val from_host : dst_ptr:buffer_ptr -> dst:context -> Ndarray.t -> Base.unit

Like Backend.from_host, but without synchronization and buffer retrieval.

val to_host : src_ptr:buffer_ptr -> src:context -> Ndarray.t -> Base.unit

Like Backend.to_host, but without synchronization and buffer retrieval.

val device_to_device : + buffer_ptr
val free_buffer : (stream -> buffer_ptr -> Base.unit) Base.option
val make_device : dev -> ordinal:Base.int -> device
val make_stream : device -> runner -> stream_id:Base.int -> stream
val make_context : ?ctx_arrays:{ctx_arrays}510 -> stream -> context

Returns a context without a parent.

val make_child : ?ctx_arrays:{ctx_arrays}510 -> context -> context

Returns a context with the same stream, and ctx_arrays if omitted, as the given context's, which is also the parent.

val get_name : stream -> Base.string
include Backend_intf.Backend_any_common with type buffer_ptr := buffer_ptr
include Backend_intf.Buffer with type buffer_ptr := buffer_ptr
val sexp_of_buffer_ptr : buffer_ptr -> Sexplib0.Sexp.t
val c_ptr_to_string : (buffer_ptr -> Ops.prec -> Base.string) Base.option
include sig ... end
type nonrec buffer = buffer_ptr Backend_intf.buffer
val sexp_of_buffer : buffer -> Sexplib0.Sexp.t
type nonrec ctx_arrays = buffer_ptr Backend_intf.ctx_arrays
val sexp_of_ctx_arrays : ctx_arrays -> Sexplib0.Sexp.t
val initialize : Backend_intf.config -> Base.unit

Initializes a backend before first use. Typically does nothing if the backend is already initialized, but some backends can do some safe cleanups.

val is_initialized : Base.unit -> Base.bool

Returns false if there was no previous initialize call. If it returns false, one must call initialize before using the backend.

val sync : event -> Base.unit

Blocks till the event completes, if it's not done already.

val is_done : event -> Base.bool

Whether the event completed.

val will_wait_for : context -> event -> Base.unit

Schedules waiting for the given event on the context's stream.

NOTE: it should rarely be needed to call will_wait_for explicitly, because it is typically called internally when necessary.

val get_used_memory : device -> Base.int

Returns (an upper bound of) the memory used for arrays, in bytes.

val get_global_debug_info : Base.unit -> Base.Sexp.t

Global debug information; backend-specific and might evolve independently on the backends.

val get_debug_info : stream -> Base.Sexp.t

Per-stream debug information; backend-specific and might evolve independently on the backends

val await : stream -> Base.unit

Blocks till the stream becomes idle, i.e. synchronizes the stream.

val all_work : stream -> event

Returns the event indicating if any currently running or scheduled computations on the stream have completed.

val is_idle : stream -> Base.bool

Whether the stream is currently waiting for work.

val get_device : ordinal:Base.int -> device
val num_devices : Base.unit -> Base.int
val suggested_num_streams : device -> Base.int

The optimal number of streams for the given device to follow the config strategy.

val new_stream : device -> stream
val from_host : dst_ptr:buffer_ptr -> dst:context -> Ndarray.t -> Base.unit

Like Backend.from_host, but without synchronization and buffer retrieval.

val to_host : src_ptr:buffer_ptr -> src:context -> Ndarray.t -> Base.unit

Like Backend.to_host, but without synchronization and buffer retrieval.

val device_to_device : Tnode.t -> into_merge_buffer:Backend_intf.merge_buffer_use -> dst_ptr:buffer_ptr Base.option -> diff --git a/dev/arrayjit/Arrayjit/Backend_impl/module-type-With_scheduler/index.html b/dev/arrayjit/Arrayjit/Backend_impl/module-type-With_scheduler/index.html index 8b1c71ce..766b26bf 100644 --- a/dev/arrayjit/Arrayjit/Backend_impl/module-type-With_scheduler/index.html +++ b/dev/arrayjit/Arrayjit/Backend_impl/module-type-With_scheduler/index.html @@ -2,11 +2,11 @@ With_scheduler (arrayjit.Arrayjit.Backend_impl.With_scheduler)

Module type Backend_impl.With_scheduler

An intermediate stage for converting Lowered_no_device_backend backends into Lowered_backend.

include Backend_intf.Backend_device_common
include Backend_intf.Device
include Backend_intf.Device_types
include Backend_intf.Device_config
include Backend_intf.Buffer
type buffer_ptr
include sig ... end
type dev

Interface to a device driver.

val sexp_of_dev : dev -> Sexplib0.Sexp.t
type runner

Interface to a stream driver.

val sexp_of_runner : runner -> Sexplib0.Sexp.t
type event

An event tracks if a stream finished computing past a particular point in its schedue. These values are used internally for scheduling across streams of the backend, and can be used for explicit scheduling.

val sexp_of_event : event -> Sexplib0.Sexp.t
val name : Base.string
type nonrec device = (buffer_ptr, dev, runner, event) Backend_intf.device
val sexp_of_device : device -> Sexplib0.Sexp.t
type nonrec stream = (buffer_ptr, dev, runner, event) Backend_intf.stream
val sexp_of_stream : stream -> Sexplib0.Sexp.t
type nonrec context = (buffer_ptr, stream) Backend_intf.context
val sexp_of_context : context -> Sexplib0.Sexp.t
include Backend_intf.Alloc_buffer with type buffer_ptr := buffer_ptr and type stream := stream
include Backend_intf.Buffer with type buffer_ptr := buffer_ptr
include sig ... end
val alloc_buffer : - ?old_buffer:{buffer}837 -> + ?old_buffer:{buffer}839 -> size_in_bytes:Base.int -> stream -> - {buffer}837
val alloc_zero_init_array : + {buffer}839
val alloc_zero_init_array : Ops.prec -> dims:Base.int Base.array -> stream -> - buffer_ptr
val free_buffer : (stream -> buffer_ptr -> Base.unit) Base.option
val make_device : dev -> ordinal:Base.int -> device
val make_stream : device -> runner -> stream_id:Base.int -> stream
val make_context : ?ctx_arrays:{ctx_arrays}764 -> stream -> context

Returns a context without a parent.

val make_child : ?ctx_arrays:{ctx_arrays}764 -> context -> context

Returns a context with the same stream, and ctx_arrays if omitted, as the given context's, which is also the parent.

val get_name : stream -> Base.string
include Backend_intf.Backend_any_common with type buffer_ptr := buffer_ptr
include Backend_intf.Buffer with type buffer_ptr := buffer_ptr
val sexp_of_buffer_ptr : buffer_ptr -> Sexplib0.Sexp.t
val c_ptr_to_string : (buffer_ptr -> Ops.prec -> Base.string) Base.option
include sig ... end
type nonrec buffer = buffer_ptr Backend_intf.buffer
val sexp_of_buffer : buffer -> Sexplib0.Sexp.t
type nonrec ctx_arrays = buffer_ptr Backend_intf.ctx_arrays
val sexp_of_ctx_arrays : ctx_arrays -> Sexplib0.Sexp.t
val initialize : Backend_intf.config -> Base.unit

Initializes a backend before first use. Typically does nothing if the backend is already initialized, but some backends can do some safe cleanups.

val is_initialized : Base.unit -> Base.bool

Returns false if there was no previous initialize call. If it returns false, one must call initialize before using the backend.

val sync : event -> Base.unit

Blocks till the event completes, if it's not done already.

val is_done : event -> Base.bool

Whether the event completed.

val will_wait_for : context -> event -> Base.unit

Schedules waiting for the given event on the context's stream.

NOTE: it should rarely be needed to call will_wait_for explicitly, because it is typically called internally when necessary.

val get_used_memory : device -> Base.int

Returns (an upper bound of) the memory used for arrays, in bytes.

val await : stream -> Base.unit

Blocks till the stream becomes idle, i.e. synchronizes the stream.

val all_work : stream -> event

Returns the event indicating if any currently running or scheduled computations on the stream have completed.

val is_idle : stream -> Base.bool

Whether the stream is currently waiting for work.

val get_device : ordinal:Base.int -> device
val num_devices : Base.unit -> Base.int
val suggested_num_streams : device -> Base.int

The optimal number of streams for the given device to follow the config strategy.

val new_stream : device -> stream
val schedule_task : stream -> Task.t -> Base.unit
+ buffer_ptr
val free_buffer : (stream -> buffer_ptr -> Base.unit) Base.option
val make_device : dev -> ordinal:Base.int -> device
val make_stream : device -> runner -> stream_id:Base.int -> stream
val make_context : ?ctx_arrays:{ctx_arrays}766 -> stream -> context

Returns a context without a parent.

val make_child : ?ctx_arrays:{ctx_arrays}766 -> context -> context

Returns a context with the same stream, and ctx_arrays if omitted, as the given context's, which is also the parent.

val get_name : stream -> Base.string
include Backend_intf.Backend_any_common with type buffer_ptr := buffer_ptr
include Backend_intf.Buffer with type buffer_ptr := buffer_ptr
val sexp_of_buffer_ptr : buffer_ptr -> Sexplib0.Sexp.t
val c_ptr_to_string : (buffer_ptr -> Ops.prec -> Base.string) Base.option
include sig ... end
type nonrec buffer = buffer_ptr Backend_intf.buffer
val sexp_of_buffer : buffer -> Sexplib0.Sexp.t
type nonrec ctx_arrays = buffer_ptr Backend_intf.ctx_arrays
val sexp_of_ctx_arrays : ctx_arrays -> Sexplib0.Sexp.t
val initialize : Backend_intf.config -> Base.unit

Initializes a backend before first use. Typically does nothing if the backend is already initialized, but some backends can do some safe cleanups.

val is_initialized : Base.unit -> Base.bool

Returns false if there was no previous initialize call. If it returns false, one must call initialize before using the backend.

val sync : event -> Base.unit

Blocks till the event completes, if it's not done already.

val is_done : event -> Base.bool

Whether the event completed.

val will_wait_for : context -> event -> Base.unit

Schedules waiting for the given event on the context's stream.

NOTE: it should rarely be needed to call will_wait_for explicitly, because it is typically called internally when necessary.

val get_used_memory : device -> Base.int

Returns (an upper bound of) the memory used for arrays, in bytes.

val get_global_debug_info : Base.unit -> Base.Sexp.t

Global debug information; backend-specific and might evolve independently on the backends.

val get_debug_info : stream -> Base.Sexp.t

Per-stream debug information; backend-specific and might evolve independently on the backends

val await : stream -> Base.unit

Blocks till the stream becomes idle, i.e. synchronizes the stream.

val all_work : stream -> event

Returns the event indicating if any currently running or scheduled computations on the stream have completed.

val is_idle : stream -> Base.bool

Whether the stream is currently waiting for work.

val get_device : ordinal:Base.int -> device
val num_devices : Base.unit -> Base.int
val suggested_num_streams : device -> Base.int

The optimal number of streams for the given device to follow the config strategy.

val new_stream : device -> stream
val schedule_task : stream -> Task.t -> Base.unit
diff --git a/dev/arrayjit/Arrayjit/Backend_intf/module-type-Backend/index.html b/dev/arrayjit/Arrayjit/Backend_intf/module-type-Backend/index.html index 7ed45fde..3feb2dd9 100644 --- a/dev/arrayjit/Arrayjit/Backend_intf/module-type-Backend/index.html +++ b/dev/arrayjit/Arrayjit/Backend_intf/module-type-Backend/index.html @@ -20,7 +20,7 @@ Ops.prec -> dims:Base.int Base.array -> stream -> - buffer_ptr
val free_buffer : (stream -> buffer_ptr -> Base.unit) Base.option
val make_device : dev -> ordinal:Base.int -> device
val make_stream : device -> runner -> stream_id:Base.int -> stream
val make_context : ?ctx_arrays:{ctx_arrays}582 -> stream -> context

Returns a context without a parent.

val make_child : ?ctx_arrays:{ctx_arrays}582 -> context -> context

Returns a context with the same stream, and ctx_arrays if omitted, as the given context's, which is also the parent.

val get_name : stream -> Base.string
include Backend_any_common with type buffer_ptr := buffer_ptr
include Buffer with type buffer_ptr := buffer_ptr
val sexp_of_buffer_ptr : buffer_ptr -> Sexplib0.Sexp.t
val c_ptr_to_string : (buffer_ptr -> Ops.prec -> Base.string) Base.option
include sig ... end
type nonrec buffer = buffer_ptr buffer
val sexp_of_buffer : buffer -> Sexplib0.Sexp.t
type nonrec ctx_arrays = buffer_ptr ctx_arrays
val sexp_of_ctx_arrays : ctx_arrays -> Sexplib0.Sexp.t
val initialize : config -> Base.unit

Initializes a backend before first use. Typically does nothing if the backend is already initialized, but some backends can do some safe cleanups.

val is_initialized : Base.unit -> Base.bool

Returns false if there was no previous initialize call. If it returns false, one must call initialize before using the backend.

val sync : event -> Base.unit

Blocks till the event completes, if it's not done already.

val is_done : event -> Base.bool

Whether the event completed.

val will_wait_for : context -> event -> Base.unit

Schedules waiting for the given event on the context's stream.

NOTE: it should rarely be needed to call will_wait_for explicitly, because it is typically called internally when necessary.

val get_used_memory : device -> Base.int

Returns (an upper bound of) the memory used for arrays, in bytes.

val await : stream -> Base.unit

Blocks till the stream becomes idle, i.e. synchronizes the stream.

val all_work : stream -> event

Returns the event indicating if any currently running or scheduled computations on the stream have completed.

val is_idle : stream -> Base.bool

Whether the stream is currently waiting for work.

val get_device : ordinal:Base.int -> device
val num_devices : Base.unit -> Base.int
val suggested_num_streams : device -> Base.int

The optimal number of streams for the given device to follow the config strategy.

val new_stream : device -> stream

Returns the routine for the code's procedure, in a new context derived from the given context.

val free_buffer : (stream -> buffer_ptr -> Base.unit) Base.option
val make_device : dev -> ordinal:Base.int -> device
val make_stream : device -> runner -> stream_id:Base.int -> stream
val make_context : ?ctx_arrays:{ctx_arrays}582 -> stream -> context

Returns a context without a parent.

val make_child : ?ctx_arrays:{ctx_arrays}582 -> context -> context

Returns a context with the same stream, and ctx_arrays if omitted, as the given context's, which is also the parent.

val get_name : stream -> Base.string
include Backend_any_common with type buffer_ptr := buffer_ptr
include Buffer with type buffer_ptr := buffer_ptr
val sexp_of_buffer_ptr : buffer_ptr -> Sexplib0.Sexp.t
val c_ptr_to_string : (buffer_ptr -> Ops.prec -> Base.string) Base.option
include sig ... end
type nonrec buffer = buffer_ptr buffer
val sexp_of_buffer : buffer -> Sexplib0.Sexp.t
type nonrec ctx_arrays = buffer_ptr ctx_arrays
val sexp_of_ctx_arrays : ctx_arrays -> Sexplib0.Sexp.t
val initialize : config -> Base.unit

Initializes a backend before first use. Typically does nothing if the backend is already initialized, but some backends can do some safe cleanups.

val is_initialized : Base.unit -> Base.bool

Returns false if there was no previous initialize call. If it returns false, one must call initialize before using the backend.

val sync : event -> Base.unit

Blocks till the event completes, if it's not done already.

val is_done : event -> Base.bool

Whether the event completed.

val will_wait_for : context -> event -> Base.unit

Schedules waiting for the given event on the context's stream.

NOTE: it should rarely be needed to call will_wait_for explicitly, because it is typically called internally when necessary.

val get_used_memory : device -> Base.int

Returns (an upper bound of) the memory used for arrays, in bytes.

val get_global_debug_info : Base.unit -> Base.Sexp.t

Global debug information; backend-specific and might evolve independently on the backends.

val get_debug_info : stream -> Base.Sexp.t

Per-stream debug information; backend-specific and might evolve independently on the backends

val await : stream -> Base.unit

Blocks till the stream becomes idle, i.e. synchronizes the stream.

val all_work : stream -> event

Returns the event indicating if any currently running or scheduled computations on the stream have completed.

val is_idle : stream -> Base.bool

Whether the stream is currently waiting for work.

val get_device : ordinal:Base.int -> device
val num_devices : Base.unit -> Base.int
val suggested_num_streams : device -> Base.int

The optimal number of streams for the given device to follow the config strategy.

val new_stream : device -> stream

Returns the routine for the code's procedure, in a new context derived from the given context.

Returns the routines for the procedures included in the code batch. The returned context is downstream of all the returned routines.

include With_buffer_retrieval_and_syncing diff --git a/dev/arrayjit/Arrayjit/Backend_intf/module-type-Backend_device_common/index.html b/dev/arrayjit/Arrayjit/Backend_intf/module-type-Backend_device_common/index.html index 87bc7f61..6b18bff3 100644 --- a/dev/arrayjit/Arrayjit/Backend_intf/module-type-Backend_device_common/index.html +++ b/dev/arrayjit/Arrayjit/Backend_intf/module-type-Backend_device_common/index.html @@ -9,4 +9,4 @@ Ops.prec -> dims:Base.int Base.array -> stream -> - buffer_ptr
val free_buffer : (stream -> buffer_ptr -> Base.unit) Base.option
val make_device : dev -> ordinal:Base.int -> device
val make_stream : device -> runner -> stream_id:Base.int -> stream
val make_context : ?ctx_arrays:{ctx_arrays}224 -> stream -> context

Returns a context without a parent.

val make_child : ?ctx_arrays:{ctx_arrays}224 -> context -> context

Returns a context with the same stream, and ctx_arrays if omitted, as the given context's, which is also the parent.

val get_name : stream -> Base.string
include Backend_any_common with type buffer_ptr := buffer_ptr
include Buffer with type buffer_ptr := buffer_ptr
val sexp_of_buffer_ptr : buffer_ptr -> Sexplib0.Sexp.t
val c_ptr_to_string : (buffer_ptr -> Ops.prec -> Base.string) Base.option
include sig ... end
type nonrec buffer = buffer_ptr buffer
val sexp_of_buffer : buffer -> Sexplib0.Sexp.t
type nonrec ctx_arrays = buffer_ptr ctx_arrays
val sexp_of_ctx_arrays : ctx_arrays -> Sexplib0.Sexp.t
val initialize : config -> Base.unit

Initializes a backend before first use. Typically does nothing if the backend is already initialized, but some backends can do some safe cleanups.

val is_initialized : Base.unit -> Base.bool

Returns false if there was no previous initialize call. If it returns false, one must call initialize before using the backend.

val sync : event -> Base.unit

Blocks till the event completes, if it's not done already.

val is_done : event -> Base.bool

Whether the event completed.

val will_wait_for : context -> event -> Base.unit

Schedules waiting for the given event on the context's stream.

NOTE: it should rarely be needed to call will_wait_for explicitly, because it is typically called internally when necessary.

val get_used_memory : device -> Base.int

Returns (an upper bound of) the memory used for arrays, in bytes.

val await : stream -> Base.unit

Blocks till the stream becomes idle, i.e. synchronizes the stream.

val all_work : stream -> event

Returns the event indicating if any currently running or scheduled computations on the stream have completed.

val is_idle : stream -> Base.bool

Whether the stream is currently waiting for work.

val get_device : ordinal:Base.int -> device
val num_devices : Base.unit -> Base.int
val suggested_num_streams : device -> Base.int

The optimal number of streams for the given device to follow the config strategy.

val new_stream : device -> stream
+ buffer_ptr
val free_buffer : (stream -> buffer_ptr -> Base.unit) Base.option
val make_device : dev -> ordinal:Base.int -> device
val make_stream : device -> runner -> stream_id:Base.int -> stream
val make_context : ?ctx_arrays:{ctx_arrays}224 -> stream -> context

Returns a context without a parent.

val make_child : ?ctx_arrays:{ctx_arrays}224 -> context -> context

Returns a context with the same stream, and ctx_arrays if omitted, as the given context's, which is also the parent.

val get_name : stream -> Base.string
include Backend_any_common with type buffer_ptr := buffer_ptr
include Buffer with type buffer_ptr := buffer_ptr
val sexp_of_buffer_ptr : buffer_ptr -> Sexplib0.Sexp.t
val c_ptr_to_string : (buffer_ptr -> Ops.prec -> Base.string) Base.option
include sig ... end
type nonrec buffer = buffer_ptr buffer
val sexp_of_buffer : buffer -> Sexplib0.Sexp.t
type nonrec ctx_arrays = buffer_ptr ctx_arrays
val sexp_of_ctx_arrays : ctx_arrays -> Sexplib0.Sexp.t
val initialize : config -> Base.unit

Initializes a backend before first use. Typically does nothing if the backend is already initialized, but some backends can do some safe cleanups.

val is_initialized : Base.unit -> Base.bool

Returns false if there was no previous initialize call. If it returns false, one must call initialize before using the backend.

val sync : event -> Base.unit

Blocks till the event completes, if it's not done already.

val is_done : event -> Base.bool

Whether the event completed.

val will_wait_for : context -> event -> Base.unit

Schedules waiting for the given event on the context's stream.

NOTE: it should rarely be needed to call will_wait_for explicitly, because it is typically called internally when necessary.

val get_used_memory : device -> Base.int

Returns (an upper bound of) the memory used for arrays, in bytes.

val get_global_debug_info : Base.unit -> Base.Sexp.t

Global debug information; backend-specific and might evolve independently on the backends.

val get_debug_info : stream -> Base.Sexp.t

Per-stream debug information; backend-specific and might evolve independently on the backends

val await : stream -> Base.unit

Blocks till the stream becomes idle, i.e. synchronizes the stream.

val all_work : stream -> event

Returns the event indicating if any currently running or scheduled computations on the stream have completed.

val is_idle : stream -> Base.bool

Whether the stream is currently waiting for work.

val get_device : ordinal:Base.int -> device
val num_devices : Base.unit -> Base.int
val suggested_num_streams : device -> Base.int

The optimal number of streams for the given device to follow the config strategy.

val new_stream : device -> stream
diff --git a/dev/arrayjit/Arrayjit/Cuda_backend/index.html b/dev/arrayjit/Arrayjit/Cuda_backend/index.html index e08a8d3c..8e2a02ca 100644 --- a/dev/arrayjit/Arrayjit/Cuda_backend/index.html +++ b/dev/arrayjit/Arrayjit/Cuda_backend/index.html @@ -1,7 +1,7 @@ Cuda_backend (arrayjit.Arrayjit.Cuda_backend)

Module Arrayjit.Cuda_backend

include Backend_impl.Lowered_backend
include Backend_intf.Backend_device_common
include Backend_intf.Device
include Backend_intf.Device_types
include Backend_intf.Device_config
include Backend_intf.Buffer
type buffer_ptr
include sig ... end
type dev

Interface to a device driver.

type runner

Interface to a stream driver.

type event

An event tracks if a stream finished computing past a particular point in its schedue. These values are used internally for scheduling across streams of the backend, and can be used for explicit scheduling.

include Backend_intf.Alloc_buffer with type buffer_ptr := buffer_ptr - and type stream := {stream}165
include Backend_intf.Buffer with type buffer_ptr := buffer_ptr
include sig ... end
include Backend_intf.Backend_any_common with type buffer_ptr := buffer_ptr
include Backend_intf.Buffer with type buffer_ptr := buffer_ptr
include sig ... end
include Backend_impl.No_buffer_retrieval_or_syncing + and type stream := {stream}167
include Backend_intf.Buffer with type buffer_ptr := buffer_ptr
include sig ... end
include Backend_intf.Backend_any_common with type buffer_ptr := buffer_ptr
include Backend_intf.Buffer with type buffer_ptr := buffer_ptr
include sig ... end
include Backend_impl.No_buffer_retrieval_or_syncing with type buffer_ptr := buffer_ptr and type dev := dev and type runner := runner @@ -24,14 +24,14 @@ with type event := event
include Backend_intf.Buffer with type buffer_ptr := buffer_ptr
include sig ... end
val sexp_of_dev : dev -> Sexplib0.Sexp.t
val sexp_of_runner : runner -> Sexplib0.Sexp.t
val sexp_of_event : event -> Sexplib0.Sexp.t
val name : Base.string
type nonrec device = (buffer_ptr, dev, runner, event) Backend_intf.device
val sexp_of_device : device -> Sexplib0.Sexp.t
type nonrec stream = (buffer_ptr, dev, runner, event) Backend_intf.stream
val sexp_of_stream : stream -> Sexplib0.Sexp.t
type nonrec context = (buffer_ptr, stream) Backend_intf.context
val sexp_of_context : context -> Sexplib0.Sexp.t
include Backend_intf.Alloc_buffer with type buffer_ptr := buffer_ptr and type stream := stream
include Backend_intf.Buffer with type buffer_ptr := buffer_ptr
include sig ... end
val alloc_buffer : - ?old_buffer:{buffer}511 -> + ?old_buffer:{buffer}513 -> size_in_bytes:Base.int -> stream -> - {buffer}511
val alloc_zero_init_array : + {buffer}513
val alloc_zero_init_array : Ops.prec -> dims:Base.int Base.array -> stream -> - buffer_ptr
val free_buffer : (stream -> buffer_ptr -> Base.unit) Base.option
val make_device : dev -> ordinal:Base.int -> device
val make_stream : device -> runner -> stream_id:Base.int -> stream
val make_context : ?ctx_arrays:{ctx_arrays}438 -> stream -> context

Returns a context without a parent.

val make_child : ?ctx_arrays:{ctx_arrays}438 -> context -> context

Returns a context with the same stream, and ctx_arrays if omitted, as the given context's, which is also the parent.

val get_name : stream -> Base.string
include Backend_intf.Backend_any_common with type buffer_ptr := buffer_ptr
include Backend_intf.Buffer with type buffer_ptr := buffer_ptr
val sexp_of_buffer_ptr : buffer_ptr -> Sexplib0.Sexp.t
val c_ptr_to_string : (buffer_ptr -> Ops.prec -> Base.string) Base.option
include sig ... end
type nonrec buffer = buffer_ptr Backend_intf.buffer
val sexp_of_buffer : buffer -> Sexplib0.Sexp.t
type nonrec ctx_arrays = buffer_ptr Backend_intf.ctx_arrays
val sexp_of_ctx_arrays : ctx_arrays -> Sexplib0.Sexp.t
val initialize : Backend_intf.config -> Base.unit

Initializes a backend before first use. Typically does nothing if the backend is already initialized, but some backends can do some safe cleanups.

val is_initialized : Base.unit -> Base.bool

Returns false if there was no previous initialize call. If it returns false, one must call initialize before using the backend.

val sync : event -> Base.unit

Blocks till the event completes, if it's not done already.

val is_done : event -> Base.bool

Whether the event completed.

val will_wait_for : context -> event -> Base.unit

Schedules waiting for the given event on the context's stream.

NOTE: it should rarely be needed to call will_wait_for explicitly, because it is typically called internally when necessary.

val get_used_memory : device -> Base.int

Returns (an upper bound of) the memory used for arrays, in bytes.

val await : stream -> Base.unit

Blocks till the stream becomes idle, i.e. synchronizes the stream.

val all_work : stream -> event

Returns the event indicating if any currently running or scheduled computations on the stream have completed.

val is_idle : stream -> Base.bool

Whether the stream is currently waiting for work.

val get_device : ordinal:Base.int -> device
val num_devices : Base.unit -> Base.int
val suggested_num_streams : device -> Base.int

The optimal number of streams for the given device to follow the config strategy.

val new_stream : device -> stream
val from_host : dst_ptr:buffer_ptr -> dst:context -> Ndarray.t -> Base.unit

Like Backend.from_host, but without synchronization and buffer retrieval.

val to_host : src_ptr:buffer_ptr -> src:context -> Ndarray.t -> Base.unit

Like Backend.to_host, but without synchronization and buffer retrieval.

val device_to_device : + buffer_ptr
val free_buffer : (stream -> buffer_ptr -> Base.unit) Base.option
val make_device : dev -> ordinal:Base.int -> device
val make_stream : device -> runner -> stream_id:Base.int -> stream
val make_context : ?ctx_arrays:{ctx_arrays}440 -> stream -> context

Returns a context without a parent.

val make_child : ?ctx_arrays:{ctx_arrays}440 -> context -> context

Returns a context with the same stream, and ctx_arrays if omitted, as the given context's, which is also the parent.

val get_name : stream -> Base.string
include Backend_intf.Backend_any_common with type buffer_ptr := buffer_ptr
include Backend_intf.Buffer with type buffer_ptr := buffer_ptr
val sexp_of_buffer_ptr : buffer_ptr -> Sexplib0.Sexp.t
val c_ptr_to_string : (buffer_ptr -> Ops.prec -> Base.string) Base.option
include sig ... end
type nonrec buffer = buffer_ptr Backend_intf.buffer
val sexp_of_buffer : buffer -> Sexplib0.Sexp.t
type nonrec ctx_arrays = buffer_ptr Backend_intf.ctx_arrays
val sexp_of_ctx_arrays : ctx_arrays -> Sexplib0.Sexp.t
val initialize : Backend_intf.config -> Base.unit

Initializes a backend before first use. Typically does nothing if the backend is already initialized, but some backends can do some safe cleanups.

val is_initialized : Base.unit -> Base.bool

Returns false if there was no previous initialize call. If it returns false, one must call initialize before using the backend.

val sync : event -> Base.unit

Blocks till the event completes, if it's not done already.

val is_done : event -> Base.bool

Whether the event completed.

val will_wait_for : context -> event -> Base.unit

Schedules waiting for the given event on the context's stream.

NOTE: it should rarely be needed to call will_wait_for explicitly, because it is typically called internally when necessary.

val get_used_memory : device -> Base.int

Returns (an upper bound of) the memory used for arrays, in bytes.

val get_global_debug_info : Base.unit -> Base.Sexp.t

Global debug information; backend-specific and might evolve independently on the backends.

val get_debug_info : stream -> Base.Sexp.t

Per-stream debug information; backend-specific and might evolve independently on the backends

val await : stream -> Base.unit

Blocks till the stream becomes idle, i.e. synchronizes the stream.

val all_work : stream -> event

Returns the event indicating if any currently running or scheduled computations on the stream have completed.

val is_idle : stream -> Base.bool

Whether the stream is currently waiting for work.

val get_device : ordinal:Base.int -> device
val num_devices : Base.unit -> Base.int
val suggested_num_streams : device -> Base.int

The optimal number of streams for the given device to follow the config strategy.

val new_stream : device -> stream
val from_host : dst_ptr:buffer_ptr -> dst:context -> Ndarray.t -> Base.unit

Like Backend.from_host, but without synchronization and buffer retrieval.

val to_host : src_ptr:buffer_ptr -> src:context -> Ndarray.t -> Base.unit

Like Backend.to_host, but without synchronization and buffer retrieval.

val device_to_device : Tnode.t -> into_merge_buffer:Backend_intf.merge_buffer_use -> dst_ptr:buffer_ptr Base.option -> diff --git a/dev/arrayjit/Arrayjit/Schedulers/Multicore/index.html b/dev/arrayjit/Arrayjit/Schedulers/Multicore/index.html index 54dbabe1..c98b69a9 100644 --- a/dev/arrayjit/Arrayjit/Schedulers/Multicore/index.html +++ b/dev/arrayjit/Arrayjit/Schedulers/Multicore/index.html @@ -10,4 +10,4 @@ Ops.prec -> dims:Base.int Base.array -> stream -> - buffer_ptr
val free_buffer : (stream -> buffer_ptr -> Base.unit) Base.option
val make_device : dev -> ordinal:Base.int -> device
val make_stream : device -> runner -> stream_id:Base.int -> stream
val make_context : ?ctx_arrays:{ctx_arrays}79 -> stream -> context

Returns a context without a parent.

val make_child : ?ctx_arrays:{ctx_arrays}79 -> context -> context

Returns a context with the same stream, and ctx_arrays if omitted, as the given context's, which is also the parent.

val get_name : stream -> Base.string
include Backend_intf.Backend_any_common with type buffer_ptr := buffer_ptr
include Backend_intf.Buffer with type buffer_ptr := buffer_ptr
val sexp_of_buffer_ptr : buffer_ptr -> Sexplib0.Sexp.t
val c_ptr_to_string : (buffer_ptr -> Ops.prec -> Base.string) Base.option
include sig ... end
type nonrec buffer = buffer_ptr Backend_intf.buffer
val sexp_of_buffer : buffer -> Sexplib0.Sexp.t
type nonrec ctx_arrays = buffer_ptr Backend_intf.ctx_arrays
val sexp_of_ctx_arrays : ctx_arrays -> Sexplib0.Sexp.t
val initialize : Backend_intf.config -> Base.unit

Initializes a backend before first use. Typically does nothing if the backend is already initialized, but some backends can do some safe cleanups.

val is_initialized : Base.unit -> Base.bool

Returns false if there was no previous initialize call. If it returns false, one must call initialize before using the backend.

val sync : event -> Base.unit

Blocks till the event completes, if it's not done already.

val is_done : event -> Base.bool

Whether the event completed.

val will_wait_for : context -> event -> Base.unit

Schedules waiting for the given event on the context's stream.

NOTE: it should rarely be needed to call will_wait_for explicitly, because it is typically called internally when necessary.

val get_used_memory : device -> Base.int

Returns (an upper bound of) the memory used for arrays, in bytes.

val await : stream -> Base.unit

Blocks till the stream becomes idle, i.e. synchronizes the stream.

val all_work : stream -> event

Returns the event indicating if any currently running or scheduled computations on the stream have completed.

val is_idle : stream -> Base.bool

Whether the stream is currently waiting for work.

val get_device : ordinal:Base.int -> device
val num_devices : Base.unit -> Base.int
val suggested_num_streams : device -> Base.int

The optimal number of streams for the given device to follow the config strategy.

val new_stream : device -> stream
val schedule_task : stream -> Task.t -> Base.unit
+ buffer_ptr
val free_buffer : (stream -> buffer_ptr -> Base.unit) Base.option
val make_device : dev -> ordinal:Base.int -> device
val make_stream : device -> runner -> stream_id:Base.int -> stream
val make_context : ?ctx_arrays:{ctx_arrays}79 -> stream -> context

Returns a context without a parent.

val make_child : ?ctx_arrays:{ctx_arrays}79 -> context -> context

Returns a context with the same stream, and ctx_arrays if omitted, as the given context's, which is also the parent.

val get_name : stream -> Base.string
include Backend_intf.Backend_any_common with type buffer_ptr := buffer_ptr
include Backend_intf.Buffer with type buffer_ptr := buffer_ptr
val sexp_of_buffer_ptr : buffer_ptr -> Sexplib0.Sexp.t
val c_ptr_to_string : (buffer_ptr -> Ops.prec -> Base.string) Base.option
include sig ... end
type nonrec buffer = buffer_ptr Backend_intf.buffer
val sexp_of_buffer : buffer -> Sexplib0.Sexp.t
type nonrec ctx_arrays = buffer_ptr Backend_intf.ctx_arrays
val sexp_of_ctx_arrays : ctx_arrays -> Sexplib0.Sexp.t
val initialize : Backend_intf.config -> Base.unit

Initializes a backend before first use. Typically does nothing if the backend is already initialized, but some backends can do some safe cleanups.

val is_initialized : Base.unit -> Base.bool

Returns false if there was no previous initialize call. If it returns false, one must call initialize before using the backend.

val sync : event -> Base.unit

Blocks till the event completes, if it's not done already.

val is_done : event -> Base.bool

Whether the event completed.

val will_wait_for : context -> event -> Base.unit

Schedules waiting for the given event on the context's stream.

NOTE: it should rarely be needed to call will_wait_for explicitly, because it is typically called internally when necessary.

val get_used_memory : device -> Base.int

Returns (an upper bound of) the memory used for arrays, in bytes.

val get_global_debug_info : Base.unit -> Base.Sexp.t

Global debug information; backend-specific and might evolve independently on the backends.

val get_debug_info : stream -> Base.Sexp.t

Per-stream debug information; backend-specific and might evolve independently on the backends

val await : stream -> Base.unit

Blocks till the stream becomes idle, i.e. synchronizes the stream.

val all_work : stream -> event

Returns the event indicating if any currently running or scheduled computations on the stream have completed.

val is_idle : stream -> Base.bool

Whether the stream is currently waiting for work.

val get_device : ordinal:Base.int -> device
val num_devices : Base.unit -> Base.int
val suggested_num_streams : device -> Base.int

The optimal number of streams for the given device to follow the config strategy.

val new_stream : device -> stream
val schedule_task : stream -> Task.t -> Base.unit
diff --git a/dev/arrayjit/Arrayjit/Schedulers/Sync/index.html b/dev/arrayjit/Arrayjit/Schedulers/Sync/index.html index b1f5e759..65642ecf 100644 --- a/dev/arrayjit/Arrayjit/Schedulers/Sync/index.html +++ b/dev/arrayjit/Arrayjit/Schedulers/Sync/index.html @@ -31,4 +31,4 @@ 'a -> Backend.buffer
val device : device
val get_device : ordinal:Base.Int.t -> device
val num_devices : unit -> int
val suggested_num_streams : 'a -> int
val get_used_memory : 'a -> Base.int
val latest_stram_id : int Base.ref
val new_stream : ('a, 'b, unit, 'c) Backend_intf.device_ref -> - ('a, 'b, unit, 'c) Backend_intf.stream
val all_work : 'a -> unit
val is_idle : 'a -> bool
val await : 'a -> unit
val initialize : Arrayjit__Backend_intf.config -> Base.unit
val is_initialized : Base.unit -> Base.bool
val schedule_task : 'a -> Task.t -> Base.unit
+ ('a, 'b, unit, 'c) Backend_intf.stream
val all_work : 'a -> unit
val is_idle : 'a -> bool
val await : 'a -> unit
val initialize : Arrayjit__Backend_intf.config -> Base.unit
val is_initialized : Base.unit -> Base.bool
val schedule_task : 'a -> Task.t -> Base.unit
val get_global_debug_info : unit -> Sexplib0.Sexp.t
val get_debug_info : stream -> Sexplib0.Sexp.t
diff --git a/dev/neural_nets_lib/Ocannl/Train/index.html b/dev/neural_nets_lib/Ocannl/Train/index.html index 6855153d..4f32c805 100644 --- a/dev/neural_nets_lib/Ocannl/Train/index.html +++ b/dev/neural_nets_lib/Ocannl/Train/index.html @@ -138,6 +138,7 @@ learning_rate:Base.float -> epoch_loss:float -> unit) -> + ?per_epoch_debug_streams:bool -> (module Backend) -> unit -> example_train_result
val forward_and_ctx :