Utils
module Set_O : sig ... end
type settings = {
mutable log_level : Base.int;
mutable debug_log_from_routines : Base.bool;
If the debug_log_from_routines
flag is true _and_ the flag log_level > 1
, backends should generate code (e.g. fprintf statements) to log the execution, and arrange for the logs to be emitted via ppx_minidebug.
mutable output_debug_files_in_build_directory : Base.bool;
Writes compilation related files in the build_files
subdirectory of the run directory (additional files, or files that would otherwise be in temp directory). When both output_debug_files_in_build_directory = true
and log_level > 1
, compilation should also preserve debug and line information for runtime debugging.
mutable fixed_state_for_init : Base.int Base.option;
mutable print_decimals_precision : Base.int;
When rendering arrays etc., outputs this many decimal digits.
*)mutable check_half_prec_constants_cutoff : Base.float Base.option;
If given, generic code optimization should fail if a half precision FP16 constant exceeds the cutoff.
*)mutable automatic_host_transfers : Base.bool;
If true, from_host
and to_host
happen automatically in specific situations.
mutable default_prng_variant : Base.string;
The default variant of threefry4x32 PRNG to use. Options: "crypto" (20 rounds) or "light" (2 rounds). Defaults to "light" for better performance.
*)mutable big_models : Base.bool;
If true, use uint64 for indexing arithmetic. If false, use uint32 for indexing arithmetic. This affects all backends' kernel index parameters and local index variables.
*)}
val settings_of_sexp : Sexplib0.Sexp.t -> settings
val sexp_of_settings : settings -> Sexplib0.Sexp.t
val settings : settings
Retrieves arg_name
argument from the command line or from an environment variable, returns default
if none found.
Filters the list keeping the first occurrence of each element.
Returns the multiset difference of l1
and l2
, where l1
and l2
must be sorted in increasing order.
Removes the first occurrence of an element from the list that is equal to the given element.
parallel_merge merge num_devices
progressively invokes the pairwise merge
callback, converging on the 0th position, with from
ranging from 1
to num_devices - 1
, and to_ < from
.
module Lazy : sig ... end
val compare_requirement : requirement -> requirement -> Base.int
val requirement_of_sexp : Sexplib0.Sexp.t -> requirement
val sexp_of_requirement : requirement -> Sexplib0.Sexp.t
val equal_mutable_list :
'a. ('a -> 'a -> Base.bool) ->
'a mutable_list ->
'a mutable_list ->
Base.bool
val mutable_list_of_sexp :
'a. (Sexplib0.Sexp.t -> 'a) ->
Sexplib0.Sexp.t ->
'a mutable_list
val sexp_of_mutable_list :
'a. ('a -> Sexplib0.Sexp.t) ->
'a mutable_list ->
Sexplib0.Sexp.t
val empty : 'a mutable_list
val cons : hd:'a -> tl:'a mutable_list -> 'a mutable_list
val is_empty : 'a mutable_list -> bool
val is_cons : 'a mutable_list -> bool
val empty_val : 'a mutable_list -> unit Stdlib.Option.t
val cons_val :
'a mutable_list ->
([> `hd of 'a ] * [> `tl of 'a mutable_list ]) Stdlib.Option.t
module Variants_of_mutable_list : sig ... end
val insert : next:'a -> 'a mutable_list -> 'a mutable_list
val tl_exn : 'a mutable_list -> 'a mutable_list
val open_build_file :
base_name:Base.String.t ->
extension:Base.String.t ->
build_file_channel
val captured_log_processors : captured_log_processor Base.list Base.ref
val weak_create : unit -> 'a weak_dynarray
val register_new :
'a weak_dynarray ->
?grow_by:Base__Int.t ->
(int -> 'a) ->
'a
val weak_iter : 'a weak_dynarray -> f:('a -> unit) -> unit
val safe_lazy : Base.string -> (Base.unit -> 'a) -> 'a safe_lazy
val safe_force : 'a safe_lazy -> 'a
val is_safe_val : 'a safe_lazy -> bool
val hash_fold_safe_lazy :
'a ->
Base__.Ppx_hash_lib.Std.Hash.state ->
'b safe_lazy ->
Base__.Ppx_hash_lib.Std.Hash.state
val sexp_of_safe_lazy : ('a -> Base.Sexp.t) -> 'a safe_lazy -> Base.Sexp.t