0
Fork 0
mirror of https://github.com/zml/zml.git synced 2026-11-18 18:57:29 +00:00
Commit graph

1,078 commits

Author SHA1 Message Date
Corentin Godeau
bbe3af7c67 zml: added ops.scaledDot()
It implements a scaled dot product
2026-02-16 20:52:23 +00:00
Corentin Godeau
13a5ad77cc zml/testing: Made testlayer take a runtime name 2026-02-16 20:52:23 +00:00
Corentin Godeau
1302b0c166 zml/nn: Improved Yarn logic 2026-02-16 20:52:23 +00:00
Corentin Godeau
e11c687929 zml/attention: Re-introduced allocationSize 2026-02-16 20:52:23 +00:00
Corentin Godeau
e4f831cc46 zml/io: added TensorStore.hasKey() to check key existence
It's a bit hacky since it does an array traversal to see if there is a
match.
2026-02-16 20:52:23 +00:00
Corentin Godeau
f81763a11a zml/nn: Use higher precision for rmsNorm 2026-02-16 20:52:23 +00:00
Corentin Godeau
44c249de07 zml/nn: removed commented code 2026-02-16 20:52:23 +00:00
Corentin Godeau
1200262da0 zml/attention: fix wrong causal option 2026-02-16 20:52:23 +00:00
Corentin Godeau
7b3474ab89 third_party/flashattn: bump libflashattn.so 2026-02-16 20:52:23 +00:00
Corentin Godeau
9e29f44642 small fixes 2026-02-16 20:52:23 +00:00
Corentin Godeau
64223d935b flashattn lib override 2026-02-16 20:52:23 +00:00
Corentin Godeau
6b351b9b40 zml: added simple tracer support back 2026-02-16 20:52:23 +00:00
Corentin Godeau
80692454e7 Added paged attention FA3 2026-02-16 20:52:23 +00:00
Corentin Godeau
1e2ace0ced wip: argument baking 2026-02-16 20:52:23 +00:00
Corentin Godeau
ea69b89eee wip it works 2026-02-16 20:52:23 +00:00
Corentin Godeau
ed27b2722d zml: added some paged attention bindings 2026-02-16 20:52:23 +00:00
Corentin Godeau
692825cd72 Better testLayer (#383) 2026-02-16 20:52:23 +00:00
Corentin Godeau
79cec4f9a4 V2: Tensor.print() (#380)
Added `Tensor.print()` back
2026-02-16 20:52:23 +00:00
Corentin Godeau
2bafd65458 Various improvements (#379)
This pull request includes several improvements and bug fixes across the
codebase, focusing on memory handling, correctness in tensor testing,
and API consistency. The most significant changes are grouped below:

* Fixed a bug in `zml/testing.zig`'s `testlayer` by updating the
callback signature to take a mutable context and increment the index
correctly, ensuring tensors are correctly initialized.
* Improved memory management for expected output slices in `testlayer`
by switching to `zml.Slice.alloc` for allocation, using `readSliceAll`,
and freeing only the data instead of the whole slice, removing the
potential alignment problems.
* Enhanced test logging to include the tolerance value in success
messages for better diagnostics.

* Increased the evaluation branch quota in `MapRestrict` to support more
complex compile-time type mapping, preventing quota exceeded errors.
* Updated the `fromCStruct` function in `pjrt/pjrt.zig` to accept a
`meta.Struct`.

* Improved handling of output operand aliases in
`mlir/dialects/stablehlo/stablehlo.zig::custom_call` by passing
`output_tuple_indices` for multi-result functions, increasing
correctness in custom call attribute construction.
2026-02-16 20:37:34 +00:00
Steeve Morin
ee9155b7bb examples/llama: remove bufferized leak 2026-02-16 20:00:03 +00:00
Steeve Morin
f64ad1ef79 workspace: remove apple_support 2026-02-16 19:59:38 +00:00
Steeve Morin
8fd3fec244 platforms/cuda: fix cuda 13 loader names 2026-02-16 19:58:58 +00:00
Steeve Morin
18896ce10c platforms/rocm: bump to ROCm 7.2.0 2026-02-16 18:31:30 +00:00
Steeve Morin
1323d02f4b platforms/cuda: bump to CUDA 13.1 2026-02-16 14:37:37 +00:00
Steeve Morin
b72124af50 examples/llama: disable VFS (until reenabling it later) 2026-02-16 14:20:48 +00:00
Steeve Morin
f781bfdde3 workspace: make rules_zig work on linux again 2026-02-16 14:20:24 +00:00
Steeve Morin
51a36fa8d8 third_party/zls: update hashes 2026-02-16 14:13:14 +00:00
Steeve Morin
aaab6f7a86 zml: load safetensors sequencially 2026-02-16 14:12:40 +00:00
Steeve Morin
d511605d5b platforms: port to zig 0.16.0-dev.2611+f996d2866 2026-02-16 13:45:51 +00:00
Steeve Morin
dcbf5f2e27 workspace: update to 0.16.0-dev.2611+f996d2866, add remote exec
also:
- use toolchains_llvm_bootstrapped for macOS builds
2026-02-16 12:05:01 +01:00
Steeve Morin
2d65af067f examples/benchmark: platform is not a const pointer 2026-02-16 12:05:01 +01:00
Steeve Morin
639850347e pjrt: use dlopen on macos too
to keep symbols private
2026-02-16 12:05:01 +01:00
Steeve Morin
24354d34b3 pjrt: add from DynLib 2026-02-16 12:05:01 +01:00
Corentin Godeau
d7655bc029 zml/tensor: fix assert formatting 2026-02-13 11:59:30 +01:00
Benjamin Rabier
7bf0f66024
Add linenoise as bazel third party dependency (#384)
Co-authored-by: Benjamin Rabier <benjamin@zml.ai>
2026-02-12 18:31:09 +01:00
Corentin Godeau
d5cfd726ac
Better testLayer (#383) 2026-02-12 11:59:09 +01:00
Corentin Godeau
7d497907ef zml/testing: updated testLayer to new API
Also renamed to testLayer
2026-02-11 14:14:37 +01:00
Corentin Godeau
2f9f01e9b9 zml/tensor: Added checks on Tensor.dot() 2026-02-10 17:29:14 +00:00
Corentin Godeau
2218ec0f3f
V2: Tensor.print() (#380)
Added `Tensor.print()` back
2026-02-10 10:11:48 +01:00
Corentin Godeau
ef60536186 zml/slice: fix formatting
Also added a test
2026-02-09 18:03:03 +00:00
Corentin Godeau
24ca08692d zml: fix tests 2026-02-09 18:02:48 +00:00
Corentin Godeau
1fd90f1e45
Various improvements (#379)
This pull request includes several improvements and bug fixes across the
codebase, focusing on memory handling, correctness in tensor testing,
and API consistency. The most significant changes are grouped below:

### Tensor Testing and Memory Management Improvements

* Fixed a bug in `zml/testing.zig`'s `testlayer` by updating the
callback signature to take a mutable context and increment the index
correctly, ensuring tensors are correctly initialized.
* Improved memory management for expected output slices in `testlayer`
by switching to `zml.Slice.alloc` for allocation, using `readSliceAll`,
and freeing only the data instead of the whole slice, removing the
potential alignment problems.
* Enhanced test logging to include the tolerance value in success
messages for better diagnostics.

### API and Code Quality Enhancements

* Increased the evaluation branch quota in `MapRestrict` to support more
complex compile-time type mapping, preventing quota exceeded errors.
* Updated the `fromCStruct` function in `pjrt/pjrt.zig` to accept a
`meta.Struct`.

### StableHLO Output Operand Alias Handling

* Improved handling of output operand aliases in
`mlir/dialects/stablehlo/stablehlo.zig::custom_call` by passing
`output_tuple_indices` for multi-result functions, increasing
correctness in custom call attribute construction.
2026-02-09 12:01:22 +01:00
Benjamin Rabier
eb28352018
zml/io: memory leak in load (#378) 2026-02-04 18:03:24 +01:00
Benjamin Rabier
5a1d5041d9
zml/platform: small memory leak fix (#377)
devices and memories are not allocated within the arena when the rest of
the platform is.
2026-02-04 16:57:12 +01:00
Steeve Morin
0f460fb636 zml: expose Memory, pass Platform as *const, add zml.io.load 2026-02-03 10:59:39 +00:00
Steeve Morin
f76f02984e zml: add io.BufferedDeviceWriter, io.DirectDeviceWriter and
io.ProgressWriter
2026-01-28 18:13:17 +00:00
Steeve Morin
7832fd26ac stdx: rework stdx.Io.LimitedGroup to use atomics and conditions 2026-01-28 18:12:15 +00:00
Steeve Morin
7f936ba7b3 zml: create and pass Platform via const pointer
Platform is destined to hold more things, since it's effectively an
object
that is instanciated once per program. Make it a pointer and pass it via
const pointers around.
2026-01-28 18:11:35 +00:00
Steeve Morin
a8154fb5de zml: upgrade meta.TupleRange to Zig 0.16 2026-01-28 18:07:06 +00:00
Steeve Morin
24137cdc11 pjrt: sugarize Event.onReady
Dont't expose callconv stuff, just pass a comptimed function
2026-01-27 23:20:17 +00:00