diff --git a/docs/tutorials/write_first_model.md b/docs/tutorials/write_first_model.md index cc7148a..0433949 100644 --- a/docs/tutorials/write_first_model.md +++ b/docs/tutorials/write_first_model.md @@ -154,7 +154,7 @@ like this: pub fn main() !void { var gpa = std.heap.GeneralPurposeAllocator(.{}){}; defer _ = gpa.deinit(); - try asynk.AsyncThread.main(gpa.allocator(), asyncMain, .{}); + try asynk.AsyncThread.main(gpa.allocator(), asyncMain); } @@ -222,7 +222,7 @@ try buffers.put(arena, "weight", zml.HostBuffer.fromArray(&weights)); try buffers.put(arena, "bias", zml.HostBuffer.fromArray(&bias)); // the actual BufferStore -var bs: zml.aio.BufferStore = .{ +const bs: zml.aio.BufferStore = .{ .arena = arena_state, .buffers = buffers, }; @@ -253,7 +253,7 @@ const model_shapes = try zml.aio.populateModel(Layer, allocator, bs); // The shape of the input tensor, we have to pass in manually. var compilation = try asyncc( zml.compileModel, - .{ allocator, model_shapes, .forward, .{input_shape}, platform }, + .{ allocator, Layer.forward, model_shapes, .{input_shape}, platform }, ); // Produce a bufferized weights struct from the fake BufferStore. @@ -440,7 +440,7 @@ const Layer = struct { pub fn main() !void { var gpa = std.heap.GeneralPurposeAllocator(.{}){}; defer _ = gpa.deinit(); - try asynk.AsyncThread.main(gpa.allocator(), asyncMain, .{}); + try asynk.AsyncThread.main(gpa.allocator(), asyncMain); } pub fn asyncMain() !void { @@ -483,10 +483,7 @@ pub fn asyncMain() !void { // Start compiling. This uses the inferred shapes from the BufferStore. // The shape of the input tensor, we have to pass in manually. - var compilation = try asyncc( - zml.compileModel, - .{ allocator, model_shapes, .forward, .{input_shape}, platform }, - ); + var compilation = try asyncc(zml.compileModel, .{ allocator, Layer.forward, model_shapes, .{input_shape}, platform }); // Produce a bufferized weights struct from the fake BufferStore. // This is like the inferred shapes, but with actual values. diff --git a/examples/tools/zig.sh b/examples/tools/zig.sh deleted file mode 100755 index 9108ec8..0000000 --- a/examples/tools/zig.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -cd "$(dirname "${BASH_SOURCE[0]}")" -exec bazel run --config=silent @zml//third_party/zls:zig -- "${@}" diff --git a/tools/zig.sh b/tools/zig.sh deleted file mode 100755 index a9b746c..0000000 --- a/tools/zig.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -cd "$(dirname "${BASH_SOURCE[0]}")" -exec bazel run --config=silent @zml//third_party/zls:zls -- zig "${@}" diff --git a/zls.build.json b/zls.build.json deleted file mode 100644 index 796644a..0000000 --- a/zls.build.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "build_options": [ - { - "name": "cmd", - "value": "bazel run @zml//:completion" - } - ] -}