Commit Graph

18 Commits

Author SHA1 Message Date
3849eb10b7 Add buffer and hostbuffer utilities with precise f32→bf16 conversion, type inference for loadBuffers, store expected input shapes, enhance meta.visit and JSON TaggedUnion support, and improve logging. 2024-10-28 11:21:46 +00:00
05944b5cc9 Update FnCache to copy and reuse non‑tensor fields in fixed‑size structs, preventing undefined memory in core modules. 2024-05-15 17:54:52 +00:00
5bd7f8aae9 zml: HostBuffer.prettyPrint()
Add pretty printing of HostBuffer.

This will be leverage by the debug helper `x.print()`
It can also be used like this: `std.log.info("my buffer: {}",
.{host_buffer.pretty()})`
2023-12-25 13:01:17 +00:00
145e60b4dd workspace: Update LLVM, XLA, StableHLO, and PJRT plugins to latest versions. 2023-12-13 10:10:32 +00:00
37725cdaa6 Update PJRT, runtime, and ZML modules to use per‑target output folders and expose profiler.dumpDataAsJson for JSON profiling output. 2023-12-04 10:38:10 +00:00
6e4fef8844 zml: Introduce arena allocator in CompilationContext. Expose arena allocator to replace existing allocator, enabling safe allocation for ops without misusing std.BoundedArray. Includes breaking changes to chunkAllowTrailing and split. Upgrade axis_ types to anytype for tag handling and add TODOs for upcoming Tensor API. 2023-11-16 15:11:23 +00:00
57bf667c90 Add struct‑based client creation flags to the Zig PJRT API and update context.autoPlatform to accept a flag struct. 2023-11-13 12:45:17 +00:00
9f4194ad97 Fix test layer. Add tests to detect silent breakage of testLayer and regression in mapAlloc with zero-size struct fields. Add Python venv directory to .gitignore. 2023-11-06 11:25:57 +00:00
98b512c495 Implement func.call emission and function caching across MLIR dialects and ZML module/ops, propagating tags and donations. 2023-10-19 17:01:55 +00:00
7d36913b31 Refactor ZML API: move compile, compileFn and related types to exe.zig, update BaseExe allocation and inline caching in compileInternal, and clean up supporting modules (func.zig, meta.zig, signature.zig, cuda.zig, testing.zig, zml.zig). 2023-10-13 16:08:08 +00:00
0709b1b32f zml: reduce memory usage of sdpaMemEfficient by using zml.ops.while instead of zml.ops.for, avoiding concatenation of intermediate results. 2023-08-14 14:24:11 +00:00
f675a203c2 zml.ops.makeBlock now returns the inner tensor to propagate tags. The function returns both the created mlir.Block and tensors from the supplied function, allowing shape and tag propagation without exposing mlir.Values. Updated tests to run on non‑CPU platforms. 2023-07-21 09:01:01 +00:00
9b7eea8ac2 Add stdx utilities and rework async signature inference; tidy executable logging. 2023-06-21 14:45:14 +00:00
2f54e2a5f3 zml.tensor: add triangular operator to zero out the upper‑right matrix region with configurable offset, and toDiagonal (diag_embed) to embed a vector as a diagonal matrix, correcting previous diag naming. Also add ELU activation under zml.nn.Activation. 2023-05-18 16:39:21 +00:00
021111d07d Extend tests to handle all float types, preventing crashes with bfloat16 tensors. 2023-04-27 10:34:27 +00:00
66881899ca Fix testLayer by removing unnecessary compile_options argument and updating testing logic for new sharded output, ensuring proper usage by llama.zig. 2023-03-31 14:23:45 +00:00
a4f0fc96c0 Integrate user sharding hints and HLO sharding annotations across MLIR dialects and ZML core, and remove the now‑unused module options arguments. 2023-03-21 10:50:39 +00:00
266da6d4be Add initial Bazel build configuration, async runtime implementation, and core MLIR dialect definitions for ZML. 2023-01-02 14:28:25 +00:00