package arrayjit
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=529f0921963a6eee0194159a9c0fea41
sha512=fc16e8b6cd72cb2ae18277b3727d065fa6c1d137e3187f9586fb0bfe7edeb45597cb58f389e79c20d7e3ae80661e6f9f20e0b95dcbbf27ee5688bcc571d395dd
doc/arrayjit.utils/Utils/index.html
Module Utils
Source
val map_merge :
('a, 'b, 'c) Base.Map.t ->
('a, 'b, 'c) Base.Map.t ->
f:('b -> 'b -> 'b) ->
('a, 'b, 'c) Base.Map.t
val mref_add :
('a, 'b, 'c) Base.Map.t Base.ref ->
key:'a ->
data:'b ->
or_:('b -> Base.unit) ->
Base.unit
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 flaglog_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 bothoutput_debug_files_in_build_directory = true
andlog_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
andto_host
happen automatically in specific situations.- When a host array is about to be read, we transfer to host from the context that most recently updated the node.
- When a routine is about to be run, we transfer the routine's inputs from host to the routine's context if the host array was not yet transfered since its creation or most recent modification.
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.
*)
}
Retrieves arg_name
argument from the command line or from an environment variable, returns default
if none found.
val union_find :
equal:('a -> 'a -> bool) ->
('a, 'a, 'b) Base.Map.t ->
key:'a ->
rank:int ->
'a * int
val union_add :
equal:('a -> 'a -> bool) ->
('a, 'a, 'b) Base.Map.t ->
'a ->
'a ->
('a, 'a, 'b) Base.Map.t
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
.
val output_to_build_file :
fname:Base.String.t ->
(PPrint.ToChannel.document -> Base.unit) option
val equal_mutable_list :
'a. ('a -> 'a -> Base.bool) ->
'a mutable_list ->
'a mutable_list ->
Base.bool
type build_file_channel = {
f_path : Base.string;
oc : out_channel;
finalize : Base.unit -> Base.unit;
}
val open_build_file :
base_name:Base.String.t ->
extension:Base.String.t ->
build_file_channel
type captured_log_processor = {
log_processor_prefix : Base.string;
process_logs : Base.string Base.list -> Base.unit;
}
val add_log_processor :
prefix:Base.string ->
(Base.string Base.list -> Base.unit) ->
Base.unit
val log_debug_routine_logs :
log_contents:Base.string Base.List.t ->
stream_name:Base.String.t ->
unit
type 'a safe_lazy = {
mutable value : [ `Callback of Base.unit -> 'a | `Value of 'a ];
unique_id : Base.string;
}