Organisationsahrefsocannl789d7b ()(lint-fmt)

(lint-fmt)

Link Copied
Code Copied

Logs

2025-07-23 21:11.52: New job: test ahrefs/ocannl https://github.com/ahrefs/ocannl.git#refs/heads/master (789d7b57816ed78f0803e5303de254ad41f3d77e) (linux-x86_64:(lint-fmt))
Base: ocaml/opam:debian-12-ocaml-4.08@sha256:4b3e5b2d1be26cada6c08f752ca0b48d3b0ba20fec23648d53395a83f1ae2517
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 789d7b57
cat > Dockerfile <<'END-OF-DOCKERFILE'
FROM ocaml/opam:debian-12-ocaml-4.08@sha256:4b3e5b2d1be26cada6c08f752ca0b48d3b0ba20fec23648d53395a83f1ae2517
USER 1000:1000
RUN cd ~/opam-repository && (git cat-file -e 0eea63ad71af2b1116c556023bedc6bf083e6125 || git fetch origin master) && git reset -q --hard 0eea63ad71af2b1116c556023bedc6bf083e6125 && 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-07-23 21:11.52: Using cache hint "ahrefs/ocannl-ocaml/opam:debian-12-ocaml-4.08@sha256:4b3e5b2d1be26cada6c08f752ca0b48d3b0ba20fec23648d53395a83f1ae2517-debian-12-4.08_opam-2.3-ocamlformat-0eea63ad71af2b1116c556023bedc6bf083e6125"
2025-07-23 21:11.52: Using OBuilder spec:
((from ocaml/opam:debian-12-ocaml-4.08@sha256:4b3e5b2d1be26cada6c08f752ca0b48d3b0ba20fec23648d53395a83f1ae2517)
(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 0eea63ad71af2b1116c556023bedc6bf083e6125 || git fetch origin master) && git reset -q --hard 0eea63ad71af2b1116c556023bedc6bf083e6125 && 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-07-23 21:11.52: Waiting for resource in pool OCluster
2025-07-23 21:11.52: Waiting for worker…
2025-07-23 21:15.30: Got resource from pool OCluster
Building on toxis.caelum.ci.dev
HEAD is now at fd6b02dc Random seed support
HEAD is now at 789d7b57 Merge pull request #331 from ahrefs:threefry4x32


(from ocaml/opam:debian-12-ocaml-4.08@sha256:4b3e5b2d1be26cada6c08f752ca0b48d3b0ba20fec23648d53395a83f1ae2517)
2025-07-23 21:16.06 ---> saved as "6cffc1a1a52caf2843bd473effea9756e568737c821ae9874d1cb7264a14fd20"


/: (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 0eea63ad71af2b1116c556023bedc6bf083e6125 || git fetch origin master) && git reset -q --hard 0eea63ad71af2b1116c556023bedc6bf083e6125 && git log --no-decorate -n1 --oneline && opam update -u"))
0eea63ad71 Merge pull request #27946 from mtelvers/opam-publish-ocaml-version.4.0.1


<><> 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-07-23 21:18.25 ---> saved as "302b09a07f3e63cf843954026241e2145dcd9d48aa46e6f73f5e6c2a8313c3c9"


/: (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-07-23 21:19.57 ---> saved as "cea7a1b4577ed221adf5a742377b6f150ff7832adb27838f80bf4faa7e02e12f"


/: (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 cmdliner          1.3.0    [required by ocamlformat]
- install menhirLib         20240715 [required by ocamlformat-lib]
- install menhirCST         20240715 [required by menhir]
- install ocamlbuild        0.16.1   [required by fpath, astring, uuseg]
- install dune-build-info   3.19.1   [required by ocamlformat-lib]
- install menhirSdk         20240715 [required by ocamlformat-lib]
- install either            1.0.0    [required by ocamlformat-lib]
- install ocaml-version     4.0.1    [required by ocamlformat-lib]
- install camlp-streams     5.0.1    [required by ocamlformat-lib]
- install csexp             1.5.2    [required by ocamlformat]
- install seq               base     [required by re]
- install fix               20250428 [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.0.8    [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.0.8] 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 cmdliner.1.3.0
-> installed menhirCST.20240715
-> installed menhirLib.20240715
-> installed menhirSdk.20240715
-> 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 ocamlbuild.0.16.1
-> installed ocp-indent.1.8.1
-> installed base.v0.14.3
-> installed topkg.1.0.8
-> installed stdio.v0.14.0
-> installed uutf.1.0.4
-> installed menhir.20240715
-> installed astring.0.8.5
-> installed fpath.0.7.3
-> 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-07-23 21:22.25 ---> saved as "77996898021cad247d81d8eceeba4066a697607f4a9fdc67bee5a3313579cd44"


/src: (copy (src .) (dst /src/))
2025-07-23 21:22.26 ---> saved as "cb0fd37960cc88f1e2839a0e6b500ae4c76fddfa0ff76667fe1cea9e0810f3e5"


/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 "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 "arrayjit/lib/backend_impl.ml", line 1, characters 0-0:
diff --git a/_build/default/arrayjit/lib/backend_impl.ml b/_build/default/arrayjit/lib/.formatted/backend_impl.ml
index 933a900..8ca2891 100644
--- a/_build/default/arrayjit/lib/backend_impl.ml
+++ b/_build/default/arrayjit/lib/.formatted/backend_impl.ml
@@ -50,9 +50,7 @@ module No_device_buffer_and_copying () :


let%track7_sexp alloc_zero_init_array (prec : Ops.prec) ~(dims : int array) (() : unit) :
buffer_ptr =
-    let size_in_bytes =
-      (Array.fold dims ~init:1 ~f:( * )) * Ops.prec_in_bytes prec
-    in
+    let size_in_bytes = Array.fold dims ~init:1 ~f:( * ) * Ops.prec_in_bytes prec in
alloc_impl ~size_in_bytes


let%track7_sexp alloc_buffer ?(old_buffer : buffer_ptr Backend_intf.buffer option)
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 dd1372a..150b1ea 100644
--- a/_build/default/arrayjit/lib/assignments.ml
+++ b/_build/default/arrayjit/lib/.formatted/assignments.ml
@@ -159,19 +159,21 @@ let%diagn2_sexp to_low_level code =
let open Indexing in
let get buffer idcs =
let tn = match buffer with Node tn -> tn | Merge_buffer tn -> tn in
-    let idcs = (match (idcs, Lazy.force tn.Tn.dims) with
-    | [||], [|1|] -> [| Fixed_idx 0 |]
-    | [| Fixed_idx 0 |], [||] -> idcs
-    | idcs, dims when Array.length idcs = Array.length dims -> idcs
-    | _ ->
-        [%log
-          "get a=",
-          (tn : Tn.t),
-          ":",
-          Tn.label tn,
-          (idcs : Indexing.axis_index array),
-          (Lazy.force tn.dims : int array)];
-        assert false) in
+    let idcs =
+      match (idcs, Lazy.force tn.Tn.dims) with
+      | [||], [| 1 |] -> [| Fixed_idx 0 |]
+      | [| Fixed_idx 0 |], [||] -> idcs
+      | idcs, dims when Array.length idcs = Array.length dims -> idcs
+      | _ ->
+          [%log
+            "get a=",
+            (tn : Tn.t),
+            ":",
+            Tn.label tn,
+            (idcs : Indexing.axis_index array),
+            (Lazy.force tn.dims : int array)];
+          assert false
+    in
match buffer with
| Node tn -> Low_level.Get (tn, idcs)
| Merge_buffer tn ->
File "arrayjit/lib/cc_backend.ml", line 1, characters 0-0:
diff --git a/_build/default/arrayjit/lib/cc_backend.ml b/_build/default/arrayjit/lib/.formatted/cc_backend.ml
index e28fd39..8e6d053 100644
--- a/_build/default/arrayjit/lib/cc_backend.ml
+++ b/_build/default/arrayjit/lib/.formatted/cc_backend.ml
@@ -13,7 +13,8 @@ open Backend_intf
let name = "cc"


(* Header declarations for arrayjit builtins *)
-let arrayjit_builtins_header = {|
+let arrayjit_builtins_header =
+  {|
/* ArrayJIT builtins declarations */
#include <stdint.h>


@@ -103,15 +104,15 @@ let%track7_sexp c_compile_and_load ~f_name =
let libname = base_name ^ "_run_id_" ^ run_id ^ if Sys.win32 then ".dll" else ".so" in
(try Stdlib.Sys.remove log_fname with _ -> ());
(try Stdlib.Sys.remove libname with _ -> ());
-  let kernel_link_flags =
+  let kernel_link_flags =
match Sys.os_type with
-    | "Unix" ->
+    | "Unix" ->
if Stdlib.Sys.command "uname -s | grep -q Darwin" = 0 then
"-bundle -undefined dynamic_lookup"
-        else
-          "-shared -fPIC"
+        else "-shared -fPIC"
| "Win32" | "Cygwin" -> "-shared"
-    | _ -> "-shared -fPIC" in
+    | _ -> "-shared -fPIC"
+  in
let cmdline : string =
Printf.sprintf "%s %s -O%d -o %s %s >> %s 2>&1" (compiler_command ()) f_name
(optimization_level ()) libname kernel_link_flags log_fname
File "bin/einsum_trivia.ml", line 1, characters 0-0:
diff --git a/_build/default/bin/einsum_trivia.ml b/_build/default/bin/.formatted/einsum_trivia.ml
index e71ad80..41db8f1 100644
--- a/_build/default/bin/einsum_trivia.ml
+++ b/_build/default/bin/.formatted/einsum_trivia.ml
@@ -25,11 +25,10 @@ let _suspended () =
and type event = Backend.event
and type optimize_ctx = Backend.optimize_ctx)
in
-
-
+
let hey = TDSL.range_of_shape ~batch_dims:[ 2 ] ~input_dims:[ 3 ] ~output_dims:[ 4 ] () in
let%op _ho = hey ++ "b|i->o => o|b->i" in
-
+
let hey2 =
TDSL.range_of_shape ~batch_dims:[ 2; 3 ] ~input_dims:[ 4; 5 ] ~output_dims:[ 6; 7 ] ()
in
@@ -48,8 +47,7 @@ let () =
and type event = Backend.event
and type optimize_ctx = Backend.optimize_ctx)
in
-
-
+
let a = TDSL.range_of_shape ~batch_dims:[ 2 ] ~input_dims:[ 3 ] ~output_dims:[ 4 ] () in
let b = TDSL.range_of_shape ~batch_dims:[ 2 ] ~input_dims:[ 4 ] ~output_dims:[ 5 ] () in
let%op _ = a *+ "b|i->o; b|i->o => b|i->o" a in
File "bin/hello_world.ml", line 1, characters 0-0:
diff --git a/_build/default/bin/hello_world.ml b/_build/default/bin/.formatted/hello_world.ml
index 8dcf924..2973452 100644
--- a/_build/default/bin/hello_world.ml
+++ b/_build/default/bin/.formatted/hello_world.ml
@@ -10,8 +10,6 @@ module type Backend = Ir.Backend_intf.Backend


let hello1 () =
let module Backend = (val Backends.fresh_backend ()) in
-
-
let open Operation.TDSL in
(* Hey is inferred to be a matrix. *)
let hey = range_of_shape ~batch_dims:[ 7 ] ~input_dims:[ 9; 10; 11 ] ~output_dims:[ 13; 14 ] () in
@@ -24,8 +22,6 @@ let hello1 () =


let hello2 () =
let module Backend = (val Backends.fresh_backend ()) in
-
-
(* Hey is inferred to be a matrix. *)
let%op y = ("hey" * 'q' 2.0) + 'p' 1.0 in
(* Punning for ["hey"] above introduced the [hey] identifier. *)
@@ -36,8 +32,6 @@ let hello2 () =


let hello3 () =
let module Backend = (val Backends.fresh_backend ()) in
-
-
(* Hey is inferred to be a matrix. *)
let hey = TDSL.param "hey" in
let zero_to_twenty = TDSL.range 20 in
@@ -63,8 +57,7 @@ let hello4 () =
and type event = Backend.event
and type optimize_ctx = Backend.optimize_ctx)
in
-
-
+
let ri = TDSL.range 3 in
let%op ti = ri ++ "i=>i0" in
(* Write position 2 of ti, otherwise shape inference concludes it's dim-1 and broadcasted. *)
@@ -95,8 +88,7 @@ let hello5 () =
and type event = Backend.event
and type optimize_ctx = Backend.optimize_ctx)
in
-
-
+
let hey = TDSL.range_of_shape ~batch_dims:[ 2 ] ~input_dims:[ 3 ] ~output_dims:[ 4 ] () in
let%op ho = hey ++ "...|1->... => ...|..." in
ignore (Train.forward_once backend ho);
@@ -112,8 +104,7 @@ let hello6 () =
and type event = Backend.event
and type optimize_ctx = Backend.optimize_ctx)
in
-
-
+
(* "Hey" is inferred to be a scalar. *)
let%op y = 2 *. "hey" in
ignore (Train.forward_once backend y);
File "bin/micrograd_demo_logging.ml", line 1, characters 0-0:
diff --git a/_build/default/bin/micrograd_demo_logging.ml b/_build/default/bin/.formatted/micrograd_demo_logging.ml
index 491ee09..26a32de 100644
--- a/_build/default/bin/micrograd_demo_logging.ml
+++ b/_build/default/bin/.formatted/micrograd_demo_logging.ml
@@ -33,8 +33,6 @@ let () =
let _suspended () =
Tensor.unsafe_reinitialize ();
let module Backend = (val Backends.fresh_backend ()) in
-
-
let%op c = "a" [ -4 ] + "b" [ 2 ] in
let%op d = (a *. b) + (b **. 3) in
let%op c = c + c + 1 in
File "bin/micrograd_demo.ml", line 1, characters 0-0:
diff --git a/_build/default/bin/micrograd_demo.ml b/_build/default/bin/.formatted/micrograd_demo.ml
index 1da5078..03fea8a 100644
--- a/_build/default/bin/micrograd_demo.ml
+++ b/_build/default/bin/.formatted/micrograd_demo.ml
@@ -68,9 +68,9 @@ let experiment seed ~no_batch_shape_inference ~use_builtin_weight_decay () =
let module Backend = (val Backends.fresh_backend ~backend_name:"multicore_cc" ()) in
let ctx = Train.init_params (module Backend) ~hosted:true IDX.empty scalar_loss in
let routine = Train.to_routine (module Backend) ctx bindings (Asgns.sequence [ update; sgd ]) in
-  (* Stdio.print_endline "\n******** scalar_loss **********"; Train.printf_tree ~with_grad:false ~depth:9 scalar_loss; Stdio.print_endline "\n******** learning_rate
-     **********"; Train.printf_tree ~with_grad:false ~depth:9 learning_rate;
-     Stdio.printf "\n********\n%!"; *)
+  (* Stdio.print_endline "\n******** scalar_loss **********"; Train.printf_tree ~with_grad:false
+     ~depth:9 scalar_loss; Stdio.print_endline "\n******** learning_rate **********";
+     Train.printf_tree ~with_grad:false ~depth:9 learning_rate; Stdio.printf "\n********\n%!"; *)
let open Operation.At in
let epoch_loss = ref 0. in
let step_ref = IDX.find_exn routine.bindings step_n in
File "bin/hello_world_op.ml", line 1, characters 0-0:
diff --git a/_build/default/bin/hello_world_op.ml b/_build/default/bin/.formatted/hello_world_op.ml
index 064c122..fc296a6 100644
--- a/_build/default/bin/hello_world_op.ml
+++ b/_build/default/bin/.formatted/hello_world_op.ml
@@ -23,8 +23,7 @@ let%track2_sexp _Pointwise_multiplication_dims_1 (() : unit) : unit =
and type event = Backend.event
and type optimize_ctx = Backend.optimize_ctx)
in
-
-
+
(* "Hey" is inferred to be a scalar. *)
let%op ya = 2 *. "hey" 7.0 in
ignore (Train.forward_once backend ya);
@@ -41,8 +40,7 @@ let%track2_sexp _Matrix_multiplication_dims_1x1 (() : unit) : unit =
and type event = Backend.event
and type optimize_ctx = Backend.optimize_ctx)
in
-
-
+
(* Hey is inferred to be a matrix because of matrix multiplication [*]. *)
let%op yb = ("hey" 7.0 * 'q' 2.0) + 'p' 1.0 in
ignore (Train.forward_once backend yb);
@@ -60,7 +58,7 @@ let%track2_sexp _Print_constant_tensor_too_early (() : unit) : unit =
Tensor.print ~here:[%here] ~with_code:false ~with_grad:false `Inline a;
Tensor.print ~here:[%here] ~with_code:false ~with_grad:false `Inline b;
let%op c = a *. b in
-
+
ignore (Train.forward_once (module Backend) c);
Train.printf ~here:[%here] c


