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 @@ -Cuda_backend (arrayjit.Arrayjit.Backends.Cuda_backend)

Module Backends.Cuda_backend

include No_device_backend with type context = Cuda_backend.context
type code
type context = Cuda_backend.context
type nonrec routine = context routine
val name : Base.string
val initialize : Base.unit -> Base.unit
val is_initialized : Base.unit -> Base.bool
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
type code
val sexp_of_code : code -> Sexplib0.Sexp.t
type context = Cuda_backend.context
val sexp_of_context : context -> Sexplib0.Sexp.t
type nonrec routine = context routine
val sexp_of_routine : routine -> Sexplib0.Sexp.t
val name : Base.string
val initialize : Base.unit -> Base.unit
val is_initialized : Base.unit -> Base.bool
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_code : context -> code -> routine
val jit : - context -> - ?name:Base.string -> - Indexing.unit_bindings -> - Assignments.t -> - routine
val unsafe_cleanup : ?unsafe_shutdown:Base.bool -> Base.unit -> Base.unit

Cleans up all work on a backend. If ~unsafe_shutdown:true, releases resources, potentially making the backend unusable.

val from_host : context -> Tnode.t -> Base.bool

If the array is both hosted and in-context, copies from host to context and returns true.

val to_host : context -> Tnode.t -> Base.bool

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.

val unsafe_cleanup : ?unsafe_shutdown:Base.bool -> Base.unit -> Base.unit

Cleans up all work on a backend. If ~unsafe_shutdown:true, releases resources, potentially making the backend unusable.

val from_host : context -> Tnode.t -> Base.bool

If the array is both hosted and in-context, copies from host to context and returns true.

val to_host : context -> Tnode.t -> Base.bool

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 nonrec routine = context routine
val name : Base.string
val initialize : Base.unit -> Base.unit
val is_initialized : Base.unit -> Base.bool
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

val sexp_of_code : code -> Sexplib0.Sexp.t
val sexp_of_context : context -> Sexplib0.Sexp.t
type nonrec routine = context routine
val sexp_of_routine : routine -> Sexplib0.Sexp.t
val name : Base.string
val initialize : Base.unit -> Base.unit
val is_initialized : Base.unit -> Base.bool
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_code : context -> code -> routine
val jit : - context -> - ?name:Base.string -> - Indexing.unit_bindings -> - Assignments.t -> - routine
val unsafe_cleanup : ?unsafe_shutdown:Base.bool -> Base.unit -> Base.unit

Cleans up all work on a backend. If ~unsafe_shutdown:true, releases resources, potentially making the backend unusable.

val from_host : context -> Tnode.t -> Base.bool

If the array is both hosted and in-context, copies from host to context and returns true.

val to_host : context -> Tnode.t -> Base.bool

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.

val unsafe_cleanup : ?unsafe_shutdown:Base.bool -> Base.unit -> Base.unit

Cleans up all work on a backend. If ~unsafe_shutdown:true, releases resources, potentially making the backend unusable.

val from_host : context -> Tnode.t -> Base.bool

If the array is both hosted and in-context, copies from host to context and returns true.

val to_host : context -> Tnode.t -> Base.bool

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 code
type context = Gccjit_backend.context
type nonrec routine = context routine
val name : Base.string
val initialize : Base.unit -> Base.unit
val is_initialized : Base.unit -> Base.bool
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

type code
val sexp_of_code : code -> Sexplib0.Sexp.t
type context = Gccjit_backend.context
val sexp_of_context : context -> Sexplib0.Sexp.t
type nonrec routine = context routine
val sexp_of_routine : routine -> Sexplib0.Sexp.t
val name : Base.string
val initialize : Base.unit -> Base.unit
val is_initialized : Base.unit -> Base.bool
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_code : context -> code -> routine
val jit : - context -> - ?name:Base.string -> - Indexing.unit_bindings -> - Assignments.t -> - routine
val unsafe_cleanup : ?unsafe_shutdown:Base.bool -> Base.unit -> Base.unit

