Skip to content

Commit 13d8461

Browse files
committed
zml: initial release
0 parents  commit 13d8461

File tree

228 files changed

+47341
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

228 files changed

+47341
-0
lines changed

.bazelignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
examples/.bazelignore

.bazelrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
examples/.bazelrc

.bazelrc-examples

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
common --override_module=zml=../
2+
common --registry=file://%workspace%/../third_party/

.bazelrc-zml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
common --override_module=zml=./
2+
common --registry=file://%workspace%/third_party/

.bazelversion

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
examples/.bazelversion

.github/runs-on.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
images:
2+
ubuntu24-amd64:
3+
platform: "linux"
4+
arch: "amd64"
5+
ami: "ami-04a92520784b93e73"
6+
preinstall: |
7+
#!/bin/bash
8+
wget https://github.com/jbdalido/bazel-remote/releases/download/test/bazel-remote -O /usr/local/bin/bzlcache
9+
chmod +x /usr/local/bin/bzlcache
10+
echo "Run bazel cache"
11+
systemd-run --property=Restart=always /usr/local/bin/bzlcache --max_size=1000 --grpc_address 127.0.0.1:15501 --dir=/tmp/cache --s3.region eu-west-3 --s3.bucket runs-on-s3bucketcache-jycgicewbssh --s3.auth_method iam_role --s3.prefix cache --s3.endpoint=s3.eu-west-3.amazonaws.com --storage_mode uncompressed

.github/workflows/commit.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: commit
2+
on:
3+
push:
4+
branches:
5+
- master
6+
tags:
7+
- '*'
8+
pull_request:
9+
10+
env:
11+
ZIG_VERSION: 0.13.0
12+
BAZELISK_VERSION: 1.20.0
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
16+
cancel-in-progress: ${{ !contains(github.ref, 'master')}}
17+
18+
jobs:
19+
test:
20+
runs-on: ["runs-on","runner=4cpu-linux-x64", "image=ubuntu24-amd64", "run-id=${{ github.run_id }}"]
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Zig
26+
uses: goto-bus-stop/setup-zig@v2
27+
with:
28+
version: ${{ env.ZIG_VERSION }}
29+
30+
- name: Format
31+
run: zig fmt --check *.zig zml/ examples/ async/ mlir/ pjrt/
32+
33+
- name: No Autofix
34+
run: bash -c 'grep "// autofix" zml/**/*.zig ; [ 1 -eq $? ]'
35+
36+
- name: Setup Bazel
37+
run: |
38+
wget https://github.com/bazelbuild/bazelisk/releases/download/v${{ env.BAZELISK_VERSION }}/bazelisk-linux-amd64 -O ~/bin/bazel
39+
chmod +x ~/bin/bazel
40+
41+
- name: Tests
42+
run: |
43+
export PATH=$PATH:~/bin
44+
bazel test --remote_cache=grpc://127.0.0.1:15501 //zml:test --test_output=streamed

.gitignore

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Bazel symlinks
2+
bazel-*
3+
4+
# macOS
5+
.DS_Store
6+
7+
# Local Checkouts
8+
/stablehlo/
9+
/llvm-project/
10+
/xla/
11+
12+
# Just in case, Zig caches
13+
.zig-cache/
14+
zig-out/
15+
16+
# Models
17+
*.safetensors
18+
*.pb
19+
*.trace.json
20+
*.pt
21+
*.bin
22+
23+
# Data files
24+
*.wav
25+
*.ecdc
26+
.venv
27+
28+
# Editor specific
29+
## Neovim
30+
.nvim.local.lua

.nvim.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
examples/.nvim.lua

.vscode

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
examples/.vscode

0 commit comments

Comments
 (0)