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

36 commits

Author SHA1 Message Date
James Deal
55c4a9a6a7 Executable level compiled Operation/function caching 2025-08-29 00:23:11 -05:00
James Deal
53934139c9 Working Llama on MLX Plugin 2025-07-23 15:14:28 -05:00
James Deal
408300a70c Update vendored xla mlx plugin to latest 2025-07-15 23:59:21 -05:00
James Deal
1d6ffc5a18 Vendor Plugin performance fixes 2025-06-16 23:49:08 -05:00
James Deal
4a36b961fa Works to compile llama; pending optimization 2025-06-04 23:31:47 -05:00
James Deal
07e0e0fe69 Fix unit tests; WIP debug llama 2025-06-04 00:13:53 -05:00
James Deal
7e209d3174 Optimize scatter/pad implementations; fix argsort 2025-06-02 20:28:08 -05:00
James Deal
802e5ca7ef Optimize stablehlo::gather implementation via batched indice calculation 2025-06-02 20:28:08 -05:00
James Deal
ae770c802e Fix failing tests for slice, meshgrid, cartesianProduct 2025-06-02 20:28:08 -05:00
James Deal
74fae48bf8 Clean up test output; comment failing tests as TODOs 2025-06-02 20:28:08 -05:00
James Deal
3796132f5a Runtimes: (WIP) MLX PjRt Plugin
Update plugin implementation to latest ZML
2025-06-02 20:28:08 -05:00
Hugo Mano
bde41243bc
workspace: bump xla to version 20250527.0-cb67f2f (#238)
third_party/modules/xla: refactor XLA module extensions
ci: disable failing cache temporarily

XLA diff:
71c67e2a4f...cb67f2f7ce

---------

Co-authored-by: Steeve Morin <steeve@zml.ai>
2025-06-02 21:44:39 +02:00
Steeve Morin
a566e396d2
workspace: add debug/release configurations and various stdx (#234)
This PR bumps rules_zig to add command line to the zig compilation in
order to enable debug and release configs from the bazel command line
(and bazelrc).

Most notably, this is useful for passing `-mcpu` flags to Zig
(especially for SIMD support like AVX512).

While we're there, add `stdx.time.Duration.hz()` and
`stdx.math.roundeven()`.
2025-05-19 21:26:28 +02:00
Steeve Morin
7ccfeaf524
workspace: various fixes and bumps (#229)
This PR add various fixes and bumps in the workspace, notably to prevent
dual builds for LLVM tools.
2025-04-22 16:12:26 +02:00
Guillaume Wenzek
7db76fdaeb
pjrt: add ffi bindings for custom calls (#223)
---------

Co-authored-by: Hugo Mano <hugo@zml.ai>
Co-authored-by: Corentin Kerisit <corentin.kerisit@gmail.com>
2025-04-08 16:28:39 +02:00
Steeve Morin
e0336dc9b3
workspace: fetch llvm, stablehlo and triton from xla, bump XLA (#206)
This enables making sure versions are the same across the board.

Also, import `triton` repo for later use.

---------

Co-authored-by: Hugo Mano <hugo@zml.ai>
2025-03-19 10:00:27 +01:00
Steeve Morin
a93c7631e5
workspace,third_party/rules_zig: minor fixes for zls+zig 0.14.0 (#200)
ZLS now requires `--version` to be the first param, account for that.

Also, added missing keys to the BuildConfig object used for code
completion.
2025-03-14 13:42:10 +01:00
Guillaume Wenzek
a85b53fba0
zig 0.14.0 (#189)
Co-authored-by: Hugo Mano <hugo@zml.ai>
2025-03-14 09:49:23 +01:00
Steeve Morin
cb1010948b
workspace: bump to libxev=20250222.0-07bcffa (#197)
This introduces `Dynamic`, which will switch between IO Uring and Epoll
in linux depending on availablity.
2025-03-03 16:46:34 +01:00
Hugo Mano
d712ab7534
workspace: fix libxev version (#195) 2025-02-21 12:48:00 +01:00
Corentin Kerisit
44b74dea40
workspace: fix mistakes in modules bumps (#191)
Fix missing = in stbalehlo integrity.
Changes back - by . in xla module name and folders.
Correctly depend on `xla@20250204.1-6789523`
2025-02-18 15:54:56 +01:00
Corentin Kerisit
9227fc9ad4
stablehlo: bump to head and use new dialect capi (#190)
This drastically reduce the number of build steps (from 3589 to 2553 steps)
2025-02-17 18:43:07 +01:00
Hugo Mano
ceec8a8c9a
workspace: bump xla to version 20250204.0-6789523 (#184)
Also improves Bazel 8 compatibility

---------

Co-authored-by: Corentin Kerisit <corentin.kerisit@gmail.com>
2025-02-07 15:36:15 +01:00
Steeve Morin
cbd9e50a79
workspace: bump libxev to 20252401.0-31eed4e (#182)
Includes:
- https://github.com/mitchellh/libxev/pull/128
- https://github.com/mitchellh/libxev/pull/141
2025-02-05 13:40:03 +01:00
Jean-Baptiste Dalido
3682e16da9
workspace: upgrade to Bazel 8 (#143)
This PR covers the migration to Bazel 8.

---------

Co-authored-by: Hugo Mano <hugo@zml.ai>
2025-01-23 18:36:57 +01:00
Hugo Mano
acce597ae9
workspace: bump xla to version 20250122.0-cc075be (#159)
* Bump XLA to 20250122.0-cc075be
* Use nvptx compiler and nvlink with nvjitlink support
* Warn user if cuda path detected in LD_LIBRARY_PATH
* Revert CUDA sandbox fix added here: 6d67fcf and fixed by openxla/xla@a04b262
2025-01-23 16:37:39 +01:00
Steeve Morin
9cc0f96a7a
third_party: bump libxev epoll patch (#156)
This should fix crash and hangs in the epoll and kqueue implementations.
2025-01-20 14:48:29 +01:00
Steeve Morin
f228ec2edc
async: fix async hangs (#154)
Rework the libxev epoll backend to play nice with zigcoro based
scheduler.

In the process, load the PJRT plugins using `callBlocking` because it
can a bit slow sometimes.

Should have a slight performance increase, too.
2025-01-18 00:50:51 +01:00
Steeve Morin
6d67fcf399
async,runtimes: bump rocm, fixe cuda and rocm sandboxes, bump libxev (#153)
This PR is a collection of fixes related to CUDA and ROCm sandbox
discovery.

In the process, update the epoll libxev patch which caused 100% CPU on
linux.

While fixing CUDA add `xla_gpu_enable_latency_hiding_scheduler` as per
NVIDIA's recommendations.

Finally, bump cuDNN to 9.6.0 while we're here.

---------

Co-authored-by: Corentin Godeau <corentin@zml.ai>
2025-01-16 01:11:36 +01:00
Hugo Mano
80ec28f3c7
workspace: bump llvm / xla / stablehlo / pjrt plugins xla@20250103.0-5f1fe6a (#141) 2025-01-06 15:06:52 +01:00
Hugo Mano
d366f00aed
workspace: bump llvm / xla / stablehlo / pjrt plugins and restore disabled tests xla@4663f04 (#98)
- workspace: new module versions added to Bazel registry:
  - deps/xla: 4663f04d26 (20241025.0-4663f04) 
This version introduces an upgraded overlay with Python repository initialization for the TSL extension. The changes were necessitated by this XLA commit: 19b4ecbe98 (diff-df5471accc) , which triggers a repository call. Python's hermetic version is provided via the .bazelrc file.
  - deps/stablehlo: f7f8e4e352 (20241021.0-1c0b606)  
  - deps/llvm: f7f8e4e352 (20241022.0-6c4267f)
 This version includes an upgraded module declaration with rules_python dependency added, as LLVM prepares its overlay for Bazel v8. Relevant LLVM changes here: 3903cb4695
  - deps/runtimes: use PJRT artifacts v3.0.0 (https://github.com/zml/pjrt-artifacts/releases/tag/v3.0.0)
- workspace: align used versions of rules_zig in the Bazel dependency graph
- pjrt: expose getPluginAttributes and getPluginAttribute private APIs and stablehloCurrentVersion public API
- pjrt: updated customCallRegistry function with the new FFI provided by the PJRT API GPU extension 
Minimal support for this feature was added, as this is not the main focus of the current PR. See related changes in XLA here: ef85a7bcc3
- dialects/mlir/stablehlo: expose getCurrentVersion API and fix broken stablehloVersionFromCompatibilityRequirement API
- zml/pjrtx: serialize IR to the PJRT plugin's supported HLO version. If the plugin attribute is unavailable, it falls back to the StableHLO's compatibility requirement version.
- zml/tensor: tests using batching dims for gather and scatter are now re-enabled
2024-11-25 15:53:25 +01:00
Steeve Morin
db88158518
async: rework async runtime to use coroutines and cross thread signaling (#100)
This mostly reworks the runtime to enable proper cross thread signaling
for `callBlocking`.

API changes include:
- `async_ -> asyncc`
- `await_ -> awaitt`
- proper type inference for non generic arguments even for generic
functions
- bump `libxev`
- use `epoll` on linux by default (can be comptime overridden through
`xev_options.linux_backend` in the root module)

Mostly, also, it's pretty fast.
2024-11-22 17:56:22 +01:00
Corentin Godeau
56c77707ac
third_party/modules/zig-protobuf: revert indentation changes (#94)
This was breaking old branches that didn't have these indentation
changes
2024-11-19 15:09:22 +01:00
James Deal
0ea2e65419
PJRT: Profiling Output to JSON (#79)
Implements conversion of PJRT protobuf profiling output to JSON format.
2024-11-18 11:32:42 -06:00
Guillaume Wenzek
1c7d7dacef
workspace: bump xla to enabled batching in gather (#21)
Since we were using an "old" version of XLA we where missing the
batching dims stablehlo attribute.
This was preventing the usage of batching in the gather operator.

Since I had already wrote the batching test before hand and was just
ignoring the compilation error,
this PR just bump xla and remove the error suppression code in tests.
2024-09-24 09:40:55 +02:00
Steeve Morin
13d84615bb zml: initial release 2024-09-17 11:11:18 +02:00