@@ -75,8 +73,7 @@ let%track2_sexp _Print_constant_tensor (() : unit) : unit =
and type event = Backend.event
and type optimize_ctx = Backend.optimize_ctx)
in
-
-
+
let%op hey = [ (1, 2, 3); (4, 5, 6) ] in
ignore (Train.forward_once backend hey);
Train.printf ~here:[%here] ~with_code:false ~with_grad:false @@ hey;
@@ -171,8 +168,7 @@ let%track2_sexp _Matrix_multiplication_dims_2x3 (() : unit) : unit =
and type event = Backend.event
and type optimize_ctx = Backend.optimize_ctx)
in
-
-
+
(* Hey is inferred to be a matrix. *)
let%op yc = ("hey" 7.0 * [ 2; 3 ]) + [ 4; 5; 6 ] in
ignore (Train.forward_once backend yc);
@@ -190,8 +186,7 @@ let%track2_sexp _Big_matrix (() : unit) : unit =
and type event = Backend.event
and type optimize_ctx = Backend.optimize_ctx)
in
-
-
+
(* Hey is inferred to be a matrix. *)
let hey = TDSL.param ~value:0.5 "hey" in
let zero_to_twenty = TDSL.range 20 in
@@ -211,8 +206,7 @@ let%track2_sexp _Very_big_tensor (() : unit) : unit =
and type event = Backend.event
and type optimize_ctx = Backend.optimize_ctx)
in
-
-
+
let hey = TDSL.range_of_shape ~batch_dims:[ 6 ] ~input_dims:[ 7; 8 ] ~output_dims:[ 9 ] () in
let%op ye = (hey * (1 + 1)) - 10 in
ignore (Train.forward_once backend ye);
File "arrayjit/lib/ops.ml", line 1, characters 0-0:
diff --git a/_build/default/arrayjit/lib/ops.ml b/_build/default/arrayjit/lib/.formatted/ops.ml
index 340291a..7f561ca 100644
--- a/_build/default/arrayjit/lib/ops.ml
+++ b/_build/default/arrayjit/lib/.formatted/ops.ml
@@ -675,7 +675,7 @@ external single_to_fp8 : float -> int = "arrayjit_single_to_fp8"
external copy_with_padding_c :
('a, 'b, Bigarray.c_layout) Bigarray.Genarray.t ->
('a, 'b, Bigarray.c_layout) Bigarray.Genarray.t ->
-    axis_padding array ->
+  axis_padding array ->
unit = "arrayjit_copy_with_padding"


