Skip to content

Commit 52d3dd5

Browse files
committed
Temporary: Experiment 2
1 parent 3053d32 commit 52d3dd5

File tree

7 files changed

+2272
-2236
lines changed

7 files changed

+2272
-2236
lines changed

arrayjit/lib/ndarray.ml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -444,13 +444,13 @@ let log_debug_info ~from_log_level:_level _nd =
444444
(fold_as_float _nd ~init:false ~f:(fun has_neg_inf _ v ->
445445
has_neg_inf || Float.(v = neg_infinity))
446446
: bool)]]]]
447-
447+
(*
448448
let round_to_precision x prec =
449-
let factor = 10.0 **. Float.of_int prec in
450-
Float.round (x *. factor) /. factor
449+
let factor = 10.0 **. Float.of_int (prec + 1) in
450+
Float.round (x *. factor) /. factor *)
451451

452452
let concise_float ~prec v =
453-
let v = round_to_precision v prec in
453+
(* let v = round_to_precision v prec in *)
454454
let s = Printf.sprintf "%.*e" prec v in
455455
(* The C99 standard requires at least two digits for the exponent, but the leading zero is a waste
456456
of space. Also handle dangling e+ for 0.0 *)

test/einsum_trivia.ml

Lines changed: 1269 additions & 1269 deletions
Large diffs are not rendered by default.

test/hello_world_op.ml

Lines changed: 410 additions & 375 deletions
Large diffs are not rendered by default.

test/micrograd_demo.ml

Lines changed: 160 additions & 160 deletions
Large diffs are not rendered by default.

test/ocannl_config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
randomness_lib=for_tests
22
log_main_domain_to_stdout=true
33
backend=cc
4-
log_level=0
4+
log_level=0
5+
print_decimals_precision=7

test/primitive_ops.ml

Lines changed: 225 additions & 225 deletions
Large diffs are not rendered by default.

test/zero2hero_1of7.ml

Lines changed: 202 additions & 202 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)