Organisationsahrefsocannle6f0e7 ()(lint-fmt)

(lint-fmt)

Link Copied
Code Copied

Logs

2025-08-07 09:40.21: New job: test ahrefs/ocannl https://github.com/ahrefs/ocannl.git#refs/heads/master (e6f0e7e44f4a6662cbfa7956a08e5efdc488a651) (linux-x86_64:(lint-fmt))
Base: ocaml/opam:debian-12-ocaml-4.08@sha256:474656ea1593a299054f8966c700443fa0944c9534de3da94ca6dfab4a44c47a
ocamlformat version: version 0.27.0 (from opam)


To reproduce locally:


git clone --recursive "https://github.com/ahrefs/ocannl.git" -b "master" && cd "ocannl" && git reset --hard e6f0e7e4
cat > Dockerfile <<'END-OF-DOCKERFILE'
FROM ocaml/opam:debian-12-ocaml-4.08@sha256:474656ea1593a299054f8966c700443fa0944c9534de3da94ca6dfab4a44c47a
USER 1000:1000
RUN cd ~/opam-repository && (git cat-file -e b8021439f8c57ba6435bc2263f6596671f4f4466 || git fetch origin master) && git reset -q --hard b8021439f8c57ba6435bc2263f6596671f4f4466 && git log --no-decorate -n1 --oneline && opam update -u
RUN opam depext -i dune
WORKDIR /src
RUN opam depext -i ocamlformat=0.27.0
COPY --chown=1000:1000 . /src/
RUN opam exec -- dune build @fmt --ignore-promoted-rules || (echo "dune build @fmt failed"; exit 2)


END-OF-DOCKERFILE
docker build .
END-REPRO-BLOCK


2025-08-07 09:40.21: Using cache hint "ahrefs/ocannl-ocaml/opam:debian-12-ocaml-4.08@sha256:474656ea1593a299054f8966c700443fa0944c9534de3da94ca6dfab4a44c47a-debian-12-4.08_opam-2.4-ocamlformat-b8021439f8c57ba6435bc2263f6596671f4f4466"
2025-08-07 09:40.21: Using OBuilder spec:
((from ocaml/opam:debian-12-ocaml-4.08@sha256:474656ea1593a299054f8966c700443fa0944c9534de3da94ca6dfab4a44c47a)
(user (uid 1000) (gid 1000))
(run (cache (opam-archives (target /home/opam/.opam/download-cache)))
(network host)
(shell "cd ~/opam-repository && (git cat-file -e b8021439f8c57ba6435bc2263f6596671f4f4466 || git fetch origin master) && git reset -q --hard b8021439f8c57ba6435bc2263f6596671f4f4466 && git log --no-decorate -n1 --oneline && opam update -u"))
(run (cache (opam-archives (target /home/opam/.opam/download-cache)))
(network host)
(shell "opam depext -i dune"))
(workdir /src)
(run (cache (opam-archives (target /home/opam/.opam/download-cache)))
(network host)
(shell "opam depext -i ocamlformat=0.27.0"))
(copy (src .) (dst /src/))
(run (shell "opam exec -- dune build @fmt --ignore-promoted-rules || (echo \"dune build @fmt failed\"; exit 2)"))
)


2025-08-07 09:40.21: Waiting for resource in pool OCluster
2025-08-07 09:40.21: Waiting for worker…
2025-08-07 10:08.00: Got resource from pool OCluster
Building on toxis.caelum.ci.dev
All commits already cached
HEAD is now at e6f0e7e4 Remove `uniform1` for now, will be in 0.6.1


(from ocaml/opam:debian-12-ocaml-4.08@sha256:474656ea1593a299054f8966c700443fa0944c9534de3da94ca6dfab4a44c47a)
2025-08-07 10:08.21 ---> saved as "1d0024db739bd078f91b2384c47919652a4b72a425e3e24ce24cfd1f6debdfbc"


/: (user (uid 1000) (gid 1000))


/: (run (cache (opam-archives (target /home/opam/.opam/download-cache)))
(network host)
(shell "cd ~/opam-repository && (git cat-file -e b8021439f8c57ba6435bc2263f6596671f4f4466 || git fetch origin master) && git reset -q --hard b8021439f8c57ba6435bc2263f6596671f4f4466 && git log --no-decorate -n1 --oneline && opam update -u"))
b8021439f8 Merge pull request #28261 from kit-ty-kate/deploy-fix-25819