Cleans up all work on a backend. If ~unsafe_shutdown:true, releases resources, potentially making the backend unusable.

val from_host : context -> Tnode.t -> Base.bool

If the array is both hosted and in-context, copies from host to context and returns true.

val to_host : context -> Tnode.t -> Base.bool

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.

val unsafe_cleanup : ?unsafe_shutdown:Base.bool -> Base.unit -> Base.unit

Cleans up all work on a backend. If ~unsafe_shutdown:true, releases resources, potentially making the backend unusable.

val from_host : context -> Tnode.t -> Base.bool

If the array is both hosted and in-context, copies from host to context and returns true.

val to_host : context -> Tnode.t -> Base.bool

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

type code
type context
type nonrec routine = context routine
val name : Base.string
val initialize : Base.unit -> Base.unit
val is_initialized : Base.unit -> Base.bool
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

type code
val sexp_of_code : code -> Sexplib0.Sexp.t
type context
val sexp_of_context : context -> Sexplib0.Sexp.t
type nonrec routine = context routine
val sexp_of_routine : routine -> Sexplib0.Sexp.t
val name : Base.string
val initialize : Base.unit -> Base.unit
val is_initialized : Base.unit -> Base.bool
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_code : context -> code -> routine
val jit : - context -> - ?name:Base.string -> - Indexing.unit_bindings -> - Assignments.t -> - routine
val unsafe_cleanup : ?unsafe_shutdown:Base.bool -> Base.unit -> Base.unit

Cleans up all work on a backend. If ~unsafe_shutdown:true, releases resources, potentially making the backend unusable.

val from_host : context -> Tnode.t -> Base.bool

If the array is both hosted and in-context, copies from host to context and returns true.

val to_host : context -> Tnode.t -> Base.bool

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.

val unsafe_cleanup : ?unsafe_shutdown:Base.bool -> Base.unit -> Base.unit

Cleans up all work on a backend. If ~unsafe_shutdown:true, releases resources, potentially making the backend unusable.

val from_host : context -> Tnode.t -> Base.bool

If the array is both hosted and in-context, copies from host to context and returns true.

val to_host : context -> Tnode.t -> Base.bool

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

Signature

include No_device_backend
type code
type context
type nonrec routine = context routine
val name : Base.string
val initialize : Base.unit -> Base.unit
val is_initialized : Base.unit -> Base.bool
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

Signature

include No_device_backend
type code
val sexp_of_code : code -> Sexplib0.Sexp.t
type context
val sexp_of_context : context -> Sexplib0.Sexp.t
type nonrec routine = context routine
val sexp_of_routine : routine -> Sexplib0.Sexp.t
val name : Base.string
val initialize : Base.unit -> Base.unit
val is_initialized : Base.unit -> Base.bool
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_code : context -> code -> routine
val jit : - context -> - ?name:Base.string -> - Indexing.unit_bindings -> - Assignments.t -> - routine
val unsafe_cleanup : ?unsafe_shutdown:Base.bool -> Base.unit -> Base.unit

Cleans up all work on a backend. If ~unsafe_shutdown:true, releases resources, potentially making the backend unusable.

val from_host : context -> Tnode.t -> Base.bool

If the array is both hosted and in-context, copies from host to context and returns true.

val to_host : context -> Tnode.t -> Base.bool

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.

val unsafe_cleanup : ?unsafe_shutdown:Base.bool -> Base.unit -> Base.unit

Cleans up all work on a backend. If ~unsafe_shutdown:true, releases resources, potentially making the backend unusable.

val from_host : context -> Tnode.t -> Base.bool

If the array is both hosted and in-context, copies from host to context and returns true.

val to_host : context -> Tnode.t -> Base.bool

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 = {
  1. context : 'context;
  2. schedule : Base.unit -> Tnode.work;
  3. bindings : Indexing.jitted_bindings;
  4. name : Base.string;
}
val sexp_of_routine : +Backends (arrayjit.Arrayjit.Backends)

