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 @@
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.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
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 :
Ops.prec ->
dims:Base.int Base.array ->
stream ->
- buffer_ptr
val free_buffer : (stream -> buffer_ptr -> Base.unit) Base.option
Returns a context without a parent.
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.
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.
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.
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 suggested_num_streams : device -> Base.int
The optimal number of streams for the given device to follow the config
strategy.
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
Returns a context without a parent.
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.
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.
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.
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.
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 suggested_num_streams : device -> Base.int
The optimal number of streams for the given device to follow the config
strategy.
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.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
val sexp_of_dev : dev -> Sexplib0.Sexp.t
val sexp_of_runner : runner -> Sexplib0.Sexp.t
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
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 :
Ops.prec ->
dims:Base.int Base.array ->
stream ->
- buffer_ptr
val free_buffer : (stream -> buffer_ptr -> Base.unit) Base.option
Returns a context without a parent.
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.
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.
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.
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 suggested_num_streams : device -> Base.int
The optimal number of streams for the given device to follow the config
strategy.
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
Returns a context without a parent.
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.
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.
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.
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.
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 suggested_num_streams : device -> Base.int
The optimal number of streams for the given device to follow the config
strategy.
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
val sexp_of_dev : dev -> Sexplib0.Sexp.t
val sexp_of_runner : runner -> Sexplib0.Sexp.t
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
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 :
Ops.prec ->
dims:Base.int Base.array ->
stream ->
- buffer_ptr
val free_buffer : (stream -> buffer_ptr -> Base.unit) Base.option
Returns a context without a parent.
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.
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.
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.
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 suggested_num_streams : device -> Base.int
The optimal number of streams for the given device to follow the config
strategy.
+ buffer_ptr
val free_buffer : (stream -> buffer_ptr -> Base.unit) Base.option
Returns a context without a parent.
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.
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.
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.
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.
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 suggested_num_streams : device -> Base.int
The optimal number of streams for the given device to follow the config
strategy.
val free_buffer : (stream -> buffer_ptr -> Base.unit) Base.option
Returns a context without a parent.
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.
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.
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.
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 suggested_num_streams : device -> Base.int
The optimal number of streams for the given device to follow the config
strategy.
Returns the routine for the code's procedure, in a new context derived from the given context.
val link_batch :
+ buffer_ptr
val free_buffer : (stream -> buffer_ptr -> Base.unit) Base.option
Returns a context without a parent.
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.
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.
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.
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.
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 suggested_num_streams : device -> Base.int
The optimal number of streams for the given device to follow the config
strategy.
Returns the routine for the code's procedure, in a new context derived from the given context.
val link_batch :
context ->
code_batch ->
context * context routine Base.option Base.array
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
Returns a context without a parent.
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.
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.
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.
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 suggested_num_streams : device -> Base.int
The optimal number of streams for the given device to follow the config
strategy.
val free_buffer : (stream -> buffer_ptr -> Base.unit) Base.option
Returns a context without a parent.
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.
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.
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.
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.
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