From 6180fdcbfef0a8bc39900ae50d1e046d9c2fbc58 Mon Sep 17 00:00:00 2001 From: Lukasz Stafiniak Date: Wed, 18 Dec 2024 20:51:41 +0100 Subject: [PATCH] Prepare for release: Fix formatting, gh-pages script, bump version number --- arrayjit.opam | 6 +++--- arrayjit/lib/assignments.ml | 2 +- arrayjit/lib/backends.ml | 4 +--- bin/hello_world_op.ml | 4 +--- bin/moons_benchmark.ml | 6 ++++-- dune-project | 6 +++--- neural_nets_lib.opam | 2 +- ocannl_npy.opam | 2 +- 8 files changed, 15 insertions(+), 17 deletions(-) diff --git a/arrayjit.opam b/arrayjit.opam index 8d0304fe..5c5b8242 100644 --- a/arrayjit.opam +++ b/arrayjit.opam @@ -1,6 +1,6 @@ # This file is generated by dune, edit dune-project instead opam-version: "2.0" -version: "0.4.1" +version: "0.5.0.beta" synopsis: "An array language compiler with multiple backends (CPU, CUDA), staged compilation" description: @@ -37,11 +37,11 @@ depends: [ "odoc" {with-doc} ] depopts: [ - "cudajit" {>= "0.6.0"} + "cudajit" {>= "0.6.1"} "gccjit" {>= "0.3.2"} ] conflicts: [ - "cudajit" {< "0.6.0"} + "cudajit" {< "0.6.1"} "gccjit" {< "0.3.2"} ] build: [ diff --git a/arrayjit/lib/assignments.ml b/arrayjit/lib/assignments.ml index ebb9f13e..16eb68c5 100644 --- a/arrayjit/lib/assignments.ml +++ b/arrayjit/lib/assignments.ml @@ -364,7 +364,7 @@ let fprint_hum ?name ?static_indices () ppf c = let%track6_sexp lower ~unoptim_ll_source ~ll_source ~cd_source ~name static_indices (proc : t) : Low_level.optimized = - let llc: Low_level.t = to_low_level proc in + let llc : Low_level.t = to_low_level proc in (* Generate the low-level code before outputting the assignments, to force projections. *) (match cd_source with | None -> () diff --git a/arrayjit/lib/backends.ml b/arrayjit/lib/backends.ml index db5d0106..ff013e3c 100644 --- a/arrayjit/lib/backends.ml +++ b/arrayjit/lib/backends.ml @@ -460,9 +460,7 @@ let finalize (type buffer_ptr dev runner event) and type runner = runner and type event = event) (ctx : Backend.context) : unit = Option.iter Backend.free_buffer ~f:(fun mem_free -> - if - Atomic.compare_and_set ctx.finalized false true - then ( + if Atomic.compare_and_set ctx.finalized false true then ( Backend.await ctx.stream; Map.iteri ctx.ctx_arrays ~f:(fun ~key ~data -> if diff --git a/bin/hello_world_op.ml b/bin/hello_world_op.ml index 0b70f1d7..9659d8a5 100644 --- a/bin/hello_world_op.ml +++ b/bin/hello_world_op.ml @@ -208,9 +208,7 @@ let%track2_sexp _Very_big_tensor (() : unit) : unit = let stream = Backend.(new_stream @@ get_device ~ordinal:0) in let ctx = Backend.make_context stream in Rand.init 0; - let hey = - TDSL.range_of_shape ~batch_dims:[ 6 ] ~input_dims:[ 7; 8 ] ~output_dims:[ 9 ] () - 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 Train.forward_and_forget backend ctx ye; Tensor.print ~with_code:false ~with_grad:false `Default hey; diff --git a/bin/moons_benchmark.ml b/bin/moons_benchmark.ml index cbbd31fb..d201ebba 100644 --- a/bin/moons_benchmark.ml +++ b/bin/moons_benchmark.ml @@ -186,7 +186,9 @@ let classify_moons ~seed ~on_device ~inlining_cutoff ~num_streams ~batch_size ~b result_label = "init time in sec, min loss, last loss"; result = [%sexp_of: float * float * float] - (init_time_in_sec, List.reduce_exn rev_epoch_losses ~f:Float.min, List.hd_exn rev_epoch_losses); + ( init_time_in_sec, + List.reduce_exn rev_epoch_losses ~f:Float.min, + List.hd_exn rev_epoch_losses ); } in Stdio.printf "\n\n%!"; @@ -211,7 +213,7 @@ let _cuda_benchmarks = ~f:(fun batch_size -> List.concat_map [ (* 0; 1; 2; *) 3 ] ~f:(fun inlining_cutoff -> List.concat_map [ (* 1; 3; *) 7 (* *) ] ~f:(fun seed -> - List.concat_map [ (* "gccjit" ; "cuda";"sync_cc" ; *) "cc"] + List.concat_map [ (* "gccjit" ; "cuda";"sync_cc" ; *) "cc" ] ~f:(fun backend_name -> List.concat_map [ (* CDSL.double; *) CDSL.single (* ; CDSL.half *) ] ~f:(fun value_prec -> diff --git a/dune-project b/dune-project index c179fb7b..fd218898 100644 --- a/dune-project +++ b/dune-project @@ -4,7 +4,7 @@ (name ocannl) -(version 0.4.1) +(version 0.5.0.beta) (generate_opam_files true) @@ -80,12 +80,12 @@ (>= 2.0.0))) (depopts (cudajit - (>= 0.6.0)) + (>= 0.6.1)) (gccjit (>= 0.3.2))) (conflicts (cudajit - (< 0.6.0)) + (< 0.6.1)) (gccjit (< 0.3.2))) (tags diff --git a/neural_nets_lib.opam b/neural_nets_lib.opam index 04fdc17a..d82902fa 100644 --- a/neural_nets_lib.opam +++ b/neural_nets_lib.opam @@ -1,6 +1,6 @@ # This file is generated by dune, edit dune-project instead opam-version: "2.0" -version: "0.4.1" +version: "0.5.0.beta" synopsis: "A from-scratch Deep Learning framework with an optimizing compiler, shape inference, concise syntax" description: diff --git a/ocannl_npy.opam b/ocannl_npy.opam index 5b1acf98..a38a70bf 100644 --- a/ocannl_npy.opam +++ b/ocannl_npy.opam @@ -1,6 +1,6 @@ # This file is generated by dune, edit dune-project instead opam-version: "2.0" -version: "0.4.1" +version: "0.5.0.beta" synopsis: "Numpy file format support for ocaml" maintainer: ["Lukasz Stafiniak "] authors: ["Laurent Mazare"]