Module Arrayjit.Backends

module Debug_runtime = Utils.Debug_runtime
type 'context routine = {
  1. context : 'context;
  2. schedule : Base.unit -> Tnode.work;
  3. bindings : Indexing.compiled_bindings;
  4. 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
type code
type context
type nonrec routine = context routine
val name : Base.string
val initialize : Base.unit -> Base.unit
val is_initialized : Base.unit -> Base.bool
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
type code
val sexp_of_code : code -> Sexplib0.Sexp.t
type context
val sexp_of_context : context -> Sexplib0.Sexp.t
type nonrec routine = context routine
val sexp_of_routine : routine -> Sexplib0.Sexp.t
val name : Base.string
val initialize : Base.unit -> Base.unit
val is_initialized : Base.unit -> Base.bool
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_code : context -> code -> routine
val jit : - context -> - ?name:Base.string -> - Indexing.unit_bindings -> - Assignments.t -> - routine
val unsafe_cleanup : ?unsafe_shutdown:Base.bool -> Base.unit -> Base.unit

Cleans up all work on a backend. If ~unsafe_shutdown:true, releases resources, potentially making the backend unusable.

val from_host : context -> Tnode.t -> Base.bool

If the array is both hosted and in-context, copies from host to context and returns true.

val to_host : context -> Tnode.t -> Base.bool

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.

val unsafe_cleanup : ?unsafe_shutdown:Base.bool -> Base.unit -> Base.unit

Cleans up all work on a backend. If ~unsafe_shutdown:true, releases resources, potentially making the backend unusable.

val from_host : context -> Tnode.t -> Base.bool

If the array is both hosted and in-context, copies from host to context and returns true.

val to_host : context -> Tnode.t -> Base.bool

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

type code
type context
type nonrec routine = context routine
val name : Base.string
val initialize : Base.unit -> Base.unit
val is_initialized : Base.unit -> Base.bool
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

type code
val sexp_of_code : code -> Sexplib0.Sexp.t
type context
val sexp_of_context : context -> Sexplib0.Sexp.t
type nonrec routine = context routine
val sexp_of_routine : routine -> Sexplib0.Sexp.t
val name : Base.string
val initialize : Base.unit -> Base.unit
val is_initialized : Base.unit -> Base.bool
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_code : context -> code -> routine
val jit : - context -> - ?name:Base.string -> - Indexing.unit_bindings -> - Assignments.t -> - routine
val unsafe_cleanup : ?unsafe_shutdown:Base.bool -> Base.unit -> Base.unit

Cleans up all work on a backend. If ~unsafe_shutdown:true, releases resources, potentially making the backend unusable.

val from_host : context -> Tnode.t -> Base.bool

If the array is both hosted and in-context, copies from host to context and returns true.

val to_host : context -> Tnode.t -> Base.bool

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.

val unsafe_cleanup : ?unsafe_shutdown:Base.bool -> Base.unit -> Base.unit

Cleans up all work on a backend. If ~unsafe_shutdown:true, releases resources, potentially making the backend unusable.

val from_host : context -> Tnode.t -> Base.bool

If the array is both hosted and in-context, copies from host to context and returns true.

val to_host : context -> Tnode.t -> Base.bool

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

type context
val initialize : unit -> unit
val is_initialized : unit -> bool
val finalize : context -> unit
val sexp_of_context : context -> Sexplib.Sexp.t
val jit : +Cuda_backend (arrayjit.Arrayjit.Cuda_backend)

Module Arrayjit.Cuda_backend

type context
type code
val sexp_of_code : code -> Sexplib0.Sexp.t
val initialize : unit -> unit
val is_initialized : unit -> bool
val finalize : context -> unit
val sexp_of_context : context -> Sexplib.Sexp.t
val unsafe_cleanup : ?unsafe_shutdown:bool -> unit -> unit
val from_host : context -> Tnode.t -> bool

If the array is both hosted and in-context, copies from host to context and returns true.

