2025-07-24 12:11.49: New job: test ahrefs/ocannl https://github.com/ahrefs/ocannl.git#refs/heads/master (13f3be51cc0a02f2b02bc9bfe2d85e1d3bebfffd) (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 13f3be51 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-24 12:11.49: 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-24 12:11.49: 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-24 12:11.49: Waiting for resource in pool OCluster 2025-07-24 12:11.49: Waiting for worker… 2025-07-24 12:11.49: Got resource from pool OCluster Building on toxis.caelum.ci.dev HEAD is now at 91cb9198 Get rid of the GCC gccjit backend, it got stale and doesn't provide value HEAD is now at 13f3be51 Fix CUDA backend staleness regressions, obsoleted precision naming (from ocaml/opam:debian-12-ocaml-4.08@sha256:4b3e5b2d1be26cada6c08f752ca0b48d3b0ba20fec23648d53395a83f1ae2517) 2025-07-24 12:11.50 ---> using "6cffc1a1a52caf2843bd473effea9756e568737c821ae9874d1cb7264a14fd20" from cache /: (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-24 12:11.50 ---> using "302b09a07f3e63cf843954026241e2145dcd9d48aa46e6f73f5e6c2a8313c3c9" from cache /: (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-24 12:11.50 ---> using "cea7a1b4577ed221adf5a742377b6f150ff7832adb27838f80bf4faa7e02e12f" from cache /: (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 ocp-indent.1.8.1 -> installed ocamlbuild.0.16.1 -> installed base.v0.14.3 -> installed stdio.v0.14.0 -> installed topkg.1.0.8 -> 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-07-24 12:11.50 ---> using "77996898021cad247d81d8eceeba4066a697607f4a9fdc67bee5a3313579cd44" from cache /src: (copy (src .) (dst /src/)) 2025-07-24 12:11.51 ---> saved as "13964e29d0b8d4b9f05fb657ce4bf2e5cb967d48ab17eb13a82e2825aa7b18c6" /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/dune", line 1, characters 0-0: diff --git a/_build/default/arrayjit/lib/dune b/_build/default/arrayjit/lib/.formatted/dune index 9cd40d7..136f186 100644 --- a/_build/default/arrayjit/lib/dune +++ b/_build/default/arrayjit/lib/.formatted/dune @@ -90,7 +90,6 @@ ppx_variants_conv ppx_minidebug))) - (library (name backends) (public_name arrayjit.backends) 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/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/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 "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/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/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/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/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/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 16d05b0..cef550a 100644 --- a/_build/default/arrayjit/lib/cuda_backend.ml +++ b/_build/default/arrayjit/lib/.formatted/cuda_backend.ml @@ -606,8 +606,7 @@ end) : Ir.Backend_impl.Lowered_backend = struct | Tanh_approx, Single_prec _ -> func "__tanhf" | Tanh_approx, _ -> func "tanh" | Not, _ -> f "(" " == 0.0 ? 1.0 : 0.0)" - | Uint4x32_to_prec_uniform, _ -> - func ("uint4x32_to_" ^ Ops.prec_string prec ^ "_uniform") + | Uint4x32_to_prec_uniform, _ -> func ("uint4x32_to_" ^ Ops.prec_string prec ^ "_uniform") let ternop_syntax prec v = let open PPrint 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-24 12:11.52: Job failed: Failed: Build failed