Skip to content

Commit e752ddb

Browse files
committed
Make Metal non-optional on macOS and test it on an M1 GPU
Signed-off-by: Lukasz Stafiniak <lukstafi@gmail.com>
1 parent e3497ad commit e752ddb

File tree

3 files changed

+26
-4
lines changed

3 files changed

+26
-4
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,24 @@ jobs:
3535
- run: opam install . -y --deps-only --with-test --with-doc
3636
- run: opam exec -- dune build
3737
- run: opam exec -- dune runtest
38+
39+
test-metal:
40+
name: Test Metal Backend
41+
runs-on: macos-13-xlarge
42+
steps:
43+
- name: Set git to use LF
44+
run: |
45+
git config --global core.autocrlf false
46+
git config --global core.eol lf
47+
git config --global core.ignorecase false
48+
- uses: actions/checkout@v4
49+
- uses: ocaml/setup-ocaml@v3
50+
with:
51+
ocaml-compiler: 5.3.x
52+
dune-cache: true
53+
allow-prerelease-opam: true
54+
- run: opam pin -n .
55+
- run: opam install . -y --deps-only --with-test
56+
- run: opam exec -- dune build
57+
- name: Run tests with Metal backend
58+
run: OCANNL_BACKEND=metal opam exec -- dune runtest

arrayjit.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ depends: [
3333
"ppx_variants_conv"
3434
"ppx_expect"
3535
"ppx_minidebug" {>= "2.2.0"}
36+
"metal" {os = "macos"}
3637
"odoc" {with-doc}
3738
]
3839
depopts: [
3940
"cudajit" {>= "0.7.0"}
4041
"gccjit" {>= "0.3.2"}
41-
"metal"
4242
]
4343
conflicts: [
4444
"cudajit" {< "0.7.0"}

dune-project

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,14 @@
6161
ppx_variants_conv
6262
ppx_expect
6363
(ppx_minidebug
64-
(>= 2.2.0)))
64+
(>= 2.2.0))
65+
(metal
66+
(= :os macos)))
6567
(depopts
6668
(cudajit
6769
(>= 0.7.0))
6870
(gccjit
69-
(>= 0.3.2))
70-
metal)
71+
(>= 0.3.2)))
7172
(conflicts
7273
(cudajit
7374
(< 0.7.0))

0 commit comments

Comments
 (0)