val to_host : context -> Tnode.t -> bool

If the array is both hosted and in-context, copies from context to host and returns true.

val merge : + code
val unsafe_cleanup : ?unsafe_shutdown:bool -> unit -> unit
val from_host : context -> Tnode.t -> bool

If the array is both hosted and in-context, copies from host to context and returns true.

val to_host : context -> Tnode.t -> bool

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 optimization_level : int Base.ref
type mem_properties =
  1. | Local_only
    (*

    The array is only needed for a local computation, is allocated on the stack.

    *)
  2. | From_context
    (*

    The array has a copy allocated per-cpu-device, may or may not exist on the host.

    *)
  3. | Constant_from_host
    (*

    The array is read directly from the host.

    *)
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
val root_ctx : Gccjit.context option Base.ref
module Tn = Tnode
type context = {
  1. label : Base.string;
  2. arrays : Ndarray.t Base.Map.M(Tn).t;
  3. result : Gccjit.result Base.option;
}
val sexp_of_context : context -> Sexplib0.Sexp.t
val unsafe_cleanup : ?unsafe_shutdown:bool -> unit -> Base.unit
val is_initialized : unit -> bool
val initialize : unit -> Base.unit
val finalize : context -> unit
val init : label:Base.string -> context
type ndarray = {
  1. nd : Tn.t;
    (*

    The original array.

    *)
  2. 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.
    *)
  3. mem : mem_properties;
  4. dims : Base.int Base.array;
  5. size_in_bytes : Base.int;
  6. num_typ : Gccjit.type_;
    (*

    The type of the stored values: short (precision Half), float (precision Single), double (precision Double).

    *)
  7. is_double : Base.bool;
}
val sexp_of_ndarray : ndarray -> Sexplib0.Sexp.t
type info = {
  1. ctx : Gccjit.context;
  2. func : Gccjit.function_;
  3. traced_store : Low_level.traced_store;
  4. init_block : Gccjit.block;
  5. arrays : (Tn.t, ndarray) Base.Hashtbl.t;
}
val sexp_of_info : info -> Sexplib0.Sexp.t
type param_source =
  1. | Log_file_name
  2. | Param_ptr of Tn.t
  3. | Static_idx of Indexing.static_symbol
val sexp_of_param_source : param_source -> Sexplib0.Sexp.t
type routine = {
  1. info : info;
  2. bindings : Indexing.unit_bindings;
  3. name : Base.string;
  4. result : Gccjit.result;
  5. opt_ctx_arrays : Ndarray.t Base.Map.M(Tn).t Base.option;
  6. params : param_source Base.list;
}
val sexp_of_routine : routine -> Sexplib0.Sexp.t
type code =
  1. | Postponed of {
    1. compiled : Low_level.traced_store * Low_level.t;
    2. bindings : Indexing.unit_bindings;
    3. name : Base.string;
    }
  2. | Jitted of routine
val sexp_of_code : code -> Sexplib0.Sexp.t
type gccjit_param = Gccjit.param
type gccjit_lvalue = Gccjit.lvalue
type gccjit_rvalue = Gccjit.rvalue
val sexp_of_gccjit_param : Gccjit.param -> Base.Sexp.t
val sexp_of_gccjit_lvalue : Gccjit.lvalue -> Base.Sexp.t
val sexp_of_gccjit_rvalue : Gccjit.rvalue -> Base.Sexp.t
type ctx_nodes =
  1. | Ctx_arrays of Ndarray.t Base.Map.M(Tn).t Base.ref
  2. | 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 optimization_level : int Base.ref
