mirror of
https://github.com/zml/zml.git
synced 2026-11-16 19:11:09 +00:00
* add an arena to the CompilationContext There was already an allocator in the CompilationContext, this PR makes it into an arena and expose the arena allocator. This allows ops that need to allocate to do so without abusing `std.BoundedArray` with arbitrary bounds, and in a safe way. For now little ops use it, which I believe should stay the case, because most of the time you want to know how many tensor you're working with. It'll also simplify the life of Zig new-comers this include some **breaking changes** to `chunkAllowTrailing` and `split` that are allocating * upgrade a few `axis_: i64` into `axis_: anytype` to handle tags * add a few TODO for the next version of the Tensor API --------- Signed-off-by: Guillaume Wenzek <wzk@zml.ai>
186 lines
5.7 KiB
186 lines
5.7 KiB