diff --git a/zml/aio.zig b/zml/aio.zig index 2c370a1..4dc205c 100644 --- a/zml/aio.zig +++ b/zml/aio.zig @@ -1,5 +1,4 @@ const std = @import("std"); -const builtin = @import("builtin"); const asynk = @import("async"); const c = @import("c"); diff --git a/zml/buffer.zig b/zml/buffer.zig index 3ce95fb..3854cc3 100644 --- a/zml/buffer.zig +++ b/zml/buffer.zig @@ -1,14 +1,10 @@ const std = @import("std"); -const testing = std.testing; const asynk = @import("async"); const stdx = @import("stdx"); -const Context = @import("context.zig").Context; -const Data = @import("dtype.zig").Data; const DataType = @import("dtype.zig").DataType; const HostBuffer = @import("hostbuffer.zig").HostBuffer; -const meta = @import("meta.zig"); const pjrt = @import("pjrtx.zig"); const Platform = @import("platform.zig").Platform; const Shape = @import("shape.zig").Shape; diff --git a/zml/context.zig b/zml/context.zig index 33c4255..092a9ec 100644 --- a/zml/context.zig +++ b/zml/context.zig @@ -7,7 +7,6 @@ const runfiles = @import("runfiles"); const runtimes = @import("runtimes"); const stdx = @import("stdx"); -const Buffer = @import("buffer.zig").Buffer; const DataType = @import("dtype.zig").DataType; const HostBuffer = @import("hostbuffer.zig").HostBuffer; const pjrt = @import("pjrtx.zig"); diff --git a/zml/helpers.zig b/zml/helpers.zig index 75998d7..85c9351 100644 --- a/zml/helpers.zig +++ b/zml/helpers.zig @@ -3,9 +3,7 @@ const std = @import("std"); const meta = @import("meta.zig"); const Shape = @import("shape.zig").Shape; -const Tensor = @import("tensor.zig").Tensor; -const EnumLiteral = @TypeOf(.enum_literal); const log = std.log.scoped(.@"zml/tensor"); test { diff --git a/zml/hostbuffer.zig b/zml/hostbuffer.zig index 6e038a3..8f6fcb1 100644 --- a/zml/hostbuffer.zig +++ b/zml/hostbuffer.zig @@ -3,7 +3,6 @@ const std = @import("std"); const stdx = @import("stdx"); const Buffer = @import("buffer.zig").Buffer; -const Data = @import("dtype.zig").Data; const DataType = @import("dtype.zig").DataType; const floats = @import("floats.zig"); const Platform = @import("platform.zig").Platform; diff --git a/zml/meta.zig b/zml/meta.zig index 526a7be..ad50fe0 100644 --- a/zml/meta.zig +++ b/zml/meta.zig @@ -1,6 +1,5 @@ const std = @import("std"); const testing = std.testing; -const builtin = @import("builtin"); const stdx = @import("stdx"); const FnParam = stdx.meta.FnParam; diff --git a/zml/platform.zig b/zml/platform.zig index f0d59ae..a7bc87c 100644 --- a/zml/platform.zig +++ b/zml/platform.zig @@ -1,17 +1,13 @@ -const asynk = @import("async"); -const builtin = @import("builtin"); -const runtimes = @import("runtimes"); const std = @import("std"); + +const runtimes = @import("runtimes"); +pub const Target = runtimes.Platform; const stdx = @import("stdx"); -const meta = @import("meta.zig"); -const module = @import("module.zig"); const pjrt = @import("pjrtx.zig"); const log = std.log.scoped(.zml); -pub const Target = runtimes.Platform; - pub const available_targets = std.enums.values(Target); pub const CompilationOptions = struct { diff --git a/zml/test_runner.zig b/zml/test_runner.zig index cd760e8..ed8ee11 100644 --- a/zml/test_runner.zig +++ b/zml/test_runner.zig @@ -1,11 +1,9 @@ //! Test runner for unit test based on https://github.com/ziglang/zig/blob/master/lib/compiler/test_runner.zig with async -const asynk = @import("async"); -const builtin = @import("builtin"); const std = @import("std"); - -const io = std.io; const testing = std.testing; -const assert = std.debug.assert; +const builtin = @import("builtin"); + +const asynk = @import("async"); // note: std_options.log_level does not respect testing.log_level // ref: https://github.com/ziglang/zig/issues/5738 diff --git a/zml/torch.zig b/zml/torch.zig index 60f3c19..5889353 100644 --- a/zml/torch.zig +++ b/zml/torch.zig @@ -5,8 +5,6 @@ const stdx = @import("stdx"); const zml = @import("zml.zig"); const Tensor = zml.Tensor; -const log = std.log.scoped(.zml_torch); - /// Multiplies a matrix or a vector with a tensor, /// following the semantic of pytorch `@` operator. /// When both sides are matrices, it's the textbook matrix multiplication :