type mem_properties =
  1. | Local_only
    (*

    The array is only needed for a local computation, is allocated on the stack.

    *)
  2. | From_context
    (*

    The array has a copy allocated per-cpu-device, may or may not exist on the host.

    *)
  3. | Constant_from_host
    (*

    The array is read directly from the host.

    *)
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
val root_ctx : Gccjit.context option Base.ref
module Tn = Tnode
type context = {
  1. label : Base.string;
  2. arrays : Ndarray.t Base.Map.M(Tn).t;
  3. result : Gccjit.result Base.option;
}
val sexp_of_context : context -> Sexplib0.Sexp.t
val unsafe_cleanup : ?unsafe_shutdown:bool -> unit -> Base.unit
val is_initialized : unit -> bool
val initialize : unit -> Base.unit
val finalize : context -> unit
val init : label:Base.string -> context
type ndarray = {
  1. nd : Tn.t;
    (*

    The original array.

    *)
  2. 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.
    *)
  3. mem : mem_properties;
  4. dims : Base.int Base.array;
  5. size_in_bytes : Base.int;
  6. num_typ : Gccjit.type_;
    (*

    The type of the stored values: short (precision Half), float (precision Single), double (precision Double).

    *)
  7. is_double : Base.bool;
}
val sexp_of_ndarray : ndarray -> Sexplib0.Sexp.t
type info = {
  1. ctx : Gccjit.context;
  2. func : Gccjit.function_;
  3. traced_store : Low_level.traced_store;
  4. init_block : Gccjit.block;
  5. arrays : (Tn.t, ndarray) Base.Hashtbl.t;
}
val sexp_of_info : info -> Sexplib0.Sexp.t
type param_source =
  1. | Log_file_name
  2. | Param_ptr of Tn.t
  3. | Static_idx of Indexing.static_symbol
val sexp_of_param_source : param_source -> Sexplib0.Sexp.t
type routine = {
  1. info : info;
  2. bindings : Indexing.unit_bindings;
  3. name : Base.string;
  4. result : Gccjit.result;
  5. opt_ctx_arrays : Ndarray.t Base.Map.M(Tn).t Base.option;
  6. params : param_source Base.list;
}
val sexp_of_routine : routine -> Sexplib0.Sexp.t
type code =
  1. | Postponed of {
    1. compiled : Low_level.traced_store * Low_level.t;
    2. bindings : Indexing.unit_bindings;
    3. name : Base.string;
    }
  2. | Compiled of routine
val sexp_of_code : code -> Sexplib0.Sexp.t
type gccjit_param = Gccjit.param
type gccjit_lvalue = Gccjit.lvalue
type gccjit_rvalue = Gccjit.rvalue
val sexp_of_gccjit_param : Gccjit.param -> Base.Sexp.t
val sexp_of_gccjit_lvalue : Gccjit.lvalue -> Base.Sexp.t
val sexp_of_gccjit_rvalue : Gccjit.rvalue -> Base.Sexp.t
type ctx_nodes =
  1. | Ctx_arrays of Ndarray.t Base.Map.M(Tn).t Base.ref
  2. | 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.context -> idcs:Gccjit.rvalue Base.Array.t -> dims:int Base.Array.t -> @@ -26,7 +26,15 @@ Gccjit.block -> string -> Gccjit.rvalue -> - unit
val prepare_arrays : + unit
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 jit_func : + 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 header_sep : Re.re
val maybe_jit : + info * Ndarray.t Base.Map.M(Tn).t * (gccjit_param * param_source) Base.list
val header_sep : Re.re
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 jit_code : + * Base.string
val bound_symbols : 'a bindings -> static_symbol Base.List.t
type ('r, 'idcs, 'p1, 'p2) variadic =
  1. | Result of 'r
  2. | Param_idx of Base.int Base.ref - * (Base.int -> 'r, Base.int -> 'idcs, 'p1, 'p2) variadic
  3. | Param_1 of 'p1 Base.option Base.ref * ('p1 -> 'r, 'idcs, 'p1, 'p2) variadic
  4. | 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 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.

    val example_train_loop : + 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.

    val debug_name : Tensor.t -> Base.String.t
    val example_train_loop : ?disable_rootness_check:bool -> - name:Base.String.t -> seed:Base.int -> batch_size:Base__Int.t -> init_lr:Base.float ->