package arrayjit

  1. Overview
  2. Docs

Module Arrayjit.TnodeSource

Sourcemodule Lazy = Utils.Lazy
Sourcemodule Nd = Ndarray
Sourcemodule Debug_runtime = Utils.Debug_runtime
Sourceval _get_local_debug_runtime : unit -> (module Minidebug_runtime.Debug_runtime)
Sourcetype task =
  1. | Task : {
    1. context_lifetime : 'a;
    2. description : Base.string;
    3. work : Base.unit -> Base.unit;
    } -> task
Sourceval sexp_of_task : task -> Sexplib0.Sexp.t
Sourceval run : task -> Base.unit
Sourcetype memory_type =
  1. | Constant
    (*

    The tensor node does not change after initialization.

    *)
  2. | Nonconstant
    (*

    One of: Changed_on_devices, Volatile.

    *)
  3. | Changed_on_devices
    (*

    The tensor node will only change on host via a to_host call.

    *)
  4. | Volatile
    (*

    The tensor node will only change on any device via a from_host call possibly followed by device_to_device.

    *)
Sourceval memory_type_of_sexp : Sexplib0.Sexp.t -> memory_type
Sourceval sexp_of_memory_type : memory_type -> Sexplib0.Sexp.t
Sourceval compare_memory_type : memory_type -> memory_type -> Base.int
Sourceval equal_memory_type : memory_type -> memory_type -> Base.bool
Sourcetype memory_mode =
  1. | Effectively_constant
    (*

    Either Hosted Constant, or a subset of Virtual.

    *)
  2. | Virtual
    (*

    The tensor node's computations are inlined on a per-scalar basis.

    *)
  3. | Never_virtual
    (*

    One of: Local, On_device, Hosted.

    *)
  4. | Local
    (*

    The full tensor node is cached for the duration of a computation but not persisted across calls to compiled functions. It is not available for merging across devices.

    *)
  5. | Device_only
    (*

    One of: Local, On_device.

    *)
  6. | On_device
    (*

    The tensor node is stored on the devices that compute with it and persisted across function calls. It is available for merging across devices (for devices that support merging / P2P), but not (directly) for visualization or storing to disk.

    *)
  7. | Materialized
    (*

    One of: On_device, Hosted.

    *)
  8. | Hosted of memory_type
    (*

    The tensor node is stored in a globally addressable memory, in addition to on devices where it is computed with (or as part of one of them, if "hosting on device", or only on the host and not on devices, for some backends). It is available for all operations, and visible to OCaml programs as an Ndarray (the optional array of t).

    *)
Sourceval memory_mode_of_sexp : Sexplib0.Sexp.t -> memory_mode
Sourceval sexp_of_memory_mode : memory_mode -> Sexplib0.Sexp.t
Sourceval compare_memory_mode : memory_mode -> memory_mode -> Base.int
Sourceval equal_memory_mode : memory_mode -> memory_mode -> Base.bool
Sourcetype t = {
  1. array : Nd.t Base.option Lazy.t;
  2. prec : Ops.prec;
  3. dims : Base.int Base.array Lazy.t;
  4. id : Base.int;
  5. label : Base.string Base.list;
    (*

    Display information. It is better if the last element of the list is the most narrow or alphanumeric, e.g. an identifier.

    *)
  6. mutable memory_mode : (memory_mode * Base.int) Base.option;
  7. mutable backend_info : Base.Sexp.t;
  8. mutable code_name : Base.string Base.option;
}
Sourceval sexp_of_t : t -> Sexplib0.Sexp.t
Sourceval compare : t -> t -> Base.int
Sourceval num_elems : t -> Base.int
Sourceval size_in_bytes : t -> int
Sourceval label : t -> Base.String.t
Sourceval is_alphanum_ : Base.String.t -> bool
Sourceval get_debug_name : ?code_name:Base.String.t -> id:int -> label:Base.String.t Base.List.t -> unit -> Base.String.t
Sourceval debug_name : t -> Base.String.t
Sourceval log_debug_info : from_log_level:int -> t -> unit
Sourceval default_to_most_local : t -> Base.int -> unit
Sourceval is_virtual_force : t -> Base.int -> bool
Sourceval is_hosted_force : ?specifically:memory_type -> t -> Base.int -> Base.bool
Sourceval is_materialized_force : t -> Base.int -> bool
Sourceval known_not_materialized : t -> bool
Sourceval known_constant : t -> bool
Sourceval known_non_virtual : t -> bool
Sourceval known_not_param : t -> bool
Sourceval mode_is_unspecified : t -> bool
Sourceval update_memory_mode : t -> memory_mode -> Base.int -> unit
include sig ... end
Sourcetype comparator_witness
Sourceval comparator : (t, comparator_witness) Base__Comparator.t
Sourceval equal : t -> t -> Base.bool
Sourceval hash_fold_t : Base.Hash.state -> t -> Base.Hash.state
Sourceval get_exn : t -> Nd.t
Sourceval has : t -> bool
Sourceval dims_to_string : ?with_axis_numbers:bool -> t -> Base.String.t
Sourceval no_grad_ident_label : t -> bool * Base.String.t option
Sourceval styled_ident : repeating_nograd_idents:(Base.String.t, 'a) Base.Hashtbl.t -> repeating_grad_idents:(Base.String.t, 'a) Base.Hashtbl.t -> [< `Heuristic_ocannl of [< `Dot_grad | `Under_grad ] | `Name_and_label | `Name_only ] -> t -> Base.String.t
Sourceval update_code_name : t -> Base.string -> unit
Sourceval get_style : ?arg_name:Base.String.t -> ?no_dots:bool -> unit -> [> `Heuristic_ocannl of [> `Dot_grad | `Under_grad ] | `Name_and_label | `Name_only ]
Sourceval header : t -> string
Sourcemodule Registry : sig ... end
Sourceval registry : Registry.t
Sourceval create : Ops.prec -> id:int -> label:Base.String.t Base.List.t -> dims:int Base.Array.t Lazy.t -> Ops.init_op -> t
Sourceval find : id:Base.int -> Registry.data option
Sourceval print_accessible_headers : unit -> Base.unit
Sourceval log_accessible_headers : unit -> unit
OCaml

Innovation. Community. Security.