Commit Graph

137 Commits

Author SHA1 Message Date
488a844a0f Add Zig 0.15 compatibility: update BUILD files, async primitives, stdx utilities, MLIR dialects, and PJRT FFI. 2025-07-28 13:54:28 +00:00
e3b7705e3d Remove gguf and torch loader implementations and related BUILD and test assets. 2025-07-24 17:19:43 +00:00
1cf26756a1 workspace: run buildifier, drop rules_uv, refactor tools/hf dependencies 2025-07-16 10:01:41 +00:00
c488b634fc runtimes/rocm: implement zmlxrocm in Zig
Also, sandbox `amdgpu.ids` and restore safetensors json parsing.
2025-07-07 16:48:07 +00:00
cf00506dbb Switch workspace build rules from zig_cc_binary to zig_binary, removing the hack and using the C linker directly. 2025-07-03 15:10:36 +00:00
78679817df zml: remove nemo, sentencepiece loaders, remove zig-yaml
Progress towards
2025-06-24 15:39:55 +00:00
fe56f03f5d third_party/xla: de-modularize xla
This PR intends to remove XLA as a bzlmod and transfer it as a non
bzlmod dep.

This is because this module will never be upstreamed as is, so keep it
private.

Also, we fetch llvm-raw and stablehlo from it, which is fine.

While there, dummify the various local_config XLA symbols to please the
imports, as we don't use those parts in ZML itself.

Closes
2025-06-23 09:13:43 +00:00
e789e26008 Remove examples workspace and clean up related Bazel BUILD/MODULE files and Zig build scripts. 2025-06-19 09:30:29 +00:00
1b58c34b8c Update ZML build configuration to replace zig-protobuf with upb library. 2025-06-09 16:34:20 +00:00
cba3be4859 pjrt,zml: remove profiler
Closes

Progress towards
2025-06-06 12:24:42 +00:00
cba9ce9615 protobuf, libxev: remove usingnamespace
remove usingnamespace from libxev and zig-protobuf

relevant PRs:
* libxev:
7f803181b1
 * zig-protobuf: https://github.com/zml/zig-protobuf/pull/1/files

This means we can now build ZML with `-fincremental` (in debug mode only
and linux x86-64)

---------

