0
Fork 0
mirror of https://github.com/zml/zml.git synced 2026-11-16 19:11:09 +00:00
Commit graph

146 commits

Author SHA1 Message Date
Corentin Godeau
59a888f7e2
third_party/zls: allow all 0.17 zig versions (#1036) 2026-11-06 15:14:38 +01:00
Louis Lechevalier
2532589572
zml/moe: CuTe MoE nvfp4 on sm103 (#981)
This PR port the CuTe MoE for nvfp4 x nvfp4 from cutlass flashinfer into
zml. It uses the CuTe zig DSL. It is the first PR of a serie that aim to
replace the covering of flashinfer cutlass in ZML. The final goal is to
remove the flashinfer cutlass binding. It begins by removing the binding
of the bf16 kernel on sm90 (never used, we have triton).
2026-11-02 14:46:41 +01:00
Benjamin Rabier
d4b413f5f9
zml/tokenizer: support Mistral's numeric lookahead (#997)
Mistral Large 4's Tekken tokenizer uses positive lookahead to split
number runs into groups of three from the right. IREE's regex compiler
rejects this pattern, preventing the tokenizer from loading.

Patch IREE to recognize the exact isolated Split pattern, match complete
number runs with its DFA, and emit the original groups using Unicode
codepoint counts. Preserve progress when output fills during streaming
and finalization. Register the patch in ZML's IREE repository rule.

Treat RESOURCE_EXHAUSTED as normal encoder backpressure instead of
logging errors before retrying. Add regressions for numeric token IDs,
Unicode numbers, byte-at-a-time input, and output overflow.
2026-10-29 14:10:32 +01:00
Damien Mehala
dd82a8a10b
third_party/zls: bump to 0.17.0 (#966) 2026-10-20 11:36:07 +02:00
Hugo Mano
bc9d6c2c8d
workspace: bump ZML plugins and CUDA/ROCm runtimes (#942)
Update XLA plugins to release 202610151602.227.1.e215eb02db73
for CPU, CUDA, ROCm, Metal, and Furiosa.

Updated CUDA to 13.4.3 and ROCm with TheRock 10.1.

Now we use CUDA compatibility libraries and NCCL 2.32.3 through NVIDIA's
APT repositories. Starting with CUDA 13.4's redistribution manifest
omits the generic cuda_compat package
(https://docs.nvidia.com/deploy/cuda-compatibility/why-cuda-compatibility.html).
So we resolve it through NVIDIA's APT repositories instead.
These repositories expose flat package indexes at separate x86_64
and SBSA URLs, so we extend rules_distroless to support flat sources.

For NCCL we leverage the same APT source workflow, replacing
separate cryptic wheel URLs.
2026-10-16 10:31:34 +02:00
Hugo Mano
016376f2f4
workspace: remove flashattn (#939) 2026-10-14 18:29:02 +02:00
Guillaume Wenzek
00a0af4a55
zig 0.17 (second attempt) (#923)
Bump for zig 0.17

Deps:
- uucode bumped to
1fb73433bb
- zigimg bumped to
734fa919fb
- libvaxis bumped to
14b7684272
- zio bumped to:
417757935e
- rules_zig upgraded to [version
0.17](https://github.com/hermeticbuild/rules_zig/releases/tag/v0.17.0)
- zls is using a commit from master, but they don't have yet a tagged
release so Codex did a bit of packaging. I confirmed it correctly
autocompletes on my machine
2026-10-13 17:11:38 +02:00
Hugo Mano
b148f0b919
workspace: bump XLA + LLVM + IRs (#903) 2026-10-07 16:33:44 +02:00
Guillaume Wenzek
303ff3e6a4
Revert "zig 0.17 (#693)" (#909)
This reverts commit 5a18757368.

Our internal repos has a few zig patches, I need to also upgrade them
before we ugprade ZML
2026-10-07 11:34:51 +02:00
Guillaume Wenzek
5a18757368
zig 0.17 (#693)
Bump for zig 0.17

Deps:
- uucode bumped to
1fb73433bb
- zio bumped to:
417757935e
- rules_zig upgraded to [version
0.17](https://github.com/hermeticbuild/rules_zig/releases/tag/v0.17.0)

There is one Codex generated patch:
- zigimg: minor fixes to allow zig 0.17 to compile it, until they
officially support
2026-10-07 11:08:06 +02:00
Steeve Morin
3831492aa0 third_party/zio: bump zio=v0.19.0 2026-10-05 18:11:42 +02:00
Steeve Morin
94e79b1ea7 third_party/zio: add dynamic page size support
this enables GB300 (notably) to work
2026-09-24 23:03:14 +00:00
Steeve Morin
9b7d8fb58c bazel: rework zig_options to be config_settting compatible
zig_option can now take a `flag` dependency to expose existing flags or
`bool`, `int or `string` for config_setting flags
2026-09-24 22:21:44 +02:00
Louis Lechevalier
e2da790b1c
zml/moe: CuTe MoE mxfp4 backend (#853)
Introduces the CuTe mxfp4 moe backend. The kernels use the cute dsl and
are optimized (and so at the moment constraint to its shapes).
Introduces the cute launch host func and so the associated cuda dialect
in zml.
2026-09-24 13:12:08 +02:00
Raphael Nahoum
1e045ec017
mlir/dialects/cute_ir: carry the DSL compiler's CuTe dialects (#849)
The CuTe dialects no longer build on a git checkout with a private
overlay.

- Every operation, type, attribute and enum of the compiler's cute and
cute_nvgpu dialects is typed, with its documentation, operand
constraints, traits and result inference. Nothing is kept as an opaque
payload, and the compiler's IR round-trips through it unchanged.
- The definitions are generated following `REGENERATING.md`, from the
release's Python bindings and by probing the compiler.
- The C API and the Zig builders follow: atom types take their
parameters instead of a text payload, constrained integers are one type,
and pointers take an address space enum.
2026-09-23 17:54:37 +02:00
Damien Mehala
11d49d8bc5
zml/tokenizer: add normalizer support (#847)
Support normalization from HF JSON and typed normalizer sequences.

Changes:
   - Patch IREE memory ownership and chunk-boundary bugs
   - Add regression tests for IREE bugs.
2026-09-23 16:57:04 +02:00
Steeve Morin
63d8204be2
zml: add Platform.io_impl to enable threaded or zio at runtime (#841)
This enables runtime selection of the std.Io runtime. This also fixes
the compilation hangs by using zio.blockInPlace for CPU bound ops.

This may require some more `zio.blockInPlace`, so don't merge until
we're sure.
2026-09-21 18:59:29 +02:00
Steeve Morin
d60a11e2a2
zml: add support for zio (#821)
Add a [zio](https://github.com/lalinsky/zio) dependency.

We require ZML to be aware of which `std.Io` implementation it's running
because we use `threadlocal` to store the current `zml.Compiler`
instance when compiling a graph (to make the DSL pleasant to use).

This is our only `threadlocal` usage but it is one too much. So we must
make it compatible with `zio.TaskLocal`. Not a big deal, but this
requires opt-in from the user.

And so `zio` support can be opt-in enabled by setting the build flag
(default is `std`):
```
--@zml//zml:io_impl=zio
```

Sadly there is no `std.Io` response to `threadlocal` (or task local).
Hopefully this will be fixed in the future.

Note that this creates problem if using `std.Io.Evented`.
2026-09-16 22:27:34 +02:00
Steeve Morin
df3a43d29f
bazel: add zig_options rule (#820)
Introduce `zig_option` and `zig_options` rules to generate the bazel
equivalent of option modules plugged on bazel flags.

On `string` flags, if the flag has a `allowed_values`, the `string` is
converted into a `enum` in zig code.

Also, port platforms to this and remove the ugly `defines` hack to
comptime test for platforms enablement.

In the process, port `arocc` to the `zig_options`.
2026-09-16 21:50:22 +02:00
Raphael Nahoum
94257d3747
kernels/cute: Zig CuTe DSL and XLA custom call and bump xprof (#810)
Adds a Zig front end for NVIDIA's CuTe DSL, shaped after `cutlass.cute`,
plus the `__gpu$xla.gpu.cute` custom call that compiles and launches it
on CUDA.

- `mlir/dialects/cute_ir`: bindings for the `cute` and `cute_nvgpu`
dialects
- `zml.ops.cute`: emits the custom call with the textual module, `grid`
and `block`.
- `kernels/cute` + `zml.kernel.cute.Kernel`: builder, values, tensors
with coordinate `get`/`set`, thread/block indices, static smem, sync,
`scf`. See `kernels/cute/README.md`.
- bump `xprof-nightly`

---------

Co-authored-by: Steeve Morin <steeve@zml.ai>
2026-09-16 14:02:46 +02:00
Raphael Nahoum
b78c0f03d7
kernels/fly: FlyDSL Zig DSL (#799)
Adds a Zig front end for the FlyDSL dialect, so AMD GPU kernels can be
written in Zig alongside the existing Mosaic, Triton and tile ones, and
dispatched the same way.

Types and layouts are built through the dialect's own C entry points
rather than by printing and reparsing assembly. That holds in both
directions: host-side layout literals become attributes directly, and
anything the dialect computes is read back through typed accessors.

Launch geometry is derived from the device rather than hard-coded, so
the same kernels run on both AMD architecture families and the tests
stay architecture agnostic. Everything builds and tests on any host, no
GPU needed.

Also carries one unrelated cleanup, dropping a needless null terminator
from the Triton and tile kernel strings.
2026-09-14 09:57:36 +02:00
Raphael Nahoum
77e41879d3
zml/kernel: add a CUDA Tile IR (cuda_tile) Zig DSL (#779)
A third kernel language beside Triton and Mosaic TPU. It emits NVIDIA's
cuda_tile dialect and reaches the GPU through XLA's
`__gpu$xla.gpu.cuda_tile` custom call.

- `third_party/cuda_tile`: cuda-tile v13.3.3
- `mlir/dialects/cuda_tile`: every type and enum through the dialect's C
API, one constructor per op (all 100, in Ops.td order), and a small C
shim for the TileView interface the C API does not expose.
- `kernels/cuda_tile`: views, tokens, for/if/loop, reduce/scan (single
and variadic), atomics, MMA, every elementwise op.
- `zml.kernel.cuda_tile.Kernel` and `ops.cudaTile`: the custom call,
with a grid and no num_warps/num_stages (those are optimization_hints in
the IR).
2026-09-08 14:57:40 +02:00
Damien Mehala
e1e983c802
zml/moe: support Flashinfer cutlass MoE for sm 10.3 (#740)
Update flashinfer cutlass moe to retrieve sm103 compiled .so. 
Unpack forwardMoe abi by removing the Nvfp4Scales type.

---------

Co-authored-by: Louis Lechevalier <louis@zml.ai>
Co-authored-by: Corentin Godeau <corentin@zml.ai>
2026-09-01 16:11:57 +02:00
Louis Lechevalier
533afb8915
zml/moe: flashinfer nvfp4 x nvfp4 moe backend (#707)
This PR add the support of nvfp4 x nvfp4 moe backend on sm120 / sm100
(natively supported nvfp4 hardware). It :
- retrieves the released artifact cutlass moe flashinfer :
https://github.com/zml/flashinfer/releases/tag/cutlass-moe-v0.1.0
- loads the .so
- implements the nvfp4 x nvfp4 backend (added to existing triton and
mosaic tpu).
2026-08-20 11:51:32 +02:00
Guillaume Wenzek
4976dfbeb3
bazel: use github.com instead of codeberg.org as reference (#695) 2026-07-31 14:59:58 +02:00
Corentin Godeau
d57d851b63
zml: ground work to support Poolside's Laguna models (#669)
This PR contains two main changes:
* A patch for the tokenizer to support the tokenizer config file
* A temporary workaround to speed-up loading of the model when executing
arbitrary executable at load time
2026-07-20 13:31:54 +02:00
Kevin Barre
24165146b9
platform/intel: bump oneapi=2026.1 and rules_distroless=0.8.0 (#644)
# Bump intel oneapi and rules_distroless

The Debian package set is now also exposed separately through the
rules_distroless APT extension:

Now use `rules_distroless` to install the oneAPI packages in a
distroless container image.

So the platforms/oneapi/packages.lock.json file is now generated from
the platforms/oneapi/packages.yaml file, and the packages.yaml file is
now the source of truth for the oneAPI packages.

The MODULE.bazel contain rules_distroless patch
`third_party/rules_distroless/accept-nospace-version-constraints.patch`
because the rules_distroless APT extension does not support version
constraints with spaces, e.g. `>= 2023.2.0` is not supported, but
`>=2023.2.0` is supported.

A PR has been submitted to rules_distroless to fix this issue, but until
it is merged and released, the patch is needed in zml
https://github.com/bazel-contrib/rules_distroless/pull/229.

`_ROOT_MODULE_DIRECT_DEPS` does not need anymore to list the individual
oneAPI and Ubuntu package repositories.

`_ROOT_PACKAGES` is now in `_UBUNTU_PACKAGES` because all the package
share the same `_UBUNTU_STRIP_PREFIX`

## Tests

```
bazel run @apt_oneapi//:lock
```

```
ONEAPI_DEVICE_SELECTOR=level_zero:0 \
    bazel run  \
    --config=release  \
    --@zml//platforms:cpu=false  \
    --@zml//platforms:oneapi=true   \
    //examples/llm --  \
    --model=/var/models/meta-llama/Llama-3.1-8B-Instruct  \
    --topk=4  \
    --prompt="Tell me a story about evariste galois"
```

__-> decode 26.248s · 34.9tok/s__

```
ONEAPI_DEVICE_SELECTOR=level_zero:0,1 \
    bazel run  \
    --config=release  \
    --@zml//platforms:cpu=false  \
    --@zml//platforms:oneapi=true   \
    //examples/llm --  \
    --model=/var/models/meta-llama/Llama-3.1-8B-Instruct  \
    --topk=4  \
    --prompt="Tell me a story about evariste galois"
```

__-> decode 13.017s · 56.6tok/s__
2026-07-15 16:21:56 +02:00
David Zbarsky
3b5530833c
workspace: replace deprecated new_git_repository (#629)
## Summary

- replace the legacy `new_git_repository` alias with `git_repository`
for `arocc`, `libvaxis`, `linenoise`, and `translate-c`

## Why

`git_repository` is the canonical Bazel repository rule.
`new_git_repository` doesn't exist at bazel HEAD
2026-07-04 21:40:33 +02:00
Hugo Mano
833f42029d
platforms: bump cpu + cuda plugins and align xla (#626)
Related PR: https://github.com/zml/monorepo/pull/304
2026-07-03 14:22:23 +02:00
Corentin Godeau
51db372455
third_party/iree: bump iree tokenizer to 4d4e97d00f099a21f38eeff26f82a6d9e3643a11 (#624) 2026-07-02 15:46:02 +02:00
Corentin Godeau
001dbbbde8
zml/tokenizer: Have matching tokenizer output (#623)
The IREE tokenizer was not producing the same output as the HF
tokenizer, potentially degrading the performance of the models. I put a
clanker to the task (because the tokenizer is already full clanked).
Outputs are now matching without any performance drop.

I also fixed an edge case issue on the `Writer` of the tokenizer.
2026-07-02 12:26:27 +02:00
Corentin Kerisit
aa90f92832
workspace: bump to bazel 9.1.1 (#601)
A few missing loads
Remove all flipped flags or deperacted flags from .bazelrc

Important:
- Keep autoload rules_cc and rules_python because XLA still has
transitive deps that are missing loads, PR in progress.
2026-06-25 19:37:51 +02:00
Corentin Kerisit
f9ec63fd4e
workspace: Update to XLA @ 5e83525729fd21c4ad8d55073a3d047360d13f9c (#599)
Updates to latest XLA which added support for bazel 8.x workspace and
fixed a bunch of things that made bazel 9 impossible.

3 problematic changes with this bump:
- PJRT headers were again incompatible with translate-c so a patch is
made and PR has been done in XLA
- PJRT introduced a proper type fo PJRT_Error so I used the InnerMixin
pattern for those.
- //tsl/platform/default package force evaluates Label("@cuda_nvcc")
even for CPU builds and we don't have this repo. I commented for now
until I find a solution on XLA side.

Bumped a few deps necessary for this and additional llvm deps that are
now evaluated as part of the llvm-project graph on XLA side (llvm_zlib
and llvm_zstd).

Next will be to investigate bazel 9 for real.
2026-06-25 14:17:46 +02:00
elogir
f586cbfc3d
third_party/iree: match all added tokens (#591)
IREE's tokenizer only registered added tokens for pre-segmentation
matching if they were flagged special or normalized. Tokens that are
neither (e.g. <think> was dropped)

The fix is to match all added tokens
2026-06-23 09:16:21 +02:00
Corentin Kerisit
77711b949d
workspace: support zig-only local execution (#546)
This PR bumps rules_zig back to upstream/main where we now have all the
necessary
features to enable zig local actions while the reste on remote.

It also adds the necessary configurable to actually enable this.

Additionally, since rules_zig now ships ZLS support, we remove zls
entirely from zml.

### How the Bazel resolution works

Bazel resolves execution platforms and toolchains during analysis for
each
target that requires toolchains. If a rule defines exe, resolution
happens separately for the default target execution group and for each
`exec_group`;
actions assigned to an exec group use that group’s selected execution
platform
and toolchains.

Execution platforms come from an ordered set. In this repository’s
remote
configuration, the relevant order is:

1. `//:rbe_platform`, supplied by
`--extra_execution_platforms=@zml//:rbe_platform`
2. `//bazel/zig_toolchain_config:local_execution_platform`, registered
by this PR
3. the host platform, included automatically by Bazel

Earlier platforms are selected when they can satisfy the requested
toolchains.

For each target or exec group, Bazel takes the required toolchain types,
the
target platform, the ordered execution platforms, and the ordered
registered
toolchains. It filters execution platforms by execution constraints,
then tries
to find a matching toolchain for every required toolchain type. A
toolchain
matches when:

- its `exec_compatible_with` constraints are present on the candidate
execution
platform
- its `target_compatible_with` constraints are present on the target
platform
- its `target_settings` match the current configuration

Any execution platform missing a required toolchain is rejected. The
first
remaining execution platform wins, and the first matching toolchain for
each type
is selected.

### How this makes Zig local-only

This PR defines a custom execution constraint:

- `//bazel/zig_toolchain_config:local_zig_execution`

It then defines a host-derived execution platform:

- `//bazel/zig_toolchain_config:local_execution_platform`

That platform inherits the host OS/CPU constraints from
`@platforms//host`, adds
`local_zig_execution`, and sets:

```starlark
exec_properties = {
    "no-remote-exec": "1",
}
```

The zig.toolchain(...) module extension call now passes:

extra_exec_compatible_with =
["//bazel/zig_toolchain_config:local_zig_execution"]

rules_zig appends that extra execution constraint to every generated Zig
SDK
toolchain. As a result, when rules_zig resolves
@rules_zig//zig:toolchain_type
for its zig execution group:

- the remote execution platform is considered first, but it does not
have
local_zig_execution, so it cannot match the Zig SDK toolchain
- the custom local execution platform has both the host OS/CPU
constraints and
local_zig_execution, so it matches
- the selected platform carries no-remote-exec, so Zig actions execute
locally
even in remote builds

Other toolchains are not constrained by local_zig_execution, so they can
continue
to resolve to the remote execution platform first. This keeps the build
remote by
default while carving out Zig actions as local-only.

---------

Co-authored-by: Steeve Morin <steeve@zml.ai>
2026-05-20 16:13:59 +02:00
Corentin Kerisit
55474ea31f
zls: resolve translate-c toolchain in zls rules (#538)
This one slipped from #537 

It worked because if there is no translate-c toolchain, zig uses zig
translate-c.
But we want to respect user choice here too.
2026-05-16 09:58:34 +02:00
Corentin Kerisit
886d9000be
workspace: use latest version of upstreamable rules_zig (#537)
The upstreamable branch now contains only 2 minor commits. Everything
else inccluding test-obj, translatec and bootstrap have been upstreamed.
2026-05-15 21:01:50 +02:00
loupicaaa
dd0ab6c334
zml/moe : Moe backend triton zig, qwen3_5_moe model (#529)
### Overview
Context: Modern models utilize a MLP called Mixture of Experts (MoE). In
a MoE, the MLP is organized into "experts," where specific sub-tensors
are specialized to process particular linguistic patterns or elements.
During inference, the hidden states of each token are routed to the most
relevant experts, ensuring that matrix multiplications (matmul) are
performed only on the active parameters.

Problem: Due to the sparse and dynamic nature of MoE where token
assignment is determined at runtime via routing, treating an MoE layer
as a standard matmul results in significant performance degradation.
Standard kernels are not optimized for the irregular memory access
patterns in sparse routing.

Approach: MoE is implemented as a primitive in the ZML operation set.
The generic MoE Backend is designed to support various specialized
kernels tailored to specific hardware and weight precisions. The primary
implementation currently features a Triton MoE backend optimized for
NVIDIA Hopper architecture using BF16 and FP8 weights. This
implementation is utilized in the Qwen 3.5 MoE model.

### Features
**Generic MoE Backend (zml/moe/moe.zig)**
- Integrate specialized MoE backends (e.g., Triton).
- Select the optimal backend based on hardware and precision.
- Implements essential utilities and structures for registration,
parameter loading, and metadata management.
- The forwardMoe() function acts as the entry point to invoke the
appropriate backend.

**Triton MoE Backend (zml/moe/triton.zig)**
- Generates TTIR (Triton Intermediate Representation) at compile time.
- Leverages Triton's custom calls exposed via XLA.
Execution Flow:
1. Select the optimal configuration for the fused MoE kernel.
2. Determine token distribution: use naive assignment if the
distribution is sparse; otherwise, sort and align tokens for efficiency.
3. Quantization: quantize activations if using FP8 weights.
4. Fused Kernel: execute the fused MoE kernel for the gate and
up-projection layers.
5. Post-Processing: split the output and apply the activation function.
6. Quantization : re-quantize activations for the next stage if required
by the FP8 path.
7. Fused Kernel: execute the fused MoE kernel for the down-projection
layer.
8. Aggregation: sum the Top-K results for each token.

Qwen 3.5 MoE
- Fully utilizes the Triton MoE backend.
- BF16 weights implementation (also tested with FP8 but not implemented
here)

---------

Co-authored-by: loupicaaa <louis@zml.ai>
Co-authored-by: Raphael NAHOUM <raphael@zml.ai>
2026-05-15 11:06:02 +02:00
Steeve Morin
c8cc476042 third_party/zls: adapt to rules_zig changes
notably when using with_cfg targets
2026-05-13 11:35:34 +00:00
Corentin Kerisit
e67f60fe25
workspace: remove custom registry (#531)
Unused and noisy
2026-05-12 10:32:51 +02:00
Corentin Kerisit
31887689a9
workspace: add several bazel 9 required changed (#530)
Just a few stuff to get us closer to Bazel 9
XLA is the main blocker and i'll tackle this as soon as other
dependencies merge my PRs.
2026-05-12 10:27:18 +02:00
Hugo Mano
13cee57bf2
zml/profiling: unify profiling flow and tracing (#443)
This PR modernizes ZML profiling in four areas:

- replaces the old C++ `xspace_to_perfetto` tool with a native Zig
exporter built on upb
- integrates trace export directly into `zml/profiler.zig`
- introduces a scoped tracing API in `zml.tracer` and wires it through
examples
- adds platform-specific annotation support and Bazel-native profiler
wrappers for CUDA and ROCm

The result is a simpler profiling flow, better large-trace behavior, and
a more consistent experience across Linux CUDA, Linux ROCm, and macOS.
2026-05-11 09:52:11 +02:00
elogir
8e4c333007
zml: replace Python Triton/Mosaic IR generation with native Zig DSLs (#517)
Drops the Python build-time dependency for Triton and Mosaic TPU
kernels. ZML now emits TTIR and Mosaic TPU IR directly from Zig, against
the same MLIR context as the rest of the compiler. So no more JAX,
Triton at build time and a lighter sandbox.

Split into two commits:

- **`c72f44884` — Add Triton and Mosaic Zig DSL.** Additive: IR builders
(`kernels/triton/`, `kernels/mosaic_tpu/`), upstream dialect bindings
(`ttir`, `mosaic_tpu`, plus `arith`/`scf`/`math`/`memref`/`vector`/
`affine`/`cf`), and the high-level
`zml.kernel.{triton,mosaic_tpu}.Kernel(Config, spec)` declarative form.
Comes with author guides in each `README.md`.

- **`cb61e529f` — Remove Python and replace with Zig kernels.** Migrates
the two production kernels (`unified_attention` for Triton,
`ragged_paged` for Mosaic TPU) and deletes everything Python related in
the sandbox and what was generating the IR.

---------

Co-authored-by: Steeve Morin <steeve@zml.ai>
2026-04-30 16:13:48 +02:00
Kevin Barre
0fd551e4d5
zml/zls: Add compatibility for aarch64-linux platform in zls_toolchain (#508) 2026-04-28 09:32:40 +02:00
Corentin Kerisit
241aaf7d3b
platforms/cuda: add arm64 support (#493)
Co-authored-by: Steeve Morin <steeve@zml.ai>
2026-04-22 12:37:48 +02:00
Benjamin Rabier
c1a902b131
workspace/xla: update to nightly-2026-04-20 (#485) 2026-04-20 17:16:45 +02:00
Benjamin Rabier
df86cdfd96
zml/tokenizer/iree: Improve IREE tokenizer with upstream fix (#482)
I've reworked the Tokenizer API to actually work with all tokenizers and
not just IREE and moved the `Writer` part into the IREE tokenizer. I'm
now avoiding intermediate copies as much as possible now.

I'm also more defensive now to avoid the same infinite loop and put more
effort into providing appropriate output buffers to IREE. It fails with
empty output buffers and may return a `ResourceExhausted` if it's too
small. Also added a bunch of tests.

IREE tokenizer itself had a bug which I fixed here
https://github.com/iree-org/iree/pull/24150. In the meantime, I'm
pointing bazel to our fork.
2026-04-20 11:15:37 +02:00
Corentin Kerisit
bd66cfa1f3
Update ZLS to 0.16.0 and rules_zig new providers (#483)
Bump rules_zig to latest zig_toolchain changes (for bootstrap)
Bump ZLS to 0.16.0
Amend ZLS completion rules and runners to match rules_zig new providers
2026-04-17 13:42:37 +02:00
Hugo Mano
8b12d2ef1e
bazel: make repo-wide cquery work across host and linux target analysis (#465)
This PR fixes several Bazel analysis regressions so both of these
commands work reliably:

- `bazel cquery //...`
- `bazel cquery --platforms=@zml//platforms:linux_amd64 //...`

After recent changes and the rebase, repo-wide cquery was failing for
three separate reasons:

- ZLS toolchains were over-constrained by target platform: updated ZLS
toolchain registration to constrain only the exec platform.
This avoids cross-target analysis failures when host-side completion
tooling is analyzed under a foreign target platform.
- OCI packaging targets were analyzed on host platforms where their base
images do not apply: marked Linux OCI image targets as Linux x86_64
compatible only. Also switched the Debian base image pull from Docker
Hub to the GCR mirror to avoid CI fetch failures when resolving
packaging images manifests due to rate limiting
- Triton Python deps were fetched for the host Python platform instead
of the Linux wheel platform the lockfile was generated for: restored
Linux x86_64 wheel resolution for `triton_py_deps` in `MODULE.bazel`.
This prevents macOS host analysis from attempting to fetch a
`triton==3.6.0` wheel for an unsupported host platform.


Also added a step in ci to prevent regression
2026-04-17 11:48:09 +02:00
Steeve Morin
185e75f884 workspace: bump zig=0.16.0
also bump translate-c and remove a genrule in arocc
2026-04-15 21:42:47 +02:00