Skip to content

Commit 915d3fd

Browse files
committed
Merge branch 'main' into jm/make_mlir_fn
2 parents d9f8bc7 + 409fdf7 commit 915d3fd

File tree

190 files changed

+15208
-6277
lines changed

Some content is hidden

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

190 files changed

+15208
-6277
lines changed

.buildkite/pipeline.yml

Lines changed: 29 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -48,94 +48,47 @@ steps:
4848
if: build.message !~ /\[skip tests\]/
4949
timeout_in_minutes: 120
5050

51-
# - group: ":racehorse: Benchmarks"
52-
# steps:
53-
# - label: "CPU: Run Benchmarks"
54-
# plugins:
55-
# - JuliaCI/julia#v1:
56-
# version: "1"
57-
# command: |
58-
# julia --project=benchmark -e 'println("--- :julia: Instantiating project")
59-
# using Pkg
60-
# Pkg.develop([PackageSpec(path=pwd()), PackageSpec(path="lib/ReactantCore")])'
61-
62-
# julia --project=benchmark -e 'println("--- :julia: Run Benchmarks")
63-
# include("benchmark/runbenchmarks.jl")'
64-
# artifact_paths:
65-
# - "benchmark/results/*"
66-
# agents:
67-
# # Models are quite large so we need a decent sized machine. Don't tell Chris we
68-
# # are stealing SciMLBenchmarks machine :P
69-
# queue: "juliaecosystem"
70-
# sandbox_capable: true
71-
# exclusive: true
72-
# arch: "x86_64"
73-
# env:
74-
# BENCHMARK_GROUP: CPU
75-
# JULIA_NUM_THREADS: "auto"
76-
# timeout_in_minutes: 120
77-
78-
# - label: "CUDA: Run Benchmarks"
79-
# plugins:
80-
# - JuliaCI/julia#v1:
81-
# version: "1"
82-
# command: |
83-
# julia --project=benchmark -e 'println("--- :julia: Instantiating project")
84-
# using Pkg
85-
# Pkg.develop([PackageSpec(path=pwd()), PackageSpec(path="lib/ReactantCore")])'
86-
87-
# julia --project=benchmark -e 'println("--- :julia: Run Benchmarks")
88-
# include("benchmark/runbenchmarks.jl")'
89-
# artifact_paths:
90-
# - "benchmark/results/*"
91-
# agents:
92-
# queue: "benchmark"
93-
# gpu: "rtx4070"
94-
# cuda: "*"
95-
# env:
96-
# BENCHMARK_GROUP: CUDA
97-
# JULIA_NUM_THREADS: "auto"
98-
# timeout_in_minutes: 120
99-
100-
# - wait: ~
101-
# continue_on_failure: true
102-
103-
# - label: "Combine benchmarks"
104-
# plugins:
105-
# - JuliaCI/julia#v1:
106-
# version: "1"
107-
# command: |
108-
# buildkite-agent artifact download "benchmark/results/*" .
109-
110-
# julia -e 'println("--- :julia: Instantiating project")
111-
# using Pkg
112-
# Pkg.add("BenchmarkTools")
113-
114-
# println("--- :julia: Combining Benchmarks")
115-
# include("benchmark/aggregate.jl")'
116-
# artifact_paths:
117-
# - "benchmark/results/combinedbenchmarks.json"
118-
# agents:
119-
# queue: "juliagpu"
120-
# timeout_in_minutes: 10
121-
122-
# - label: "AMDGPU Julia v{{matrix.version}}"
51+
# - label: ":julia: :linux: AMDGPU Julia v{{matrix.version}} -- {{matrix.group}} -- {{matrix.runtime}}"
12352
# matrix:
12453
# setup:
12554
# version:
12655
# - "1.10"
56+
# group:
57+
# - core
58+
# - neural_networks
59+
# - integration
60+
# runtime:
61+
# - "IFRT"
12762
# plugins:
12863
# - JuliaCI/julia#v1:
12964
# version: "{{matrix.version}}"
130-
# - JuliaCI/julia-test#v1:
131-
# test_args: "--gpu"
13265
# - JuliaCI/julia-coverage#v1:
13366
# codecov: true
13467
# dirs:
13568
# - src
13669
# - ext
70+
# - lib/ReactantCore/src
13771
# agents:
13872
# queue: "juliagpu"
13973
# rocm: "*"
140-
# if: build.message !~ /\[skip tests\]/
141-
# timeout_in_minutes: 60
74+
# commands: |
75+
# touch LocalPreferences.toml
76+
77+
# echo "[Reactant]" >> LocalPreferences.toml
78+
# echo "xla_runtime = \"{{matrix.runtime}}\"" >> LocalPreferences.toml
79+
80+
# cat LocalPreferences.toml
81+
82+
# julia --project=. -e 'println("--- :julia: Instantiating project")
83+
# using Pkg
84+
# Pkg.develop([PackageSpec(path="lib/ReactantCore")])'
85+
86+
# julia --project=. -e 'println("--- :julia: Run Tests")
87+
# using Pkg
88+
# Pkg.test(; coverage="user")'
89+
# env:
90+
# REACTANT_TEST_GROUP: "{{matrix.group}}"
91+
# JULIA_DEBUG: "Reactant,Reactant_jll"
92+
# CUDA_VISIBLE_DEVICES: 0
93+
# if: build.message !~ /\[skip tests\]/
94+
# timeout_in_minutes: 120