<><> Updating package repositories ><><><><><><><><><><><><><><><><><><><><><><>
[default] Initialised
default (at git+file:///home/opam/opam-repository):
[INFO] opam 2.1 and 2.2 include many performance and security improvements over 2.0; please consider upgrading (https://opam.ocaml.org/doc/Install.html)


Everything as up-to-date as possible (run with --verbose to show unavailable upgrades).
However, you may "opam upgrade" these packages explicitly, which will ask permission to downgrade or uninstall the conflicting packages.
Nothing to do.
# Run eval $(opam env) to update the current shell environment
2025-08-07 10:09.53 ---> saved as "76d9d96bb26da3c78200d383fd35f876d80571baf05962331a1fff5f47db0e2e"


/: (run (cache (opam-archives (target /home/opam/.opam/download-cache)))
(network host)
(shell "opam depext -i dune"))
# Detecting depexts using vars: arch=x86_64, os=linux, os-distribution=debian, os-family=debian
# No extra OS packages requirements found.
# All required OS packages found.
# Now letting opam install the packages
The following actions will be performed:
- install dune 3.19.1


<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[dune.3.19.1] found in cache


<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed dune.3.19.1
Done.
# Run eval $(opam env) to update the current shell environment
2025-08-07 10:10.54 ---> saved as "da0888a20a067de19f6183f0b497dcc2d1ea7f7036861cc50f633c662efdce4f"


/: (workdir /src)


/src: (run (cache (opam-archives (target /home/opam/.opam/download-cache)))
(network host)
(shell "opam depext -i ocamlformat=0.27.0"))
# Detecting depexts using vars: arch=x86_64, os=linux, os-distribution=debian, os-family=debian
# No extra OS packages requirements found.
# All required OS packages found.
# Now letting opam install the packages
The following actions will be performed:
- install sexplib0          v0.14.0  [required by base]
- install menhirLib         20240715 [required by ocamlformat-lib]
- install menhirCST         20240715 [required by menhir]
- install ocamlbuild        0.16.1   [required by fpath, astring, uuseg]
- install cmdliner          1.3.0    [required by ocamlformat]
- install menhirSdk         20240715 [required by ocamlformat-lib]
- install either            1.0.0    [required by ocamlformat-lib]
- install csexp             1.5.2    [required by ocamlformat]
- install dune-build-info   3.19.1   [required by ocamlformat-lib]
- install camlp-streams     5.0.1    [required by ocamlformat-lib]
- install seq               base     [required by re]
- install fix               20250428 [required by ocamlformat-lib]
- install ocaml-version     4.0.1    [required by ocamlformat-lib]
- install ocamlfind         1.9.8    [required by ocp-indent, astring, fpath, uuseg]
- install menhir            20240715 [required by ocamlformat-lib]
- install dune-configurator 3.19.1   [required by base]
- install re                1.11.0   [required by ocamlformat]
- install topkg             1.1.0    [required by fpath, astring, uuseg]
- install base-bytes        base     [required by ocp-indent]
- install base              v0.14.3  [required by ocamlformat-lib]
- install uutf              1.0.4    [required by ocamlformat-lib]
- install astring           0.8.5    [required by ocamlformat-lib]
- install ocp-indent        1.8.1    [required by ocamlformat-lib]
- install stdio             v0.14.0  [required by ocamlformat-lib]
- install uucp              15.0.0   [required by uuseg]
- install fpath             0.7.3    [required by ocamlformat-lib]
- install uuseg             15.0.0   [required by ocamlformat-lib]
- install ocamlformat-lib   0.27.0   [required by ocamlformat]
- install ocamlformat       0.27.0
===== 29 to install =====


<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[astring.0.8.5] found in cache
[base.v0.14.3] found in cache
[camlp-streams.5.0.1] found in cache
[cmdliner.1.3.0] found in cache
[csexp.1.5.2] found in cache
[dune-build-info.3.19.1] found in cache
[dune-configurator.3.19.1] found in cache
[either.1.0.0] found in cache
[fix.20250428] found in cache
[fpath.0.7.3] found in cache
[menhir.20240715] found in cache
[menhirCST.20240715] found in cache
[menhirLib.20240715] found in cache
[menhirSdk.20240715] found in cache
[ocaml-version.4.0.1] found in cache
[ocamlbuild.0.16.1] found in cache
[ocamlfind.1.9.8] found in cache
[ocamlformat.0.27.0] found in cache
[ocamlformat-lib.0.27.0] found in cache
[ocp-indent.1.8.1] found in cache
[re.1.11.0] found in cache
[sexplib0.v0.14.0] found in cache
[stdio.v0.14.0] found in cache
[topkg.1.1.0] found in cache
[uucp.15.0.0] found in cache
[uuseg.15.0.0] found in cache
[uutf.1.0.4] found in cache


<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed seq.base
-> installed camlp-streams.5.0.1
-> installed csexp.1.5.2
-> installed either.1.0.0
-> installed fix.20250428
-> installed menhirCST.20240715
-> installed menhirLib.20240715
-> installed menhirSdk.20240715
-> installed cmdliner.1.3.0
-> installed ocaml-version.4.0.1
-> installed re.1.11.0
-> installed sexplib0.v0.14.0
-> installed dune-build-info.3.19.1
-> installed dune-configurator.3.19.1
-> installed ocamlfind.1.9.8
-> installed base-bytes.base
-> installed ocp-indent.1.8.1
-> installed ocamlbuild.0.16.1
-> installed base.v0.14.3
-> installed stdio.v0.14.0
-> installed topkg.1.1.0
-> installed uutf.1.0.4
-> installed astring.0.8.5
-> installed fpath.0.7.3
-> installed menhir.20240715
-> installed uucp.15.0.0
-> installed uuseg.15.0.0
-> installed ocamlformat-lib.0.27.0
-> installed ocamlformat.0.27.0
Done.


<><> ocp-indent.1.8.1 installed successfully ><><><><><><><><><><><><><><><><><>
=> This package requires additional configuration for use in editors. Install package 'user-setup', or manually:


* for Emacs, add these lines to ~/.emacs:
(add-to-list 'load-path "/home/opam/.opam/4.08/share/emacs/site-lisp")
(require 'ocp-indent)


* for Vim, add this line to ~/.vimrc:
set rtp^="/home/opam/.opam/4.08/share/ocp-indent/vim"
# Run eval $(opam env) to update the current shell environment
2025-08-07 10:12.33 ---> saved as "86ec8dcb8046a1e5dacfb1841e8c026d30cfead67649bcb6d6a8f9ddd6fb153d"


/src: (copy (src .) (dst /src/))
2025-08-07 10:12.33 ---> saved as "21d407a43707158762f94ee41c50ab2198ce5b350c6fb3a456e8bae72bf01a64"


/src: (run (shell "opam exec -- dune build @fmt --ignore-promoted-rules || (echo \"dune build @fmt failed\"; exit 2)"))
File "arrayjit/bin/dune", line 6, characters 30-43:
6 |   (pps ppx_here ppx_minidebug ppx_sexp_conv))
^^^^^^^^^^^^^
Error: Library "ppx_sexp_conv" not found.
-> required by _build/default/arrayjit/bin/read_config.exe
-> required by %{dep:../../../arrayjit/bin/read_config.exe} at
test/operations/dune:17
-> required by _build/default/test/operations/config/ocannl_backend.txt
-> required by %{read:config/ocannl_backend.txt} at test/operations/dune:33
-> required by Computing directory contents of _build/default/test/operations
File "datasets/dune", line 1, characters 0-0:
diff --git a/_build/default/datasets/dune b/_build/default/datasets/.formatted/dune
index 38209fc..51fd1fc 100644
--- a/_build/default/datasets/dune
+++ b/_build/default/datasets/.formatted/dune
@@ -7,8 +7,11 @@


(install
(package neural_nets_lib)
- (section (site (neural_nets_lib data)))
- (files (names.txt as names.txt)))
+ (section
+  (site
+   (neural_nets_lib data)))
+ (files
+  (names.txt as names.txt)))


(generate_sites_module
(module dataset_sites)
File "arrayjit/bin/dune", line 6, characters 7-15:
6 |   (pps ppx_here ppx_minidebug ppx_sexp_conv))
^^^^^^^^
Error: Library "ppx_here" not found.
-> required by _build/default/arrayjit/bin/.merlin-conf/exe-read_config
-> required by _build/default/arrayjit/bin/read_config.exe
-> required by %{dep:../../../arrayjit/bin/read_config.exe} at
test/operations/dune:17
-> required by _build/default/test/operations/config/ocannl_backend.txt
-> required by %{read:config/ocannl_backend.txt} at test/operations/dune:33
-> required by Computing directory contents of _build/default/test/operations
File "test/training/dune", line 1, characters 0-0:
diff --git a/_build/default/test/training/dune b/_build/default/test/training/.formatted/dune
index 680c825..abfc59d 100644
--- a/_build/default/test/training/dune
+++ b/_build/default/test/training/.formatted/dune
@@ -26,4 +26,4 @@
(deps ocannl_config ../../datasets/names.txt)
(libraries ocannl datasets)
(preprocess
-  (pps ppx_here ppx_ocannl)))
\ No newline at end of file
+  (pps ppx_here ppx_ocannl)))
File "arrayjit/lib/builtins_cuda_large.ml", line 1, characters 0-0:
diff --git a/_build/default/arrayjit/lib/builtins_cuda_large.ml b/_build/default/arrayjit/lib/.formatted/builtins_cuda_large.ml
index 9f8e884..9a7add2 100644
--- a/_build/default/arrayjit/lib/builtins_cuda_large.ml
+++ b/_build/default/arrayjit/lib/.formatted/builtins_cuda_large.ml
@@ -1,4 +1,5 @@
-let source = {|
+let source =
+  {|
#include <cuda_runtime.h>
#include <stdint.h>


@@ -110,4 +111,4 @@ __device__ uint4x32_t arrayjit_threefry4x32_impl(uint4x32_t key, uint4x32_t coun


__device__ uint4x32_t ( *arrayjit_threefry4x32)(uint4x32_t key, uint4x32_t counter) = arrayjit_threefry4x32_impl;


-|}
\ No newline at end of file
+|}
File "arrayjit/lib/builtins_cuda_small.ml", line 1, characters 0-0:
diff --git a/_build/default/arrayjit/lib/builtins_cuda_small.ml b/_build/default/arrayjit/lib/.formatted/builtins_cuda_small.ml
index 94b807a..f69f9fd 100644
--- a/_build/default/arrayjit/lib/builtins_cuda_small.ml
+++ b/_build/default/arrayjit/lib/.formatted/builtins_cuda_small.ml
@@ -1,4 +1,5 @@
-let source = {|
+let source =
+  {|
typedef struct {
uint32_t v[4];
} uint4x32_t;
@@ -182,4 +183,4 @@ __device__ uint8x16_t uint4x32_to_u8_uniform_vec(uint4x32_t x) {
}
return result;
}
-|}
\ No newline at end of file
+|}
File "arrayjit/lib/builtins_metal.ml", line 1, characters 0-0:
diff --git a/_build/default/arrayjit/lib/builtins_metal.ml b/_build/default/arrayjit/lib/.formatted/builtins_metal.ml
index ae0e1b1..e87f3a5 100644
--- a/_build/default/arrayjit/lib/builtins_metal.ml
+++ b/_build/default/arrayjit/lib/.formatted/builtins_metal.ml
@@ -1,4 +1,5 @@
-let source = {|
+let source =
+  {|
#include <metal_stdlib>
using namespace metal;


@@ -369,4 +370,4 @@ uint4 half_to_uint4x32(uint16_t x) {
uint4 fp8_to_uint4x32(uint8_t x) {
return uint4(uint32_t(x), 0, 0, 0);
}
-|}
\ No newline at end of file
+|}
File "datasets/names.ml", line 1, characters 0-0:
diff --git a/_build/default/datasets/names.ml b/_build/default/datasets/.formatted/names.ml
index 3d9f30c..4314c95 100644
--- a/_build/default/datasets/names.ml
+++ b/_build/default/datasets/.formatted/names.ml
@@ -2,31 +2,38 @@ open Base
open Stdio


(* Access the site locations to find names.txt *)
-let read_names () =
+let read_names () =
let data_locations : string list = Dataset_sites.Sites.data in
let names_file = "names.txt" in
let rec find_file = function
| [] -> None
| dir :: rest ->
let filepath = Stdlib.Filename.concat dir names_file in
-        if Stdlib.Sys.file_exists filepath then Some filepath
-        else find_file rest
+        if Stdlib.Sys.file_exists filepath then Some filepath else find_file rest
in
-  let filepath = match find_file data_locations with
+  let filepath =
+    match find_file data_locations with
| Some path -> path
| None ->
(* Fallback for testing: try to find the file in common locations *)
-        let fallback_paths = [
-          names_file;  (* current directory *)
-          "../../datasets/names.txt";  (* from test/training/ *)
-          "../datasets/names.txt";     (* from test/ *)
-          "datasets/names.txt";        (* from project root *)
-        ] in
+        let fallback_paths =
+          [
+            names_file;
+            (* current directory *)
+            "../../datasets/names.txt";
+            (* from test/training/ *)
+            "../datasets/names.txt";
+            (* from test/ *)
+            "datasets/names.txt";
+            (* from project root *)
+          ]
+        in
let rec try_fallbacks = function
-          | [] -> failwith (Printf.sprintf "Could not find %s in any location (sites: %s)" names_file (String.concat ~sep:"; " data_locations))
-          | path :: rest ->
-              if Stdlib.Sys.file_exists path then path
-              else try_fallbacks rest
+          | [] ->
+              failwith
+                (Printf.sprintf "Could not find %s in any location (sites: %s)" names_file
+                   (String.concat ~sep:"; " data_locations))
+          | path :: rest -> if Stdlib.Sys.file_exists path then path else try_fallbacks rest
in
try_fallbacks fallback_paths
in
@@ -63,4 +70,4 @@ let char_to_one_hot c =
let c_index = char_index c in
let arr = Array.create ~len:dict_size 0. in
arr.(c_index) <- 1.;
-  arr
\ No newline at end of file
+  arr
File "datasets/half_moons.ml", line 1, characters 0-0:
diff --git a/_build/default/datasets/half_moons.ml b/_build/default/datasets/.formatted/half_moons.ml
index dea5c70..2256b9e 100644
--- a/_build/default/datasets/half_moons.ml
+++ b/_build/default/datasets/.formatted/half_moons.ml
@@ -51,7 +51,7 @@ let generate_with_kind kind ?(config = Config.default) ~len () =
let c = Float.cos v and s = Float.sin v in
let x = 1.0 -. c +. noise () in
let y = 0.5 -. s +. noise () in
-    let idx = i * 2 + 1 in
+    let idx = (i * 2) + 1 in
Genarray.set coordinates [| idx; 0 |] x;
Genarray.set coordinates [| idx; 1 |] y;
Genarray.set labels [| idx; 0 |] (-1.0)
File "test/training/moons_demo.ml", line 1, characters 0-0:
diff --git a/_build/default/test/training/moons_demo.ml b/_build/default/test/training/.formatted/moons_demo.ml
index 06554bb..2a10c7a 100644
--- a/_build/default/test/training/moons_demo.ml
+++ b/_build/default/test/training/.formatted/moons_demo.ml
@@ -29,7 +29,7 @@ let main () =
let step_n, bindings = IDX.get_static_symbol bindings in
let moons_flat = TDSL.rebatch ~l:"moons_flat" moons_flat_ndarray () in
let moons_classes = TDSL.rebatch ~l:"moons_classes" moons_classes_ndarray () in
-  let%op mlp x = ("w3" * relu ("b2" 16 + ("w2" * relu ("b1" 16 + ("w1" * x))))) in
+  let%op mlp x = "w3" * relu ("b2" 16 + ("w2" * relu ("b1" 16 + ("w1" * x)))) in
(* Don't decay the learning rate too quickly, it behaves better than in the original. *)
let%op moons_input = moons_flat @| batch_n in
let%op moons_class = moons_classes @| batch_n in
File "lib/tensor.mli", line 1, characters 0-0:
diff --git a/_build/default/lib/tensor.mli b/_build/default/lib/.formatted/tensor.mli
index 1efc66c..5453647 100644
--- a/_build/default/lib/tensor.mli
+++ b/_build/default/lib/.formatted/tensor.mli
@@ -8,10 +8,7 @@ type tn_set = Set.M(Ir.Tnode).t
type asgns = Ir.Assignments.t
type comp = Ir.Assignments.comp
type fetch_op = Ir.Assignments.fetch_op
-type projections = {
-  projections_debug : string;
-  projections : Ir.Indexing.projections Lazy.t;
-}
+type projections = { projections_debug : string; projections : Ir.Indexing.projections Lazy.t }


type diff = {
grad : tn;
File "arrayjit/lib/assignments.ml", line 1, characters 0-0:
diff --git a/_build/default/arrayjit/lib/assignments.ml b/_build/default/arrayjit/lib/.formatted/assignments.ml
index c8d6476..ddfafe2 100644
--- a/_build/default/arrayjit/lib/assignments.ml
+++ b/_build/default/arrayjit/lib/.formatted/assignments.ml
@@ -111,10 +111,11 @@ let%debug3_sexp context_nodes ~(use_host_memory : 'a option) (asgns : t) : Tn.t_
| Seq (t1, t2) -> loop t1 + loop t2
| Block_comment (_, t) -> loop t
| Accum_op { lhs; rhs; _ } ->
-        let rhses = match rhs with
-        | Unop { rhs; _ } -> [ of_node rhs ]
-        | Binop { rhs1; rhs2; _ } -> [ of_node rhs1; of_node rhs2 ]
-        | Ternop { rhs1; rhs2; rhs3; _ } -> [ of_node rhs1; of_node rhs2; of_node rhs3 ]
+        let rhses =
+          match rhs with
+          | Unop { rhs; _ } -> [ of_node rhs ]
+          | Binop { rhs1; rhs2; _ } -> [ of_node rhs1; of_node rhs2 ]
+          | Ternop { rhs1; rhs2; rhs3; _ } -> [ of_node rhs1; of_node rhs2; of_node rhs3 ]
in
Set.union_list (module Tn) (one lhs :: rhses)
| Set_vec_unop { lhs; rhs; _ } -> Set.union (one lhs) (of_node rhs)
@@ -136,10 +137,11 @@ let%debug3_sexp guess_output_nodes (asgns : t) : Tn.t_set =
(i1 + i2, o1 + o2 - (i1 + i2))
| Block_comment (_, t) -> loop t
| Accum_op { lhs; rhs; _ } ->
-        let inputs = match rhs with
-        | Unop { rhs; _ } -> of_node rhs
-        | Binop { rhs1; rhs2; _ } -> of_node rhs1 + of_node rhs2
-        | Ternop { rhs1; rhs2; rhs3; _ } -> of_node rhs1 + of_node rhs2 + of_node rhs3
+        let inputs =
+          match rhs with
+          | Unop { rhs; _ } -> of_node rhs
+          | Binop { rhs1; rhs2; _ } -> of_node rhs1 + of_node rhs2
+          | Ternop { rhs1; rhs2; rhs3; _ } -> of_node rhs1 + of_node rhs2 + of_node rhs3
in
(inputs, one lhs)
| Set_vec_unop { lhs; rhs; _ } -> (of_node rhs, one lhs)
@@ -250,10 +252,11 @@ let%track4_sexp to_low_level code =
and loop (code : t) : Low_level.t =
match code with
| Accum_op { initialize_neutral; accum; lhs; rhs; projections; _ } ->
-        let op, rhses = match rhs with
-        | Unop { op; rhs } -> (Ops.Unop op, [| rhs |])
-        | Binop { op; rhs1; rhs2 } -> (Ops.Binop op, [| rhs1; rhs2 |])
-        | Ternop { op; rhs1; rhs2; rhs3 } -> (Ops.Ternop op, [| rhs1; rhs2; rhs3 |])
+        let op, rhses =
+          match rhs with
+          | Unop { op; rhs } -> (Ops.Unop op, [| rhs |])
+          | Binop { op; rhs1; rhs2 } -> (Ops.Binop op, [| rhs1; rhs2 |])
+          | Ternop { op; rhs1; rhs2; rhs3 } -> (Ops.Ternop op, [| rhs1; rhs2; rhs3 |])
in
loop_accum ~initialize_neutral ~accum ~op ~lhs ~rhses projections
| Set_vec_unop { op; lhs; rhs; projections; _ } ->
@@ -390,13 +393,15 @@ let get_ident_within_code ?no_dots c =
loop c2
| Block_comment (_, c) -> loop c
| Accum_op { lhs; rhs; _ } ->
-        let rhses = match rhs with
-        | Unop { rhs; _ } -> [ tn rhs ]
-        | Binop { rhs1; rhs2; _ } -> [ tn rhs1; tn rhs2 ]
-        | Ternop { rhs1; rhs2; rhs3; _ } -> [ tn rhs1; tn rhs2; tn rhs3 ]
+        let rhses =
+          match rhs with
+          | Unop { rhs; _ } -> [ tn rhs ]
+          | Binop { rhs1; rhs2; _ } -> [ tn rhs1; tn rhs2 ]
+          | Ternop { rhs1; rhs2; rhs3; _ } -> [ tn rhs1; tn rhs2; tn rhs3 ]
in
List.iter ~f:visit (lhs :: rhses)
-    | Set_vec_unop { op = _; lhs; rhs; projections = _; projections_debug = _ } -> List.iter ~f:visit [ lhs; tn rhs ]
+    | Set_vec_unop { op = _; lhs; rhs; projections = _; projections_debug = _ } ->
+        List.iter ~f:visit [ lhs; tn rhs ]
| Fetch { array; fetch_op = _; dims = _ } -> visit array
in
loop c;
@@ -437,9 +442,9 @@ let to_doc ?name ?static_indices () c =
| Seq (c1, c2) -> doc_of_code c1 ^^ doc_of_code c2
| Block_comment (s, Noop) -> string ("# \"" ^ s ^ "\";") ^^ break 1
| Block_comment (s, c) -> string ("# \"" ^ s ^ "\";") ^^ break 1 ^^ doc_of_code c
-    | Accum_op { initialize_neutral; accum; lhs; rhs; projections_debug; _ } ->
+    | Accum_op { initialize_neutral; accum; lhs; rhs; projections_debug; _ } -> (
let proj_spec = projections_debug in
-        (match rhs with
+        match rhs with
| Ternop { op; rhs1; rhs2; rhs3 } ->
(* Uncurried syntax for ternary operations. *)
string (ident lhs)
@@ -485,8 +490,7 @@ let to_doc ?name ?static_indices () c =
else empty)
^^ string ";" ^^ break 1)
| Set_vec_unop { op; lhs; rhs; projections = _; projections_debug } ->
-        let proj_spec = projections_debug
-        in
+        let proj_spec = projections_debug in
string (ident lhs)
^^ space
^^ string (Ops.assign_op_cd_syntax ~initialize_neutral:false Arg2)
File "lib/train.ml", line 1, characters 0-0:
diff --git a/_build/default/lib/train.ml b/_build/default/lib/.formatted/train.ml
index 93053a1..6b779a1 100644
--- a/_build/default/lib/train.ml
+++ b/_build/default/lib/.formatted/train.ml
@@ -549,9 +549,7 @@ let%track3_sexp run_once ?(hosted = true) ?(skip_init = false) ?reinit_all
if skip_init || Set.is_empty t.params then ctx
else init_params (module Backend) ~ctx ~hosted ?reinit_all bindings t
in
-  let routine =
-    Backend.(link ctx @@ compile ctx.optimize_ctx bindings update)
-  in
+  let routine = Backend.(link ctx @@ compile ctx.optimize_ctx bindings update) in
Task.run routine.schedule;
routine.context


File "lib/ppx_cd.ml", line 1, characters 0-0:
diff --git a/_build/default/lib/ppx_cd.ml b/_build/default/lib/.formatted/ppx_cd.ml
index 9017d8a..774da25 100644
--- a/_build/default/lib/ppx_cd.ml
+++ b/_build/default/lib/.formatted/ppx_cd.ml
@@ -458,7 +458,8 @@ let translate (expr : expression) : result =
let initialize_neutral = if initialize_neutral then [%expr true] else [%expr false] in
let projections_lazy, projections_debug =
match projections with
-        | Some prjs -> ([%expr [%e prjs].Tensor.projections], [%expr [%e prjs].Tensor.projections_debug])
+        | Some prjs ->
+            ([%expr [%e prjs].Tensor.projections], [%expr [%e prjs].Tensor.projections_debug])
| None ->
let lhs_dims = project_p_dims "LHS" lhs.pexp_loc setup_l.slot in
let rhs1_dims = project_p_dims "RHS1" lhs.pexp_loc setup_r1.slot in
@@ -468,27 +469,29 @@ let translate (expr : expression) : result =
let project_rhs1 = project_p_slot "RHS1" rhs1.pexp_loc setup_r1.slot in
let project_rhs2 = project_p_slot "RHS2" rhs2.pexp_loc setup_r2.slot in
let project_rhs3 = project_p_slot "RHS3" rhs3.pexp_loc setup_r3.slot in
-            let proj_lazy = [%expr
-              lazy
-                (let p = Lazy.force projections.Tensor.projections in
-                 Ir.Indexing.
-                   {
-                     product_space = p.product_space;
-                     product_iterators = p.product_iterators;
-                     lhs_dims = [%e lhs_dims];
-                     rhs_dims = [| [%e rhs1_dims]; [%e rhs2_dims]; [%e rhs3_dims] |];
-                     project_lhs = [%e project_lhs];
-                     project_rhs = [| [%e project_rhs1]; [%e project_rhs2]; [%e project_rhs3] |];
-                     debug_info =
-                       {
-                         p.debug_info with
-                         trace =
-                           ( "ppx_cd " ^ [%e expr2string_or_empty accu_op] ^ " "
-                             ^ [%e expr2string_or_empty tern_op],
-                             Ir.Indexing.unique_debug_id () )
-                           :: p.debug_info.trace;
-                       };
-                   })] in
+            let proj_lazy =
+              [%expr
+                lazy
+                  (let p = Lazy.force projections.Tensor.projections in
+                   Ir.Indexing.
+                     {
+                       product_space = p.product_space;
+                       product_iterators = p.product_iterators;
+                       lhs_dims = [%e lhs_dims];
+                       rhs_dims = [| [%e rhs1_dims]; [%e rhs2_dims]; [%e rhs3_dims] |];
+                       project_lhs = [%e project_lhs];
+                       project_rhs = [| [%e project_rhs1]; [%e project_rhs2]; [%e project_rhs3] |];
+                       debug_info =
+                         {
+                           p.debug_info with
+                           trace =
+                             ( "ppx_cd " ^ [%e expr2string_or_empty accu_op] ^ " "
+                               ^ [%e expr2string_or_empty tern_op],
+                               Ir.Indexing.unique_debug_id () )
+                             :: p.debug_info.trace;
+                         };
+                     })]
+            in
(proj_lazy, [%expr projections.Tensor.projections_debug])
in
(* FIXME: might be better to treat missing [rhs1, rhs2, rhs3] as zeros or errors rather than
@@ -521,7 +524,8 @@ let translate (expr : expression) : result =
let initialize_neutral = if initialize_neutral then [%expr true] else [%expr false] in
let projections_lazy, projections_debug =
match projections with
-        | Some prjs -> ([%expr [%e prjs].Tensor.projections], [%expr [%e prjs].Tensor.projections_debug])
+        | Some prjs ->
+            ([%expr [%e prjs].Tensor.projections], [%expr [%e prjs].Tensor.projections_debug])
| None ->
let lhs_dims = project_p_dims "LHS" lhs.pexp_loc setup_l.slot in
let rhs1_dims = project_p_dims "RHS1" lhs.pexp_loc setup_r1.slot in
@@ -529,27 +533,29 @@ let translate (expr : expression) : result =
let project_lhs = project_p_slot "LHS" lhs.pexp_loc setup_l.slot in
let project_rhs1 = project_p_slot "RHS1" rhs1.pexp_loc setup_r1.slot in
let project_rhs2 = project_p_slot "RHS2" rhs2.pexp_loc setup_r2.slot in
-            let proj_lazy = [%expr
-              lazy
-                (let p = Lazy.force projections.Tensor.projections in
-                 Ir.Indexing.
-                   {
-                     product_space = p.product_space;
-                     product_iterators = p.product_iterators;
-                     lhs_dims = [%e lhs_dims];
-                     rhs_dims = [| [%e rhs1_dims]; [%e rhs2_dims] |];
-                     project_lhs = [%e project_lhs];
-                     project_rhs = [| [%e project_rhs1]; [%e project_rhs2] |];
-                     debug_info =
-                       {
-                         p.debug_info with
-                         trace =
-                           ( "ppx_cd " ^ [%e expr2string_or_empty accu_op] ^ " "
-                             ^ [%e expr2string_or_empty bin_op],
-                             Ir.Indexing.unique_debug_id () )
-                           :: p.debug_info.trace;
-                       };
-                   })] in
+            let proj_lazy =
+              [%expr
+                lazy
+                  (let p = Lazy.force projections.Tensor.projections in
+                   Ir.Indexing.
+                     {
+                       product_space = p.product_space;
+                       product_iterators = p.product_iterators;
+                       lhs_dims = [%e lhs_dims];
+                       rhs_dims = [| [%e rhs1_dims]; [%e rhs2_dims] |];
+                       project_lhs = [%e project_lhs];
+                       project_rhs = [| [%e project_rhs1]; [%e project_rhs2] |];
+                       debug_info =
+                         {
+                           p.debug_info with
+                           trace =
+                             ( "ppx_cd " ^ [%e expr2string_or_empty accu_op] ^ " "
+                               ^ [%e expr2string_or_empty bin_op],
+                               Ir.Indexing.unique_debug_id () )
+                             :: p.debug_info.trace;
+                         };
+                     })]
+            in
(proj_lazy, [%expr projections.Tensor.projections_debug])
in
(* TODO: might be better to treat missing [rhs1, rhs2] as zeros or errors rather than eliding
@@ -582,33 +588,36 @@ let translate (expr : expression) : result =
let initialize_neutral = if initialize_neutral then [%expr true] else [%expr false] in
let projections_lazy, projections_debug =
match projections with
-        | Some prjs -> ([%expr [%e prjs].Tensor.projections], [%expr [%e prjs].Tensor.projections_debug])
+        | Some prjs ->
+            ([%expr [%e prjs].Tensor.projections], [%expr [%e prjs].Tensor.projections_debug])
| None ->
let lhs_dims = project_p_dims "LHS" lhs.pexp_loc setup_l.slot in
let rhs1_dims = project_p_dims "RHS1" lhs.pexp_loc setup_r.slot in
let project_lhs = project_p_slot "LHS" lhs.pexp_loc setup_l.slot in
let project_rhs1 = project_p_slot "RHS1" rhs.pexp_loc setup_r.slot in
-            let proj_lazy = [%expr
-              lazy
-                (let p = Lazy.force projections.Tensor.projections in
-                 Ir.Indexing.
-                   {
-                     product_space = p.product_space;
-                     product_iterators = p.product_iterators;
-                     lhs_dims = [%e lhs_dims];
-                     rhs_dims = [| [%e rhs1_dims] |];
-                     project_lhs = [%e project_lhs];
-                     project_rhs = [| [%e project_rhs1] |];
-                     debug_info =
-                       {
-                         p.debug_info with
-                         trace =
-                           ( "ppx_cd " ^ [%e string_expr ~loc accu_op] ^ " "
-                             ^ [%e string_expr ~loc un_op],
-                             Ir.Indexing.unique_debug_id () )
-                           :: p.debug_info.trace;
-                       };
-                   })] in
+            let proj_lazy =
+              [%expr
+                lazy
+                  (let p = Lazy.force projections.Tensor.projections in
+                   Ir.Indexing.
+                     {
+                       product_space = p.product_space;
+                       product_iterators = p.product_iterators;
+                       lhs_dims = [%e lhs_dims];
+                       rhs_dims = [| [%e rhs1_dims] |];
+                       project_lhs = [%e project_lhs];
+                       project_rhs = [| [%e project_rhs1] |];
+                       debug_info =
+                         {
+                           p.debug_info with
+                           trace =
+                             ( "ppx_cd " ^ [%e string_expr ~loc accu_op] ^ " "
+                               ^ [%e string_expr ~loc un_op],
+                               Ir.Indexing.unique_debug_id () )
+                             :: p.debug_info.trace;
+                         };
+                     })]
+            in
(proj_lazy, [%expr projections.Tensor.projections_debug])
in
(* TODO: might be better to treat missing [rhs] as zeros or errors rather than eliding the
@@ -636,32 +645,35 @@ let translate (expr : expression) : result =
let setup_r = setup_array ~punned ~bad_pun_hints ~is_lhs:false @@ loop ~proj_in_scope rhs in
let projections_lazy, projections_debug =
match projections with
-        | Some prjs -> ([%expr [%e prjs].Tensor.projections], [%expr [%e prjs].Tensor.projections_debug])
+        | Some prjs ->
+            ([%expr [%e prjs].Tensor.projections], [%expr [%e prjs].Tensor.projections_debug])
| None ->
let lhs_dims = project_p_dims "LHS" lhs.pexp_loc setup_l.slot in
let rhs1_dims = project_p_dims "RHS1" lhs.pexp_loc setup_r.slot in
let project_lhs = project_p_slot "LHS" lhs.pexp_loc setup_l.slot in
let project_rhs1 = project_p_slot "RHS1" rhs.pexp_loc setup_r.slot in
-            let proj_lazy = [%expr
-              lazy
-                (let p = Lazy.force projections.Tensor.projections in
-                 Ir.Indexing.
-                   {
-                     product_space = p.product_space;
-                     product_iterators = p.product_iterators;
-                     lhs_dims = [%e lhs_dims];
-                     rhs_dims = [| [%e rhs1_dims] |];
-                     project_lhs = [%e project_lhs];
-                     project_rhs = [| [%e project_rhs1] |];
-                     debug_info =
-                       {
-                         p.debug_info with
-                         trace =
-                           ( "ppx_cd vec " ^ [%e string_expr ~loc vec_un_op],
-                             Ir.Indexing.unique_debug_id () )
-                           :: p.debug_info.trace;
-                       };
-                   })] in
+            let proj_lazy =
+              [%expr
+                lazy
+                  (let p = Lazy.force projections.Tensor.projections in
+                   Ir.Indexing.
+                     {
+                       product_space = p.product_space;
+                       product_iterators = p.product_iterators;
+                       lhs_dims = [%e lhs_dims];
+                       rhs_dims = [| [%e rhs1_dims] |];
+                       project_lhs = [%e project_lhs];
+                       project_rhs = [| [%e project_rhs1] |];
+                       debug_info =
+                         {
+                           p.debug_info with
+                           trace =
+                             ( "ppx_cd vec " ^ [%e string_expr ~loc vec_un_op],
+                               Ir.Indexing.unique_debug_id () )
+                             :: p.debug_info.trace;
+                         };
+                     })]
+            in
(proj_lazy, [%expr projections.Tensor.projections_debug])
in
let body =
@@ -669,7 +681,13 @@ let translate (expr : expression) : result =
Option.value ~default:Ir.Assignments.Noop
@@ Option.map2 [%e setup_l.array_opt] [%e setup_r.array_opt] ~f:(fun lhs rhs ->
Ir.Assignments.Set_vec_unop
-                   { lhs; op = [%e op]; rhs; projections = [%e projections_lazy]; projections_debug = [%e projections_debug] })]
+                   {
+                     lhs;
+                     op = [%e op];
+                     rhs;
+                     projections = [%e projections_lazy];
+                     projections_debug = [%e projections_debug];
+                   })]
in
assignment ~punned ~lhs:setup_l ~rhses:[ setup_r ] body
in
@@ -1208,7 +1226,9 @@ let translate (expr : expression) : result =
let res1 = loop ~proj_in_scope expr1 in
let res2 = loop ~proj_in_scope expr2 in
let res3 = loop ~proj_in_scope expr3 in
-        let slot = List.hd_exn @@ List.sort [ res1.slot; res2.slot; res3.slot ] ~compare:compare_slots in
+        let slot =
+          List.hd_exn @@ List.sort [ res1.slot; res2.slot; res3.slot ] ~compare:compare_slots
+        in
{
vbs = reduce_vbss [ res1.vbs; res2.vbs; res3.vbs ];
typ = res1.typ;
File "arrayjit/lib/c_syntax.ml", line 1, characters 0-0:
diff --git a/_build/default/arrayjit/lib/c_syntax.ml b/_build/default/arrayjit/lib/.formatted/c_syntax.ml
index 2242153..1897e29 100644
--- a/_build/default/arrayjit/lib/c_syntax.ml
+++ b/_build/default/arrayjit/lib/.formatted/c_syntax.ml
@@ -941,21 +941,32 @@ module C_syntax (B : C_syntax_config) = struct
let ident_doc = string (get_ident tn) in
let num_elems = Tn.num_elems tn in
let size_doc = OCaml.int num_elems in
-               (* Use heap allocation for arrays larger than 16KB to avoid stack overflow in Domain threads *)
+               (* Use heap allocation for arrays larger than 16KB to avoid stack overflow in Domain
+                  threads *)
let stack_threshold = 16384 / (Ops.prec_in_bytes @@ Lazy.force tn.prec) in
if num_elems > stack_threshold then (
(* Heap allocation for large arrays *)
heap_allocated := get_ident tn :: !heap_allocated;
-                 let alloc_expr =
+                 let alloc_expr =
if node.Low_level.zero_initialized then
-                     string "calloc" ^^ parens (OCaml.int num_elems ^^ comma ^^ space ^^ string "sizeof" ^^ parens typ_doc)
-                   else
-                     string "malloc" ^^ parens (OCaml.int num_elems ^^ space ^^ string "*" ^^ space ^^ string "sizeof" ^^ parens typ_doc)
+                     string "calloc"
+                     ^^ parens
+                          (OCaml.int num_elems ^^ comma ^^ space ^^ string "sizeof"
+                         ^^ parens typ_doc)
+                   else
+                     string "malloc"
+                     ^^ parens
+                          (OCaml.int num_elems ^^ space ^^ string "*" ^^ space ^^ string "sizeof"
+                         ^^ parens typ_doc)
in
-                 typ_doc ^^ space ^^ string "*" ^^ ident_doc ^^ space ^^ equals ^^ space ^^ parens (typ_doc ^^ string "*") ^^ alloc_expr ^^ semi ^^ hardline)
+                 typ_doc ^^ space ^^ string "*" ^^ ident_doc ^^ space ^^ equals ^^ space
+                 ^^ parens (typ_doc ^^ string "*")
+                 ^^ alloc_expr ^^ semi ^^ hardline)
else
(* Stack allocation for small arrays *)
-                 let init_doc = if node.Low_level.zero_initialized then string " = {0}" else empty in
+                 let init_doc =
+                   if node.Low_level.zero_initialized then string " = {0}" else empty
+                 in
typ_doc ^^ space ^^ ident_doc ^^ brackets size_doc ^^ init_doc ^^ semi ^^ hardline
else empty)
(Hashtbl.to_alist traced_store)
@@ -969,7 +980,8 @@ module C_syntax (B : C_syntax_config) = struct
if not (List.is_empty !heap_allocated) then
body :=
!body ^^ hardline
-        ^^ string "/* Cleanup heap-allocated arrays. */" ^^ hardline
+        ^^ string "/* Cleanup heap-allocated arrays. */"
+        ^^ hardline
^^ separate_map hardline
(fun ident -> string "free" ^^ parens (string ident) ^^ semi)
!heap_allocated
File "lib/tensor.ml", line 1, characters 0-0:
diff --git a/_build/default/lib/tensor.ml b/_build/default/lib/.formatted/tensor.ml
index 133bc1e..8e4e0de 100644
--- a/_build/default/lib/tensor.ml
+++ b/_build/default/lib/.formatted/tensor.ml
@@ -11,10 +11,7 @@ type tn_set = Set.M(Tn).t
type asgns = Asgns.t
type comp = Asgns.comp
type fetch_op = Asgns.fetch_op
-type projections = {
-  projections_debug : string;
-  projections : Ir.Indexing.projections Lazy.t;
-}
+type projections = { projections_debug : string; projections : Ir.Indexing.projections Lazy.t }


let _get_local_debug_runtime = Utils.get_local_debug_runtime


@@ -165,16 +162,23 @@ let raw_binop ~initialize_neutral ~accum ~(t : t) ~(lhs_is_grad : bool) ~op ~(t1
let local_shape_update = Shape.{ shape; logic = shape_logic; id = get_update_id () } in
Shape.propagate_shapes local_shape_update;
let projections_debug = Shape.logic_to_spec shape_logic in
-  let projections = {
-    projections_debug;
-    projections = lazy (Shape.derive_projections local_shape_update);
-  } in
+  let projections =
+    { projections_debug; projections = lazy (Shape.derive_projections local_shape_update) }
+  in
let lhs = if lhs_is_grad then (Option.value_exn ~here:[%here] t.diff).grad else t.value in
let rhs1 = if rhs1_is_grad then (Option.value_exn ~here:[%here] t1.diff).grad else t1.value in
let rhs1 = if rhs1_is_merge then Asgns.Merge_buffer rhs1 else Node rhs1 in
let rhs2 = if rhs2_is_grad then (Option.value_exn ~here:[%here] t2.diff).grad else t2.value in
let rhs2 = if rhs2_is_merge then Asgns.Merge_buffer rhs2 else Node rhs2 in
-  Asgns.Accum_op { initialize_neutral; accum; lhs; rhs = Binop { op; rhs1; rhs2 }; projections = projections.projections; projections_debug = projections.projections_debug }
+  Asgns.Accum_op
+    {
+      initialize_neutral;
+      accum;
+      lhs;
+      rhs = Binop { op; rhs1; rhs2 };
+      projections = projections.projections;
+      projections_debug = projections.projections_debug;
+    }


let raw_ternop ~initialize_neutral ~accum ~(t : t) ~(lhs_is_grad : bool) ~op ~(t1 : t)
~(rhs1_is_grad : bool) ~(rhs1_is_merge : bool) ~(t2 : t) ~rhs2_is_grad ~rhs2_is_merge ~(t3 : t)
@@ -184,10 +188,9 @@ let raw_ternop ~initialize_neutral ~accum ~(t : t) ~(lhs_is_grad : bool) ~op ~(t
let local_shape_update = Shape.{ shape; logic = shape_logic; id = get_update_id () } in
Shape.propagate_shapes local_shape_update;
let projections_debug = Shape.logic_to_spec shape_logic in
-  let projections = {
-    projections_debug;
-    projections = lazy (Shape.derive_projections local_shape_update);
-  } in
+  let projections =
+    { projections_debug; projections = lazy (Shape.derive_projections local_shape_update) }
+  in
let lhs = if lhs_is_grad then (Option.value_exn ~here:[%here] t.diff).grad else t.value in
let rhs1 = if rhs1_is_grad then (Option.value_exn ~here:[%here] t1.diff).grad else t1.value in
let rhs1 = if rhs1_is_merge then Asgns.Merge_buffer rhs1 else Node rhs1 in
@@ -195,7 +198,15 @@ let raw_ternop ~initialize_neutral ~accum ~(t : t) ~(lhs_is_grad : bool) ~op ~(t
let rhs2 = if rhs2_is_merge then Asgns.Merge_buffer rhs2 else Node rhs2 in
let rhs3 = if rhs3_is_grad then (Option.value_exn ~here:[%here] t3.diff).grad else t3.value in
let rhs3 = if rhs3_is_merge then Asgns.Merge_buffer rhs3 else Node rhs3 in
-  Asgns.Accum_op { initialize_neutral; accum; lhs; rhs = Ternop { op; rhs1; rhs2; rhs3 }; projections = projections.projections; projections_debug = projections.projections_debug }
+  Asgns.Accum_op
+    {
+      initialize_neutral;
+      accum;
+      lhs;
+      rhs = Ternop { op; rhs1; rhs2; rhs3 };
+      projections = projections.projections;
+      projections_debug = projections.projections_debug;
+    }


let raw_unop ~initialize_neutral ~accum ~(t : t) ~(lhs_is_grad : bool) ~op ~(t1 : t)
~(rhs_is_grad : bool) ~(rhs_is_merge : bool) ~logic =
@@ -204,14 +215,21 @@ let raw_unop ~initialize_neutral ~accum ~(t : t) ~(lhs_is_grad : bool) ~op ~(t1
let local_shape_update = Shape.{ shape; logic = shape_logic; id = get_update_id () } in
Shape.propagate_shapes local_shape_update;
let projections_debug = Shape.logic_to_spec shape_logic in
-  let projections = {
-    projections_debug;
-    projections = lazy (Shape.derive_projections local_shape_update);
-  } in
+  let projections =
+    { projections_debug; projections = lazy (Shape.derive_projections local_shape_update) }
+  in
let lhs = if lhs_is_grad then (Option.value_exn ~here:[%here] t.diff).grad else t.value in
let rhs = if rhs_is_grad then (Option.value_exn ~here:[%here] t1.diff).grad else t1.value in
let rhs = if rhs_is_merge then Asgns.Merge_buffer rhs else Node rhs in
-  Asgns.Accum_op { initialize_neutral; accum; lhs; rhs = Unop { op; rhs }; projections = projections.projections; projections_debug = projections.projections_debug }
+  Asgns.Accum_op
+    {
+      initialize_neutral;
+      accum;
+      lhs;
+      rhs = Unop { op; rhs };
+      projections = projections.projections;
+      projections_debug = projections.projections_debug;
+    }


type grad_spec = Require_grad | Prohibit_grad | If_needed [@@deriving sexp, equal, variants]


@@ -281,10 +299,9 @@ let%track7_sexp op ~(label : string list) ?(ternary_op = Shape.Pointwise_tern)
List.iter ~f:Shape.propagate_shapes local_shape_updates;
let shape_update = List.hd_exn local_shape_updates in
let projections_debug = Shape.logic_to_spec shape_update.logic in
-  let projections = {
-    projections_debug;
-    projections = lazy (Shape.derive_projections shape_update);
-  } in
+  let projections =
+    { projections_debug; projections = lazy (Shape.derive_projections shape_update) }
+  in
let embedded_nodes = ref @@ Set.singleton (module Tn) v in
let children =
List.folding_map orig_ts
dune build @fmt failed
"/usr/bin/env" "bash" "-c" "opam exec -- dune build @fmt --ignore-promoted-rules || (echo "dune build @fmt failed"; exit 2)" failed with exit status 2
2025-08-07 10:12.35: Job failed: Failed: Build failed