external threefry4x32 : int array -> int array -> int array = "arrayjit_threefry4x32_ocaml"
File "arrayjit/lib/metal_backend.ml", line 1, characters 0-0:
diff --git a/_build/default/arrayjit/lib/metal_backend.ml b/_build/default/arrayjit/lib/.formatted/metal_backend.ml
index 6789551..c046a58 100644
--- a/_build/default/arrayjit/lib/metal_backend.ml
+++ b/_build/default/arrayjit/lib/.formatted/metal_backend.ml
@@ -556,9 +556,11 @@ end) : Ir.Backend_impl.Lowered_backend = struct
| Tanh_approx, _ -> func_doc "tanh"
| Not, _ -> fun v -> string "!" ^^ v
| Uint4x32_to_prec_uniform, _ ->
-          let conv_func = match prec with
+          let conv_func =
+            match prec with
| Ops.Single_prec _ -> "uint4x32_to_single_uniform"
-            | Double_prec _ -> "uint4x32_to_double_uniform" (* Metal doesn't support double, but function exists *)
+            | Double_prec _ ->
+                "uint4x32_to_double_uniform" (* Metal doesn't support double, but function exists *)
| Half_prec _ -> "uint4x32_to_fp16_uniform"
| Bfloat16_prec _ -> "uint4x32_to_bf16_uniform"
| Byte_prec _ -> "uint4x32_to_u8_uniform"
File "arrayjit/lib/cuda_backend.ml", line 1, characters 0-0:
diff --git a/_build/default/arrayjit/lib/cuda_backend.ml b/_build/default/arrayjit/lib/.formatted/cuda_backend.ml
index a6d1765..e394fc0 100644
--- a/_build/default/arrayjit/lib/cuda_backend.ml
+++ b/_build/default/arrayjit/lib/.formatted/cuda_backend.ml
@@ -480,13 +480,16 @@ end) : Ir.Backend_impl.Lowered_backend = struct
| Tanh_approx, _ -> func "tanh"
| Not, _ -> f "(" " == 0.0 ? 1.0 : 0.0)"
| Uint4x32_to_prec_uniform, _ ->
-          let conv_func = match prec with
+          let conv_func =
+            match prec with
| Ops.Single_prec _ -> "uint4x32_to_single_uniform"
| Double_prec _ -> "uint4x32_to_double_uniform"
| Half_prec _ -> "uint4x32_to_fp16_uniform"
| Bfloat16_prec _ -> "uint4x32_to_bf16_uniform"
| Byte_prec _ -> "uint4x32_to_u8_uniform"
-            | Uint16_prec _ -> "uint4x32_to_u32_uniform" (* Should probably be u16, but using u32 for 16-bit unsigned *)
+            | Uint16_prec _ ->
+                "uint4x32_to_u32_uniform"
+                (* Should probably be u16, but using u32 for 16-bit unsigned *)
| Int32_prec _ -> "uint4x32_to_i32_uniform"
| _ -> "/* unsupported conversion from uint4x32 */ 0"
in
@@ -564,12 +567,15 @@ end) : Ir.Backend_impl.Lowered_backend = struct
let idx_params = Indexing.bound_symbols bindings in
let b = Buffer.create 4096 in
(* Read and prepend the CUDA builtins file *)
-    let builtins_path = Stdlib.Filename.concat (Stdlib.Filename.dirname __FILE__) "arrayjit_builtins.cu" in
+    let builtins_path =
+      Stdlib.Filename.concat (Stdlib.Filename.dirname __FILE__) "arrayjit_builtins.cu"
+    in
(try
let builtins_content = Stdio.In_channel.read_all builtins_path in
Buffer.add_string b builtins_content;
Buffer.add_string b "\n\n"
-     with _ -> ()); (* Silently skip if file not found *)
+     with _ -> ());
+    (* Silently skip if file not found *)
let declarations_doc = Syntax.print_declarations () in
let params_and_docs =
Array.map2_exn names lowereds
File "arrayjit/lib/gcc_backend.ml", line 1, characters 0-0:
diff --git a/_build/default/arrayjit/lib/gcc_backend.ml b/_build/default/arrayjit/lib/.formatted/gcc_backend.ml
index 6a52b3c..053cda9 100644
--- a/_build/default/arrayjit/lib/gcc_backend.ml
+++ b/_build/default/arrayjit/lib/.formatted/gcc_backend.ml
@@ -316,7 +316,8 @@ let compile_main ~name ~log_functions ~env { ctx; nodes; get_ident; merge_node;
| Or, _ -> RValue.binary_op ctx Logical_or num_typ v1 v2
| And, _ -> RValue.binary_op ctx Logical_and num_typ v1 v2
| Threefry4x32, _ ->
-        (* FIXME: GCC backend doesn't support Threefry4x32 yet - would need external function linkage *)
+        (* FIXME: GCC backend doesn't support Threefry4x32 yet - would need external function
+           linkage *)
raise @@ Utils.User_error "gccjit_backend: Threefry4x32 operation not supported yet"
in
let log_comment c =
@@ -599,7 +600,8 @@ let compile_main ~name ~log_functions ~env { ctx; nodes; get_ident; merge_node;
(RValue.comparison ctx Eq v (RValue.zero ctx num_typ))
| Unop (Uint4x32_to_prec_uniform, _c) ->
(* FIXME: GCC backend doesn't support Uint4x32_to_prec_uniform conversion yet *)
-        raise @@ Utils.User_error "gccjit_backend: Uint4x32_to_prec_uniform conversion not supported yet"
+        raise
+        @@ Utils.User_error "gccjit_backend: Uint4x32_to_prec_uniform conversion not supported yet"
and loop_for_loop ~toplevel ~env key ~from_ ~to_ body =
let open Gccjit in
let i = Indexing.symbol_ident key in
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-07-23 21:22.31: Job failed: Failed: Build failed