diff --git a/dev/arrayjit/Arrayjit/Backends/Cuda_backend/index.html b/dev/arrayjit/Arrayjit/Backends/Cuda_backend/index.html index 8b4183e5..4104cca9 100644 --- a/dev/arrayjit/Arrayjit/Backends/Cuda_backend/index.html +++ b/dev/arrayjit/Arrayjit/Backends/Cuda_backend/index.html @@ -1,20 +1,15 @@ -
Backends.Cuda_backend
include No_device_backend with type context = Cuda_backend.context
type context = Cuda_backend.context
val finalize : context -> Base.unit
Finalizes (just) the context.
val sexp_of_code : code -> Base.Sexp.t
val sexp_of_context : context -> Base.Sexp.t
val sexp_of_routine : routine -> Base.Sexp.t
val maybe_jit :
- shared:Base.bool ->
+Cuda_backend (arrayjit.Arrayjit.Backends.Cuda_backend) Module Backends.Cuda_backend
include No_device_backend with type context = Cuda_backend.context
val sexp_of_code : code -> Sexplib0.Sexp.t
type context = Cuda_backend.context
val sexp_of_context : context -> Sexplib0.Sexp.t
val sexp_of_routine : routine -> Sexplib0.Sexp.t
val finalize : context -> Base.unit
Finalizes (just) the context.
val compile :
+ ?shared:Base.bool ->
?name:Base.string ->
Indexing.unit_bindings ->
Assignments.t ->
- code
val maybe_jit_batch :
- shared:Base.bool ->
+ code
If ~shared:true
(default false
), the backend should prefer to do more compile work in a device-agnostic way. If ~shared:false
, the backend can opt to postpone compiling altogether until link
is called, to benefit from more optimizations.
val compile_batch :
+ ?shared:Base.bool ->
?names:Base.string Base.array ->
Indexing.unit_bindings ->
Assignments.t Base.array ->
- code Base.array
Unlike the ~shared
parameter, maybe_jit_batch
vs. maybe_jit
is purely about improving the compile time (does not affect execution).
val jit :
- context ->
- ?name:Base.string ->
- Indexing.unit_bindings ->
- Assignments.t ->
- routine
Cleans up all work on a backend. If ~unsafe_shutdown:true
, releases resources, potentially making the backend unusable.
If the array is both hosted and in-context, copies from host to context and returns true.
If the array is both hosted and in-context, copies from context to host and returns true.
val merge :
+ code Base.array
Unlike the ~shared
parameter, compile_batch
vs. compile
is mostly about improving the compile time and debugging convenience by generating fewer files -- ideally does not affect execution, but there can be backend-specific differences.
Cleans up all work on a backend. If ~unsafe_shutdown:true
, releases resources, potentially making the backend unusable.
If the array is both hosted and in-context, copies from host to context and returns true.
If the array is both hosted and in-context, copies from context to host and returns true.
val merge :
?name_prefix:Base.string ->
Tnode.t ->
accum:Ops.binop ->
diff --git a/dev/arrayjit/Arrayjit/Backends/Gccjit_backend/index.html b/dev/arrayjit/Arrayjit/Backends/Gccjit_backend/index.html
index 3e08e6bb..4ec82e5c 100644
--- a/dev/arrayjit/Arrayjit/Backends/Gccjit_backend/index.html
+++ b/dev/arrayjit/Arrayjit/Backends/Gccjit_backend/index.html
@@ -1,20 +1,15 @@
-Gccjit_backend (arrayjit.Arrayjit.Backends.Gccjit_backend) Module Backends.Gccjit_backend
type code = Multicore_backend(Gccjit_device).code
type context = Multicore_backend(Gccjit_device).context
val finalize : context -> Base.unit
Finalizes (just) the context.
val sexp_of_code : code -> Base.Sexp.t
val sexp_of_context : context -> Base.Sexp.t
val sexp_of_routine : routine -> Base.Sexp.t
val maybe_jit :
- shared:Base.bool ->
+Gccjit_backend (arrayjit.Arrayjit.Backends.Gccjit_backend) Module Backends.Gccjit_backend
type code = Multicore_backend(Gccjit_device).code
val sexp_of_code : code -> Sexplib0.Sexp.t
type context = Multicore_backend(Gccjit_device).context
val sexp_of_context : context -> Sexplib0.Sexp.t
val sexp_of_routine : routine -> Sexplib0.Sexp.t
val finalize : context -> Base.unit
Finalizes (just) the context.
val compile :
+ ?shared:Base.bool ->
?name:Base.string ->
Indexing.unit_bindings ->
Assignments.t ->
- code
val maybe_jit_batch :
- shared:Base.bool ->
+ code
If ~shared:true
(default false
), the backend should prefer to do more compile work in a device-agnostic way. If ~shared:false
, the backend can opt to postpone compiling altogether until link
is called, to benefit from more optimizations.
val compile_batch :
+ ?shared:Base.bool ->
?names:Base.string Base.array ->
Indexing.unit_bindings ->
Assignments.t Base.array ->
- code Base.array
Unlike the ~shared
parameter, maybe_jit_batch
vs. maybe_jit
is purely about improving the compile time (does not affect execution).
val jit :
- context ->
- ?name:Base.string ->
- Indexing.unit_bindings ->
- Assignments.t ->
- routine
Cleans up all work on a backend. If ~unsafe_shutdown:true
, releases resources, potentially making the backend unusable.
If the array is both hosted and in-context, copies from host to context and returns true.
If the array is both hosted and in-context, copies from context to host and returns true.
val merge :
+ code Base.array
Unlike the ~shared
parameter, compile_batch
vs. compile
is mostly about improving the compile time and debugging convenience by generating fewer files -- ideally does not affect execution, but there can be backend-specific differences.
Cleans up all work on a backend. If ~unsafe_shutdown:true
, releases resources, potentially making the backend unusable.
If the array is both hosted and in-context, copies from host to context and returns true.
If the array is both hosted and in-context, copies from context to host and returns true.
val merge :
?name_prefix:Base.string ->
Tnode.t ->
accum:Ops.binop ->
diff --git a/dev/arrayjit/Arrayjit/Backends/Gccjit_device/index.html b/dev/arrayjit/Arrayjit/Backends/Gccjit_device/index.html
index 5bde908f..2827ddea 100644
--- a/dev/arrayjit/Arrayjit/Backends/Gccjit_device/index.html
+++ b/dev/arrayjit/Arrayjit/Backends/Gccjit_device/index.html
@@ -1,20 +1,15 @@
-Gccjit_device (arrayjit.Arrayjit.Backends.Gccjit_device) Module Backends.Gccjit_device
type context = Gccjit_backend.context
val init : label:Base.string -> context
label
is usually the backend name concatenated with the device number.
val finalize : context -> Base.unit
Finalizes (just) the context.
val sexp_of_code : code -> Base.Sexp.t
val sexp_of_context : context -> Base.Sexp.t
val sexp_of_routine : routine -> Base.Sexp.t
val maybe_jit :
- shared:Base.bool ->
+Gccjit_device (arrayjit.Arrayjit.Backends.Gccjit_device) Module Backends.Gccjit_device
val sexp_of_code : code -> Sexplib0.Sexp.t
type context = Gccjit_backend.context
val sexp_of_context : context -> Sexplib0.Sexp.t
val sexp_of_routine : routine -> Sexplib0.Sexp.t
val init : label:Base.string -> context
label
is usually the backend name concatenated with the device number.
val finalize : context -> Base.unit
Finalizes (just) the context.
val compile :
+ ?shared:Base.bool ->
?name:Base.string ->
Indexing.unit_bindings ->
Assignments.t ->
- code
val maybe_jit_batch :
- shared:Base.bool ->
+ code
If ~shared:true
(default false
), the backend should prefer to do more compile work in a device-agnostic way. If ~shared:false
, the backend can opt to postpone compiling altogether until link
is called, to benefit from more optimizations.
val compile_batch :
+ ?shared:Base.bool ->
?names:Base.string Base.array ->
Indexing.unit_bindings ->
Assignments.t Base.array ->
- code Base.array
Unlike the ~shared
parameter, maybe_jit_batch
vs. maybe_jit
is purely about improving the compile time (does not affect execution).
val jit :
- context ->
- ?name:Base.string ->
- Indexing.unit_bindings ->
- Assignments.t ->
- routine
Cleans up all work on a backend. If ~unsafe_shutdown:true
, releases resources, potentially making the backend unusable.
If the array is both hosted and in-context, copies from host to context and returns true.
If the array is both hosted and in-context, copies from context to host and returns true.
val merge :
+ code Base.array
Unlike the ~shared
parameter, compile_batch
vs. compile
is mostly about improving the compile time and debugging convenience by generating fewer files -- ideally does not affect execution, but there can be backend-specific differences.
Cleans up all work on a backend. If ~unsafe_shutdown:true
, releases resources, potentially making the backend unusable.
If the array is both hosted and in-context, copies from host to context and returns true.
If the array is both hosted and in-context, copies from context to host and returns true.
val merge :
?name_prefix:Base.string ->
Tnode.t ->
accum:Ops.binop ->
diff --git a/dev/arrayjit/Arrayjit/Backends/Multicore_backend/argument-1-Backend/index.html b/dev/arrayjit/Arrayjit/Backends/Multicore_backend/argument-1-Backend/index.html
index 40f3da9c..b9a81867 100644
--- a/dev/arrayjit/Arrayjit/Backends/Multicore_backend/argument-1-Backend/index.html
+++ b/dev/arrayjit/Arrayjit/Backends/Multicore_backend/argument-1-Backend/index.html
@@ -1,20 +1,15 @@
-Backend (arrayjit.Arrayjit.Backends.Multicore_backend.Backend) Parameter Multicore_backend.Backend
val init : label:Base.string -> context
label
is usually the backend name concatenated with the device number.
val finalize : context -> Base.unit
Finalizes (just) the context.
val sexp_of_code : code -> Base.Sexp.t
val sexp_of_context : context -> Base.Sexp.t
val sexp_of_routine : routine -> Base.Sexp.t
val maybe_jit :
- shared:Base.bool ->
+Backend (arrayjit.Arrayjit.Backends.Multicore_backend.Backend) Parameter Multicore_backend.Backend
val sexp_of_code : code -> Sexplib0.Sexp.t
val sexp_of_context : context -> Sexplib0.Sexp.t
val sexp_of_routine : routine -> Sexplib0.Sexp.t
val init : label:Base.string -> context
label
is usually the backend name concatenated with the device number.
val finalize : context -> Base.unit
Finalizes (just) the context.
val compile :
+ ?shared:Base.bool ->
?name:Base.string ->
Indexing.unit_bindings ->
Assignments.t ->
- code
val maybe_jit_batch :
- shared:Base.bool ->
+ code
If ~shared:true
(default false
), the backend should prefer to do more compile work in a device-agnostic way. If ~shared:false
, the backend can opt to postpone compiling altogether until link
is called, to benefit from more optimizations.
val compile_batch :
+ ?shared:Base.bool ->
?names:Base.string Base.array ->
Indexing.unit_bindings ->
Assignments.t Base.array ->
- code Base.array
Unlike the ~shared
parameter, maybe_jit_batch
vs. maybe_jit
is purely about improving the compile time (does not affect execution).
val jit :
- context ->
- ?name:Base.string ->
- Indexing.unit_bindings ->
- Assignments.t ->
- routine
Cleans up all work on a backend. If ~unsafe_shutdown:true
, releases resources, potentially making the backend unusable.
If the array is both hosted and in-context, copies from host to context and returns true.
If the array is both hosted and in-context, copies from context to host and returns true.
val merge :
+ code Base.array
Unlike the ~shared
parameter, compile_batch
vs. compile
is mostly about improving the compile time and debugging convenience by generating fewer files -- ideally does not affect execution, but there can be backend-specific differences.
Cleans up all work on a backend. If ~unsafe_shutdown:true
, releases resources, potentially making the backend unusable.
If the array is both hosted and in-context, copies from host to context and returns true.
If the array is both hosted and in-context, copies from context to host and returns true.
val merge :
?name_prefix:Base.string ->
Tnode.t ->
accum:Ops.binop ->
diff --git a/dev/arrayjit/Arrayjit/Backends/Multicore_backend/index.html b/dev/arrayjit/Arrayjit/Backends/Multicore_backend/index.html
index 0c1bc14c..7739f268 100644
--- a/dev/arrayjit/Arrayjit/Backends/Multicore_backend/index.html
+++ b/dev/arrayjit/Arrayjit/Backends/Multicore_backend/index.html
@@ -1,20 +1,15 @@
-Multicore_backend (arrayjit.Arrayjit.Backends.Multicore_backend) Module Backends.Multicore_backend
Parameters
module Backend : No_device_backend
Signature
include No_device_backend
val finalize : context -> Base.unit
Finalizes (just) the context.
val sexp_of_code : code -> Base.Sexp.t
val sexp_of_context : context -> Base.Sexp.t
val sexp_of_routine : routine -> Base.Sexp.t
val maybe_jit :
- shared:Base.bool ->
+Multicore_backend (arrayjit.Arrayjit.Backends.Multicore_backend) Module Backends.Multicore_backend
Parameters
module Backend : No_device_backend
Signature
include No_device_backend
val sexp_of_code : code -> Sexplib0.Sexp.t
val sexp_of_context : context -> Sexplib0.Sexp.t
val sexp_of_routine : routine -> Sexplib0.Sexp.t
val finalize : context -> Base.unit
Finalizes (just) the context.
val compile :
+ ?shared:Base.bool ->
?name:Base.string ->
Indexing.unit_bindings ->
Assignments.t ->
- code
val maybe_jit_batch :
- shared:Base.bool ->
+ code
If ~shared:true
(default false
), the backend should prefer to do more compile work in a device-agnostic way. If ~shared:false
, the backend can opt to postpone compiling altogether until link
is called, to benefit from more optimizations.
val compile_batch :
+ ?shared:Base.bool ->
?names:Base.string Base.array ->
Indexing.unit_bindings ->
Assignments.t Base.array ->
- code Base.array
Unlike the ~shared
parameter, maybe_jit_batch
vs. maybe_jit
is purely about improving the compile time (does not affect execution).
val jit :
- context ->
- ?name:Base.string ->
- Indexing.unit_bindings ->
- Assignments.t ->
- routine
Cleans up all work on a backend. If ~unsafe_shutdown:true
, releases resources, potentially making the backend unusable.
If the array is both hosted and in-context, copies from host to context and returns true.
If the array is both hosted and in-context, copies from context to host and returns true.
val merge :
+ code Base.array
Unlike the ~shared
parameter, compile_batch
vs. compile
is mostly about improving the compile time and debugging convenience by generating fewer files -- ideally does not affect execution, but there can be backend-specific differences.
Cleans up all work on a backend. If ~unsafe_shutdown:true
, releases resources, potentially making the backend unusable.
If the array is both hosted and in-context, copies from host to context and returns true.
If the array is both hosted and in-context, copies from context to host and returns true.
val merge :
?name_prefix:Base.string ->
Tnode.t ->
accum:Ops.binop ->
diff --git a/dev/arrayjit/Arrayjit/Backends/index.html b/dev/arrayjit/Arrayjit/Backends/index.html
index da1008d1..b0d4c855 100644
--- a/dev/arrayjit/Arrayjit/Backends/index.html
+++ b/dev/arrayjit/Arrayjit/Backends/index.html
@@ -1,5 +1,5 @@
-Backends (arrayjit.Arrayjit.Backends) Module Arrayjit.Backends
module Debug_runtime = Utils.Debug_runtime
type 'context routine = {
context : 'context;
schedule : Base.unit -> Tnode.work;
bindings : Indexing.jitted_bindings;
name : Base.string;
}
val sexp_of_routine :
+Backends (arrayjit.Arrayjit.Backends) Module Arrayjit.Backends
module Debug_runtime = Utils.Debug_runtime
type 'context routine = {
context : 'context;
schedule : Base.unit -> Tnode.work;
bindings : Indexing.compiled_bindings;
name : Base.string;
}
val sexp_of_routine :
'context. ('context -> Sexplib0.Sexp.t) ->
'context routine ->
Sexplib0.Sexp.t
module type No_device_backend = sig ... end
module type Backend = sig ... end
val forget_printbox :
diff --git a/dev/arrayjit/Arrayjit/Backends/module-type-Backend/index.html b/dev/arrayjit/Arrayjit/Backends/module-type-Backend/index.html
index 36a36168..1c52ec7f 100644
--- a/dev/arrayjit/Arrayjit/Backends/module-type-Backend/index.html
+++ b/dev/arrayjit/Arrayjit/Backends/module-type-Backend/index.html
@@ -1,20 +1,15 @@
-Backend (arrayjit.Arrayjit.Backends.Backend) Module type Backends.Backend
include No_device_backend
val finalize : context -> Base.unit
Finalizes (just) the context.
val sexp_of_code : code -> Base.Sexp.t
val sexp_of_context : context -> Base.Sexp.t
val sexp_of_routine : routine -> Base.Sexp.t
val maybe_jit :
- shared:Base.bool ->
+Backend (arrayjit.Arrayjit.Backends.Backend) Module type Backends.Backend
include No_device_backend
val sexp_of_code : code -> Sexplib0.Sexp.t
val sexp_of_context : context -> Sexplib0.Sexp.t
val sexp_of_routine : routine -> Sexplib0.Sexp.t
val finalize : context -> Base.unit
Finalizes (just) the context.
val compile :
+ ?shared:Base.bool ->
?name:Base.string ->
Indexing.unit_bindings ->
Assignments.t ->
- code
val maybe_jit_batch :
- shared:Base.bool ->
+ code
If ~shared:true
(default false
), the backend should prefer to do more compile work in a device-agnostic way. If ~shared:false
, the backend can opt to postpone compiling altogether until link
is called, to benefit from more optimizations.
val compile_batch :
+ ?shared:Base.bool ->
?names:Base.string Base.array ->
Indexing.unit_bindings ->
Assignments.t Base.array ->
- code Base.array
Unlike the ~shared
parameter, maybe_jit_batch
vs. maybe_jit
is purely about improving the compile time (does not affect execution).
val jit :
- context ->
- ?name:Base.string ->
- Indexing.unit_bindings ->
- Assignments.t ->
- routine
Cleans up all work on a backend. If ~unsafe_shutdown:true
, releases resources, potentially making the backend unusable.
If the array is both hosted and in-context, copies from host to context and returns true.
If the array is both hosted and in-context, copies from context to host and returns true.
val merge :
+ code Base.array
Unlike the ~shared
parameter, compile_batch
vs. compile
is mostly about improving the compile time and debugging convenience by generating fewer files -- ideally does not affect execution, but there can be backend-specific differences.
Cleans up all work on a backend. If ~unsafe_shutdown:true
, releases resources, potentially making the backend unusable.
If the array is both hosted and in-context, copies from host to context and returns true.
If the array is both hosted and in-context, copies from context to host and returns true.
val merge :
?name_prefix:Base.string ->
Tnode.t ->
accum:Ops.binop ->
diff --git a/dev/arrayjit/Arrayjit/Backends/module-type-No_device_backend/index.html b/dev/arrayjit/Arrayjit/Backends/module-type-No_device_backend/index.html
index 708fa4ab..5fcb292a 100644
--- a/dev/arrayjit/Arrayjit/Backends/module-type-No_device_backend/index.html
+++ b/dev/arrayjit/Arrayjit/Backends/module-type-No_device_backend/index.html
@@ -1,20 +1,15 @@
-No_device_backend (arrayjit.Arrayjit.Backends.No_device_backend) Module type Backends.No_device_backend
val init : label:Base.string -> context
label
is usually the backend name concatenated with the device number.
val finalize : context -> Base.unit
Finalizes (just) the context.
val sexp_of_code : code -> Base.Sexp.t
val sexp_of_context : context -> Base.Sexp.t
val sexp_of_routine : routine -> Base.Sexp.t
val maybe_jit :
- shared:Base.bool ->
+No_device_backend (arrayjit.Arrayjit.Backends.No_device_backend) Module type Backends.No_device_backend
val sexp_of_code : code -> Sexplib0.Sexp.t
val sexp_of_context : context -> Sexplib0.Sexp.t
val sexp_of_routine : routine -> Sexplib0.Sexp.t
val init : label:Base.string -> context
label
is usually the backend name concatenated with the device number.
val finalize : context -> Base.unit
Finalizes (just) the context.
val compile :
+ ?shared:Base.bool ->
?name:Base.string ->
Indexing.unit_bindings ->
Assignments.t ->
- code
val maybe_jit_batch :
- shared:Base.bool ->
+ code
If ~shared:true
(default false
), the backend should prefer to do more compile work in a device-agnostic way. If ~shared:false
, the backend can opt to postpone compiling altogether until link
is called, to benefit from more optimizations.
val compile_batch :
+ ?shared:Base.bool ->
?names:Base.string Base.array ->
Indexing.unit_bindings ->
Assignments.t Base.array ->
- code Base.array
Unlike the ~shared
parameter, maybe_jit_batch
vs. maybe_jit
is purely about improving the compile time (does not affect execution).
val jit :
- context ->
- ?name:Base.string ->
- Indexing.unit_bindings ->
- Assignments.t ->
- routine
Cleans up all work on a backend. If ~unsafe_shutdown:true
, releases resources, potentially making the backend unusable.
If the array is both hosted and in-context, copies from host to context and returns true.
If the array is both hosted and in-context, copies from context to host and returns true.
val merge :
+ code Base.array
Unlike the ~shared
parameter, compile_batch
vs. compile
is mostly about improving the compile time and debugging convenience by generating fewer files -- ideally does not affect execution, but there can be backend-specific differences.
Cleans up all work on a backend. If ~unsafe_shutdown:true
, releases resources, potentially making the backend unusable.
If the array is both hosted and in-context, copies from host to context and returns true.
If the array is both hosted and in-context, copies from context to host and returns true.
val merge :
?name_prefix:Base.string ->
Tnode.t ->
accum:Ops.binop ->
diff --git a/dev/arrayjit/Arrayjit/Cuda_backend/index.html b/dev/arrayjit/Arrayjit/Cuda_backend/index.html
index 706f021a..6c670170 100644
--- a/dev/arrayjit/Arrayjit/Cuda_backend/index.html
+++ b/dev/arrayjit/Arrayjit/Cuda_backend/index.html
@@ -1,10 +1,12 @@
-Cuda_backend (arrayjit.Arrayjit.Cuda_backend) Module Arrayjit.Cuda_backend
val finalize : context -> unit
val sexp_of_context : context -> Sexplib.Sexp.t
val jit :
+Cuda_backend (arrayjit.Arrayjit.Cuda_backend) Module Arrayjit.Cuda_backend
val sexp_of_code : code -> Sexplib0.Sexp.t
val finalize : context -> unit
val sexp_of_context : context -> Sexplib.Sexp.t
val compile :
?name:string ->
- context ->
Indexing.unit_bindings ->
(Low_level.traced_store * Low_level.t) ->
- context * Indexing.jitted_bindings * (unit -> Tnode.work)
If the array is both hosted and in-context, copies from host to context and returns true.
If the array is both hosted and in-context, copies from context to host and returns true.
val merge :
+ code
val link :
+ context ->
+ code ->
+ context * Indexing.compiled_bindings * (unit -> Tnode.work)
If the array is both hosted and in-context, copies from host to context and returns true.
If the array is both hosted and in-context, copies from context to host and returns true.
val merge :
?name_suffix:string ->
Tnode.t ->
dst:context ->
diff --git a/dev/arrayjit/Arrayjit/Gccjit_backend/index.html b/dev/arrayjit/Arrayjit/Gccjit_backend/index.html
index 3a6eab90..57fc6a49 100644
--- a/dev/arrayjit/Arrayjit/Gccjit_backend/index.html
+++ b/dev/arrayjit/Arrayjit/Gccjit_backend/index.html
@@ -1,5 +1,5 @@
-Gccjit_backend (arrayjit.Arrayjit.Gccjit_backend) Module Arrayjit.Gccjit_backend
module Lazy = Utils.Lazy
module Debug_runtime = Utils.Debug_runtime
val mem_properties_of_sexp : Sexplib0.Sexp.t -> mem_properties
val sexp_of_mem_properties : mem_properties -> Sexplib0.Sexp.t
val equal_mem_properties : mem_properties -> mem_properties -> Base.bool
val compare_mem_properties : mem_properties -> mem_properties -> Base.int
val local_only : mem_properties
val from_context : mem_properties
val constant_from_host : mem_properties
val is_local_only : mem_properties -> bool
val is_from_context : mem_properties -> bool
val is_constant_from_host : mem_properties -> bool
val local_only_val : mem_properties -> unit Stdlib.Option.t
val from_context_val : mem_properties -> unit Stdlib.Option.t
val constant_from_host_val : mem_properties -> unit Stdlib.Option.t
module Variants_of_mem_properties : sig ... end
module Tn = Tnode
type context = {
label : Base.string;
arrays : Ndarray.t Base.Map.M(Tn).t;
result : Gccjit.result Base.option;
}
val sexp_of_context : context -> Sexplib0.Sexp.t
val finalize : context -> unit
val init : label:Base.string -> context
type ndarray = {
nd : Tn.t;
(*The original array.
*)mutable ptr : Gccjit.rvalue Lazy.t;
(*Pointer to the first value of the associated array.
- if
mem = Constant_from_host
, the pointer to the first element of the hosted Ndarray
, - if
mem = From_context
, either a pointer to Ndarray
from context.arrays
when ~shared:false
, or the function parameter when ~shared:true
, - if
mem = Local_only
, the address of the on-the-stack array.
*)mem : mem_properties;
dims : Base.int Base.array;
size_in_bytes : Base.int;
num_typ : Gccjit.type_;
(*The type of the stored values: short
(precision Half
), float
(precision Single
), double
(precision Double
).
*)is_double : Base.bool;
}
val sexp_of_ndarray : ndarray -> Sexplib0.Sexp.t
type info = {
ctx : Gccjit.context;
func : Gccjit.function_;
traced_store : Low_level.traced_store;
init_block : Gccjit.block;
arrays : (Tn.t, ndarray) Base.Hashtbl.t;
}
val sexp_of_info : info -> Sexplib0.Sexp.t
val sexp_of_param_source : param_source -> Sexplib0.Sexp.t
type routine = {
info : info;
bindings : Indexing.unit_bindings;
name : Base.string;
result : Gccjit.result;
opt_ctx_arrays : Ndarray.t Base.Map.M(Tn).t Base.option;
params : param_source Base.list;
}
val sexp_of_routine : routine -> Sexplib0.Sexp.t
type code =
| Postponed of {
compiled : Low_level.traced_store * Low_level.t;
bindings : Indexing.unit_bindings;
name : Base.string;
}
| Jitted of routine
val sexp_of_code : code -> Sexplib0.Sexp.t
type ctx_nodes =
| Ctx_arrays of Ndarray.t Base.Map.M(Tn).t Base.ref
| Param_ptrs of (gccjit_param * param_source) Base.list Base.ref
val sexp_of_ctx_nodes : ctx_nodes -> Sexplib0.Sexp.t
val jit_array_offset :
+Gccjit_backend (arrayjit.Arrayjit.Gccjit_backend) Module Arrayjit.Gccjit_backend
module Lazy = Utils.Lazy
module Debug_runtime = Utils.Debug_runtime
val mem_properties_of_sexp : Sexplib0.Sexp.t -> mem_properties
val sexp_of_mem_properties : mem_properties -> Sexplib0.Sexp.t
val equal_mem_properties : mem_properties -> mem_properties -> Base.bool
val compare_mem_properties : mem_properties -> mem_properties -> Base.int
val local_only : mem_properties
val from_context : mem_properties
val constant_from_host : mem_properties
val is_local_only : mem_properties -> bool
val is_from_context : mem_properties -> bool
val is_constant_from_host : mem_properties -> bool
val local_only_val : mem_properties -> unit Stdlib.Option.t
val from_context_val : mem_properties -> unit Stdlib.Option.t
val constant_from_host_val : mem_properties -> unit Stdlib.Option.t
module Variants_of_mem_properties : sig ... end
module Tn = Tnode
type context = {
label : Base.string;
arrays : Ndarray.t Base.Map.M(Tn).t;
result : Gccjit.result Base.option;
}
val sexp_of_context : context -> Sexplib0.Sexp.t
val finalize : context -> unit
val init : label:Base.string -> context
type ndarray = {
nd : Tn.t;
(*The original array.
*)mutable ptr : Gccjit.rvalue Lazy.t;
(*Pointer to the first value of the associated array.
- if
mem = Constant_from_host
, the pointer to the first element of the hosted Ndarray
, - if
mem = From_context
, either a pointer to Ndarray
from context.arrays
when ~shared:false
, or the function parameter when ~shared:true
, - if
mem = Local_only
, the address of the on-the-stack array.
*)mem : mem_properties;
dims : Base.int Base.array;
size_in_bytes : Base.int;
num_typ : Gccjit.type_;
(*The type of the stored values: short
(precision Half
), float
(precision Single
), double
(precision Double
).
*)is_double : Base.bool;
}
val sexp_of_ndarray : ndarray -> Sexplib0.Sexp.t
type info = {
ctx : Gccjit.context;
func : Gccjit.function_;
traced_store : Low_level.traced_store;
init_block : Gccjit.block;
arrays : (Tn.t, ndarray) Base.Hashtbl.t;
}
val sexp_of_info : info -> Sexplib0.Sexp.t
val sexp_of_param_source : param_source -> Sexplib0.Sexp.t
type routine = {
info : info;
bindings : Indexing.unit_bindings;
name : Base.string;
result : Gccjit.result;
opt_ctx_arrays : Ndarray.t Base.Map.M(Tn).t Base.option;
params : param_source Base.list;
}
val sexp_of_routine : routine -> Sexplib0.Sexp.t
type code =
| Postponed of {
compiled : Low_level.traced_store * Low_level.t;
bindings : Indexing.unit_bindings;
name : Base.string;
}
| Compiled of routine
val sexp_of_code : code -> Sexplib0.Sexp.t
type ctx_nodes =
| Ctx_arrays of Ndarray.t Base.Map.M(Tn).t Base.ref
| Param_ptrs of (gccjit_param * param_source) Base.list Base.ref
val sexp_of_ctx_nodes : ctx_nodes -> Sexplib0.Sexp.t
val compile_main :
+ name:Base.String.t ->
+ log_functions:(Gccjit.rvalue * Gccjit.function_ * Gccjit.function_) option ->
+ env:(Indexing.symbol, Gccjit.rvalue, 'a) Base.Map.t ->
+ info ->
+ Gccjit.function_ ->
+ Gccjit.block ->
+ Low_level.t ->
+ Gccjit.block
val prepare_arrays :
Gccjit.context ->
log_functions:
(Gccjit.rvalue * Gccjit.function_ * Gccjit.function_) option Lazy.t ->
@@ -35,7 +43,7 @@
ctx_nodes ->
(Gccjit.block -> Gccjit.function_ -> Base.unit) list Base.ref ->
Low_level.t ->
- unit
val compile_func :
name:Base.String.t ->
opt_ctx_arrays:
(Tn.t, Ndarray.t, Tn.comparator_witness) Base.Map.t Base.Option.t ->
@@ -43,26 +51,26 @@
'a Indexing.bindings ->
((Arrayjit.Low_level.Tn.t, Low_level.traced_array) Base.Hashtbl.t
* Low_level.t) ->
- info * Ndarray.t Base.Map.M(Tn).t * (gccjit_param * param_source) Base.list
val maybe_jit :
+ info * Ndarray.t Base.Map.M(Tn).t * (gccjit_param * param_source) Base.list
val compile :
name:Base.string ->
opt_ctx_arrays:
(Tn.t, Ndarray.t, Tn.comparator_witness) Base.Map.t Base.Option.t ->
(Base.unit -> Base.unit) Indexing.bindings ->
(Low_level.traced_store * Low_level.t) ->
- routine
val maybe_jit_batch :
+ routine
val compile_batch :
names:Base.string Base.array ->
opt_ctx_arrays:
(Tn.t, Ndarray.t, Tn.comparator_witness) Base.Map.t Base.Option.t ->
(Base.unit -> Base.unit) Indexing.bindings ->
(Low_level.traced_store * Low_level.t) Base.array ->
- routine Base.Array.t
val jit_routine :
+ routine Base.Array.t
val link_compiled :
context ->
routine ->
context
* (Indexing.static_symbol * Base.int Base.ref) Base.List.t
* (unit ->
Tn.work)
- * Base.string
val link :
context ->
code ->
context
diff --git a/dev/arrayjit/Arrayjit/Indexing/index.html b/dev/arrayjit/Arrayjit/Indexing/index.html
index 02c50f24..6c8194e3 100644
--- a/dev/arrayjit/Arrayjit/Indexing/index.html
+++ b/dev/arrayjit/Arrayjit/Indexing/index.html
@@ -15,10 +15,10 @@
'a. ('a -> Sexplib0.Sexp.t) ->
'a bindings ->
Sexplib0.Sexp.t
val bound_symbols : 'a bindings -> static_symbol Base.List.t
type unit_bindings = (Base.unit -> Base.unit) bindings
val sexp_of_unit_bindings : unit_bindings -> Sexplib0.Sexp.t
type jitted_bindings = (static_symbol, Base.int Base.ref) Base.List.Assoc.t
val sexp_of_jitted_bindings : jitted_bindings -> Sexplib0.Sexp.t
val apply : 'r 'idcs 'p1 'p2. ('r, 'idcs, 'p1, 'p2) variadic -> 'r
val jitted_bindings :
+ * (Base.int -> 'r, Base.int -> 'idcs, 'p1, 'p2) variadic
| Param_1 of 'p1 Base.option Base.ref * ('p1 -> 'r, 'idcs, 'p1, 'p2) variadic
| Param_2 of 'p2 Base.option Base.ref * ('p2 -> 'r, 'idcs, 'p1, 'p2) variadic
Helps jitting the bindings.
type unit_bindings = (Base.unit -> Base.unit) bindings
val sexp_of_unit_bindings : unit_bindings -> Sexplib0.Sexp.t
type compiled_bindings = (static_symbol, Base.int Base.ref) Base.List.Assoc.t
val sexp_of_compiled_bindings : compiled_bindings -> Sexplib0.Sexp.t
val apply : 'r 'idcs 'p1 'p2. ('r, 'idcs, 'p1, 'p2) variadic -> 'r
val compiled_bindings :
'a bindings ->
('b, 'a, 'p1, 'p2) variadic ->
- (static_symbol * Base.int Base.ref) Base.List.t
val find_exn : jitted_bindings -> static_symbol -> Base.int Base.ref
val get_static_symbol :
+ (static_symbol * Base.int Base.ref) Base.List.t
val find_exn : compiled_bindings -> static_symbol -> Base.int Base.ref
val get_static_symbol :
?static_range:Base.int ->
(Base.int -> 'a) bindings ->
static_symbol * 'a bindings
val dims_to_string :
diff --git a/dev/neural_nets_lib/Ocannl/Train/IDX/index.html b/dev/neural_nets_lib/Ocannl/Train/IDX/index.html
index b287f05a..f694eee5 100644
--- a/dev/neural_nets_lib/Ocannl/Train/IDX/index.html
+++ b/dev/neural_nets_lib/Ocannl/Train/IDX/index.html
@@ -2,4 +2,4 @@
IDX (neural_nets_lib.Ocannl.Train.IDX) Module Train.IDX
val empty : 'a Idx.bindings
val get_static_symbol :
?static_range:Base.int ->
(Base.int -> 'a) Idx.bindings ->
- Idx.static_symbol * 'a Idx.bindings
val find_exn : Idx.jitted_bindings -> Idx.static_symbol -> Base.int Base.ref
+ Idx.static_symbol * 'a Idx.bindings
val find_exn : Idx.compiled_bindings -> Idx.static_symbol -> Base.int Base.ref
diff --git a/dev/neural_nets_lib/Ocannl/Train/index.html b/dev/neural_nets_lib/Ocannl/Train/index.html
index 2f4a4e3d..948dd0e3 100644
--- a/dev/neural_nets_lib/Ocannl/Train/index.html
+++ b/dev/neural_nets_lib/Ocannl/Train/index.html
@@ -23,7 +23,7 @@
(Idx.static_symbol * int Base.ref) list ->
Base.unit
All and only bindings with associated ranges are iterated, with the binding's initial value lost. Bindings without ranges remain at their initial values.
val round_robin :
(unit -> unit) Base.Array.t ->
- Idx.jitted_bindings Base.Array.t ->
+ Idx.compiled_bindings Base.Array.t ->
(Idx.static_symbol * Base.int Base.ref) list ->
sync:(Base.int -> Base.unit) ->
Base.unit
Distributes iterated indices to workers in a round-robin fashion. All and only bindings with associated ranges are iterated, with the binding's initial value lost. Bindings without ranges remain at their initial values. sync
is called after each round of calling all workers, and at the end if needed, with the number of workers called during the round.
val round_robin_dry_run :
@@ -52,9 +52,8 @@
post_sync:(num_synced_devices:Base.int -> Base.unit) ->
updaten ->
Base.unit ->
- Base.unit
Performs one optimization step, potentially in parallel (if grad_updates
are compiled for different devices). All jitted code must have the same bindings. Iterates over bindings with ranges, calling one of grad_updates
in a round-robin fashion, and performs the following synchronization each time all grad_updates
have been called:
1. merges all gradients into the device of grad_updates.(0)
, 2. calls sgd_update
, 3. copies all parameters from the grad_updates.(0)
device to the other devices, if needed, 4. calls post_sync
with the number of devices synced since the previous sync.
All and only bindings with associated ranges are iterated, with the binding's initial value lost. Bindings without ranges remain at their initial values.
Performs one optimization step, potentially in parallel (if grad_updates
are compiled for different devices). All jitted code must have the same bindings. Iterates over bindings with ranges, calling one of grad_updates
in a round-robin fashion, and performs the following synchronization each time all grad_updates
have been called:
1. merges all gradients into the device of grad_updates.(0)
, 2. calls sgd_update
, 3. copies all parameters from the grad_updates.(0)
device to the other devices, if needed, 4. calls post_sync
with the number of devices synced since the previous sync.
All and only bindings with associated ranges are iterated, with the binding's initial value lost. Bindings without ranges remain at their initial values.
val debug_name : Tensor.t -> Base.String.t