.codecov.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ignore:
2+
- "src/mlir/Dialects"
3+
- "src/mlir/libMLIR_h.jl"

.github/workflows/CI-localjll.yml

Lines changed: 13 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
branches:
1010
- main
1111
- release-*
12-
tags: '*'
12+
tags: ['*']
1313
paths:
1414
- '.github/workflows/CI-localjll.yml'
1515
- 'deps/**'
@@ -21,133 +21,23 @@ concurrency:
2121
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
2222

2323
jobs:
24-
test:
25-
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - local libReactant - ${{ github.event_name }}
26-
runs-on: ${{ matrix.os }}
24+
test-localjll:
2725
strategy:
2826
fail-fast: false
2927
matrix:
3028
version:
31-
- '1.10'
32-
- '1.11'
29+
- "1.10"
30+
- "1.11"
3331
os:
34-
- ubuntu-24.04
32+
- linux-x86-n2-32
3533
- macOS-latest
3634
exclude:
3735
- os: macOS-latest
38-
version: '1.10'
39-
env:
40-
TMPDIR: ${{ github.workspace }}/tmp
41-
steps:
42-
- name: Free Disk Space
43-
uses: jlumbroso/free-disk-space@main
44-
with:
45-
tool-cache: false
46-
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
47-
- name: Clean `/opt`
48-
run: sudo rm -rf /opt/*
49-
- uses: actions/checkout@v4
50-
- name: Create TMPDIR
51-
run: |
52-
mkdir -p ${{ env.TMPDIR }}
53-
- uses: julia-actions/setup-julia@v2
54-
with:
55-
version: ${{ matrix.version }}
56-
- uses: julia-actions/cache@v2
57-
- uses: bazel-contrib/[email protected]
58-
name: Set up Bazel
59-
with:
60-
# Avoid downloading Bazel every time.
61-
bazelisk-cache: true
62-
# Store build cache per workflow.
63-
disk-cache: ${{ github.workflow }}-${{ matrix.os }}-${{ matrix.version }}
64-
# Share repository cache between workflows.
65-
repository-cache: true
66-
bazelisk-version: 1.x
67-
- name: Prepare build on macOS
68-
if: ${{ startsWith(matrix.os, 'macOS-') }}
69-
run: |
70-
echo "SDKROOT=$(xcrun --show-sdk-path)" >> "${GITHUB_ENV}"
71-
- name: Build libReactant
72-
run: |
73-
python -m pip install numpy
74-
julia --color=yes --project=deps -e 'using Pkg; Pkg.instantiate()'
75-
julia --color=yes --project=deps deps/build_local.jl
76-
cp LocalPreferences.toml test/
77-
- name: "Setup Runtime Preferences"
78-
run: |
79-
import Pkg
80-
Pkg.Registry.update()
81-
Pkg.instantiate()
82-
using Preferences
83-
Preferences.set_preferences!("Reactant", "xla_runtime" => "PJRT"; force=true)
84-
shell: julia --color=yes --code-coverage=user --depwarn=yes --project=. {0}
85-
env:
86-
JULIA_PKG_PRECOMPILE_AUTO: 0
87-
- name: "Install Dependencies"
88-
run: |
89-
import Pkg
90-
Pkg.Registry.update()
91-
# Install packages present in subdirectories
92-
dev_pks = Pkg.PackageSpec[]
93-
for path in ("lib/ReactantCore",)
94-
push!(dev_pks, Pkg.PackageSpec(; path))
95-
end
96-
Pkg.develop(dev_pks)
97-
shell: julia --color=yes --code-coverage=user --depwarn=yes --project=. {0}
98-
# Only in Julia v1.10 we need to install `ReactantCore` manually.
99-
if: ${{ matrix.version == '1.10' }}
100-
env:
101-
JULIA_PKG_SERVER_REGISTRY_PREFERENCE: eager
102-
- name: "Run Tests: PJRT"
103-
run: |
104-
import Pkg
105-
Pkg.Registry.update()
106-
Pkg.test(; coverage="user")
107-
shell: julia --color=yes --code-coverage=user --depwarn=yes --project=. {0}
108-
env:
109-
JULIA_PKG_SERVER_REGISTRY_PREFERENCE: eager
110-
XLA_FLAGS: "--xla_force_host_platform_device_count=12"
111-
JULIA_DEBUG: "Reactant,Reactant_jll"
112-
- name: Upload MLIR modules (PJRT)
113-
uses: actions/upload-artifact@v4
114-
timeout-minutes: 10
115-
if: ${{ always() }}
116-
with:
117-
name: "mlir-localjll-PJRT-${{ matrix.version }}-${{ matrix.os }}-${{ github.event_name }}"
118-
path: "**/*.mlir"
119-
retention-days: 90
120-
overwrite: false
121-
- name: "Setup Runtime Preferences"
122-
run: |
123-
import Pkg
124-
Pkg.Registry.update()
125-
Pkg.instantiate()
126-
using Preferences
127-
Preferences.set_preferences!("Reactant", "xla_runtime" => "IFRT"; force=true)
128-
shell: julia --color=yes --code-coverage=user --depwarn=yes --project=. {0}
129-
env:
130-
JULIA_PKG_PRECOMPILE_AUTO: 0
131-
- name: "Run Tests: IFRT"
132-
run: |
133-
import Pkg
134-
Pkg.Registry.update()
135-
Pkg.test(; coverage="user")
136-
shell: julia --color=yes --code-coverage=user --depwarn=yes --project=. {0}
137-
env:
138-
JULIA_PKG_SERVER_REGISTRY_PREFERENCE: eager
139-
XLA_FLAGS: "--xla_force_host_platform_device_count=12"
140-
JULIA_DEBUG: "Reactant,Reactant_jll"
141-
- name: Upload MLIR modules (IFRT)
142-
uses: actions/upload-artifact@v4
143-
timeout-minutes: 10
144-
if: ${{ always() }}
145-
with:
146-
name: "mlir-localjll-IFRT-${{ matrix.version }}-${{ matrix.os }}-${{ github.event_name }}"
147-
path: "**/*.mlir"
148-
retention-days: 90
149-
overwrite: false
150-
- uses: julia-actions/julia-processcoverage@v1
151-
- uses: codecov/codecov-action@v5
152-
with:
153-
files: lcov.info
36+
version: "1.10"
37+
uses: ./.github/workflows/CommonCI.yml
38+
with:
39+
julia_version: ${{ matrix.version }}
40+
os: ${{ matrix.os }}
41+
runtime: "both"
42+
assertions: false
43+
localjll: true

0 commit comments

Comments
 (0)