Signed-off-by: Guillaume Wenzek <wzk@zml.ai>
2025-05-06 11:58:20 +00:00
e7323be10b runtimes/rocm: switch to in-process LLD, removing the need for sandboxed lld. 2025-04-23 11:43:18 +00:00
4294a4d08f Bump hftokenizers dependency versions in Bazel and Cargo lockfiles (MODULE.bazel.lock, Cargo.toml, Cargo.lock) 2025-04-04 12:54:33 +00:00
2d321d232d runtimes/cuda: sandbox CUDA dependencies by removing them from the leaf binary, sandboxing the dependency graph, marking dlopen direct dependencies as NEEDED, setting RPATH to the sandbox, loading the PJRT plugin from the sandbox, and enabling weak CUDA symbols without direct linking. 2025-03-26 11:18:29 +00:00
a5420068b1 pjrt: emit warning instead of panic when FFI Extension is missing (e.g., on TPU). 2025-03-24 09:40:44 +00:00
f27a524f31 Update rules_zig: add zig_srcs target, fix source handling bug, clean up BUILD files, adjust async/coro.zig tests, and disable nemo and yaml model loaders. 2025-03-13 12:27:21 +00:00
ff1433d998 pjrt: bind PJRT_Client_CreateUninitializedBuffer. 2025-02-25 10:37:45 +00:00
8456a0d073 zml/pjrt: add binding for PJRT_Device_MemoryStats. 2025-02-19 12:14:05 +00:00
4d6d975dc0 Patch aio.zig: update loadBuffersWithPrefix argument type to match the conditional type of loadBuffers init_args. 2025-02-13 09:48:13 +00:00
af8844c1f1 Add model prefix support when loading a model from safetensors, enabling use of a specific model prefix (e.g., ModernBertModel) instead of the full model. Tested with the text embeddings server project. 2025-02-12 13:18:27 +00:00
0a2ab7c8cb Remove usingnamespace from MLIR. 2025-01-28 09:35:58 +00:00
f8ab0d7b2a Remove dead imports. 2025-01-22 10:45:04 +00:00
51a6cab753 Wire has_side_effect field in zml/ops. 2025-01-20 16:45:13 +00:00
99a2001e63 Rename PJRT BufferType to follow Zig and ZML naming conventions. 2025-01-16 13:00:47 +00:00
09c43b8759 Add customCall operation to zml/ops. 2025-01-09 15:01:33 +00:00
9f1cc762cd Fix map tests in zml/meta. 2025-01-06 17:49:50 +00:00
fbf1ecb8b7 Introduce Executable.getCompiledMemoryStats in PJRT. 2025-01-02 16:36:13 +00:00
4b1a3ff48a Add union support to mapping helpers in zml/meta.zig. 2025-01-01 13:35:17 +00:00
e6286b6097 Update Buffer.from to be blocking by default and add options for async loading and memory placement, adjusting aio, hostbuffer, pjrtx, and tensor implementations. 2024-12-25 17:14:44 +00:00
6aa9aa5a7b Add preliminary implementation for custom call support. 2024-12-10 09:36:37 +00:00
f5ab2c3a55 zml: eliminate compile-time fields from Bufferized, removing the need to pass undefined to exe.call for inlined arguments. Introduce BufferizedWithArgs in zml.testing for compileAndCall utility. 2024-11-28 12:24:39 +00:00
95453c7242 Update XLA dependency to version 20250527.0‑cb67f2f and refresh related Bazel BUILD, MODULE, overlay and patch files. 2024-11-22 16:50:20 +00:00
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
4ef81b89ea stdx.fmt: add slice formatting support, improving on previous prettyPrinter implementation by leveraging internal fmt mechanisms. 2024-10-18 15:05:08 +00:00
aacbf2ee04 Fix Llama3 rope scaling implementation in the neural network module (zml/nn.zig) 2024-10-07 12:53:03 +00:00
2863c1f5e0 zml/tensor: fix returned value in Tensor.toMemory – ensure _output_memory_kind is set correctly in the result. 2024-09-18 13:18:08 +00:00
aec7072837 pjrt: add FFI bindings for custom calls 2024-09-10 09:14:28 +00:00
1f5ff96c10 zml/ops: add wiring for operand output alias in zml.ops.triton 2024-09-09 15:00:28 +00:00
4b7e618b43 zml/aio: add bool handling in struct population within populateStruct 2024-09-02 14:11:47 +00:00
ac63c30e12 add mini-DSL for creating MLIR common attributes and types, leveraging Zig 0.14 to simplify mlir.Type and mlir.Attribute creation 2024-08-26 14:19:00 +00:00
63ef78efcc zml: add support for NVTX tracing 2024-08-21 14:41:40 +00:00
7df89301dc Bump XLA version and import llvm, stablehlo, triton, and zig‑protobuf modules in workspace BUILD files. 2024-08-06 10:28:43 +00:00
3f36506f1c zml: remove usingnamespace from floats.zig and related dependencies; note that incremental compilation does not improve overall build time due to linking overhead 2024-07-23 17:43:43 +00:00
42dee5d0e0 mlir: rework stablehlo custom call implementation and add a Triton example 2024-07-16 13:23:07 +00:00
aec1d96e6d mlir: rework DenseElementsAttribute to correctly slice inputs and modify .as() to return a concrete value instead of an optional 2024-07-15 12:32:24 +00:00
30f6be0e2f Update core Zig modules (async, mlir, pjrt, stdx) and third‑party Bazel definitions for the Zig 0.14.0 release. 2024-07-02 14:19:04 +00:00
18eb0e5a7b Add async I/O, SentencePiece, NN, and tensor utilities for ModernBERT support and update Bazel build configuration. 2024-06-14 15:27:06 +00:00
221ece647d zml/ops.zig: Added zml.ops.case operation
This can be used to select which branch will be run at runtime.

It wraps the `stablehlo.case` operation.
2024-05-30 14:11:08 +00:00
3aac788544 Update Bazel build configurations (zig.bzl, BUILD files) for MLIR, PJRT, Neuron, ROCm, tokenizer, and tools, fixing broken dependencies. 2024-05-20 11:28:25 +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