Skip to content
Merged
Show file tree
Hide file tree
Changes from 62 commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
ed33b75
Migrate to stablehlo
paul0403 Jul 18, 2025
382efcb
.
paul0403 Jul 18, 2025
59f4e93
no need for an individual `make stablehlo`
paul0403 Jul 18, 2025
730c082
`make dialects` can build stablehlo as embedded as of this commit :yay:
paul0403 Jul 21, 2025
c251be7
hlo custom call lit test update
paul0403 Jul 21, 2025
84ed325
scatter lit test update
paul0403 Jul 21, 2025
ee515f5
Merge remote-tracking branch 'origin/main' into migrate_to_stablehlo
paul0403 Jul 21, 2025
163b0f5
remove mhlo steps in main CI script
paul0403 Jul 21, 2025
17a109e
update py pipeline names
paul0403 Jul 21, 2025
2642653
add back -legalize-to-sort pass
paul0403 Jul 21, 2025
4e45fa6
checkout stablehlo submodule in CI
paul0403 Jul 21, 2025
b5ddbd6
turn off warnings as errors in stablehlo... is this how you do it?
paul0403 Jul 21, 2025
ae895d0
add back stablehlo legalize to std pass
paul0403 Jul 21, 2025
c938853
add back legalize-to-control-flow pass
paul0403 Jul 21, 2025
c18f678
register stablehlo optimization passes
paul0403 Jul 21, 2025
53dc434
Merge remote-tracking branch 'origin/main' into migrate_to_stablehlo
paul0403 Jul 29, 2025
f6930d4
.
paul0403 Jul 29, 2025
ff2a9df
..
paul0403 Jul 29, 2025
4bbece0
Merge remote-tracking branch 'origin/main' into migrate_to_stablehlo
paul0403 Jul 30, 2025
55598e0
burn merge breadcrumbs
paul0403 Jul 30, 2025
41abbb3
cleanup breadcrumbs
paul0403 Jul 30, 2025
c8ba9a0
more cleaning
paul0403 Jul 30, 2025
fc8afd2
more breadcrumbs
paul0403 Jul 30, 2025
ae49138
breadcrumbs
paul0403 Jul 30, 2025
44122fc
`make dialects` succeed
paul0403 Jul 30, 2025
5126d67
checkout correct stablehlo commit in CI
paul0403 Jul 30, 2025
4ce1ec1
clean py pipeline; TODO-fy cpp pipeline
paul0403 Jul 31, 2025
89fb605
Merge remote-tracking branch 'origin/main' into migrate_to_stablehlo
paul0403 Jul 31, 2025
ebd144a
clang format
paul0403 Jul 31, 2025
e900ded
restore dialects unit tests
paul0403 Jul 31, 2025
4268124
burn away unnecessary cmake targets
paul0403 Jul 31, 2025
58d1db4
finalize py pipeline, everything passes now
paul0403 Jul 31, 2025
88ee549
Merge remote-tracking branch 'origin/main' into migrate_to_stablehlo
paul0403 Jul 31, 2025
3f317e8
cpp pipeline
paul0403 Jul 31, 2025
92fcd5f
set CI stablehlo version constant
paul0403 Jul 31, 2025
9cd6bc8
burn mhlo in check-pl-compat.yaml
paul0403 Jul 31, 2025
3459895
track CI stablehlo version variable in main ci
paul0403 Jul 31, 2025
9374334
delete mhlo patches
paul0403 Jul 31, 2025
8d3e68a
remove mhlo from linux arm wheel
paul0403 Jul 31, 2025
03f59f0
minux x86 wheel
paul0403 Jul 31, 2025
81ff5e3
mac arm wheel
paul0403 Jul 31, 2025
9760aec
clean mhlo from git grep
paul0403 Jul 31, 2025
e99b842
build stablehlo as standalone instead of embedded (cmake)
paul0403 Aug 1, 2025
accd284
makefile
paul0403 Aug 1, 2025
7af47c2
regular CI
paul0403 Aug 1, 2025
ae17b0f
misc
paul0403 Aug 1, 2025
c085893
wheel CI
paul0403 Aug 1, 2025
d15dbe7
misc CI
paul0403 Aug 1, 2025
684cc4c
Merge remote-tracking branch 'origin/main' into migrate_to_stablehlo
paul0403 Aug 1, 2025
ca830cc
small fix: unify cmake entry as STABLEHLO_BUILD_DIR instead of manual…
paul0403 Aug 1, 2025
72bf8de
mac does not have lld
paul0403 Aug 1, 2025
9779290
small fix for mac wheel cache name
paul0403 Aug 1, 2025
4a7b902
go back to cpp 20: no longer embedded so no longer constrained by sta…
paul0403 Aug 1, 2025
5dc59ab
move scatter-lowering and hlo-custom-call-lowering from catalyst dial…
paul0403 Aug 1, 2025
c910f32
small follow up
paul0403 Aug 1, 2025
2f96459
add ${{ github.workspace }} to paths in wheels script
paul0403 Aug 1, 2025
f5e609c
Merge remote-tracking branch 'origin/main' into migrate_to_stablehlo
paul0403 Aug 14, 2025
c7daa4d
Merge remote-tracking branch 'origin/main' into migrate_to_stablehlo
paul0403 Aug 14, 2025
8cc592a
rename custom `stablehlo` folder to `hlo-extensions`
paul0403 Aug 14, 2025
c915e59
format
paul0403 Aug 14, 2025
8a3a484
remove set_dep_versions.py
paul0403 Aug 14, 2025
b3a24d0
changelog
paul0403 Aug 14, 2025
fdf96d2
add SYSTEM to stablehlo includes
paul0403 Aug 14, 2025
42edcc6
put back enable_lld/zlib in stablehlo build
paul0403 Aug 14, 2025
5b99ac5
clean cmake
paul0403 Aug 14, 2025
bc1d58c
track enable_lld
paul0403 Aug 14, 2025
a035970
CI
paul0403 Aug 14, 2025
004e502
try `make stablehlo` in wheels
paul0403 Aug 14, 2025
65dbfca
wheels
paul0403 Aug 14, 2025
dfb233c
clear stablehlo CI cache and rerun
paul0403 Aug 14, 2025
ffca62e
no lld for gcc
paul0403 Aug 14, 2025
a5c7b0d
Merge remote-tracking branch 'origin/main' into migrate_to_stablehlo
paul0403 Aug 15, 2025
0cc00a1
Merge remote-tracking branch 'origin/main' into migrate_to_stablehlo
paul0403 Aug 15, 2025
0749f4d
Merge remote-tracking branch 'origin/main' into migrate_to_stablehlo
paul0403 Aug 18, 2025
626ccfa
Merge remote-tracking branch 'origin/main' into migrate_to_stablehlo
paul0403 Aug 19, 2025
eeb820c
Merge remote-tracking branch 'origin/main' into migrate_to_stablehlo
paul0403 Aug 19, 2025
ce78b4f
Merge remote-tracking branch 'origin/main' into migrate_to_stablehlo
paul0403 Aug 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .dep-versions
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# To update JAX version alongside compatible dependency tags, run the following script:
# python3 .github/workflows/set_dep_versions.py {JAX_version}
jax=0.6.2
mhlo=1dd2e71331014ae0373f6bf900ce6be393357190
stablehlo=69d6dae46e1c7de36e6e6973654754f05353cba5
llvm=f8cb7987c64dcffb72414a40560055cb717dbf74
enzyme=v0.0.186

Expand Down
89 changes: 40 additions & 49 deletions .github/workflows/build-wheel-linux-arm64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ jobs:
key: llvm-${{ needs.constants.outputs.llvm_version }}-container-source
enableCrossOsArchive: True

- name: Cache MHLO Source
id: cache-mhlo-source
- name: Cache Stablehlo Source
id: cache-stablehlo-source
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/mlir/mlir-hlo
key: mhlo-${{ needs.constants.outputs.mhlo_version }}-container-source
path: ${{ github.workspace }}/mlir/stablehlo
key: stablehlo-${{ needs.constants.outputs.stablehlo_version }}-container-source
enableCrossOsArchive: True

- name: Cache Enzyme Source
Expand All @@ -109,25 +109,18 @@ jobs:
path: ${{ github.workspace }}/mlir/llvm-project

- name: Patch LLVM Source
if: steps.cache-mhlo-source.outputs.cache-hit != 'true'
if: steps.cache-llvm-source.outputs.cache-hit != 'true'
run: |
cd $GITHUB_WORKSPACE/mlir/llvm-project
git apply $GITHUB_WORKSPACE/mlir/patches/llvm-bufferization-segfault.patch

- name: Clone MHLO Submodule
if: steps.cache-mhlo-source.outputs.cache-hit != 'true'
- name: Clone Stablehlo Submodule
if: steps.cache-stablehlo-source.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: tensorflow/mlir-hlo
ref: ${{ needs.constants.outputs.mhlo_version }}
path: ${{ github.workspace }}/mlir/mlir-hlo

- name: Patch MHLO Source
if: steps.cache-mhlo-source.outputs.cache-hit != 'true'
run: |
cd $GITHUB_WORKSPACE/mlir/mlir-hlo
git apply $GITHUB_WORKSPACE/mlir/patches/mhlo-remove-shardy.patch
git apply $GITHUB_WORKSPACE/mlir/patches/mhlo-rename-sort.patch
repository: openxla/stablehlo
ref: ${{ needs.constants.outputs.stablehlo_version }}
path: ${{ github.workspace }}/mlir/stablehlo

- name: Clone Enzyme Submodule
if: steps.cache-enzyme-source.outputs.cache-hit != 'true'
Expand All @@ -151,12 +144,12 @@ jobs:
path: ${{ github.workspace }}/llvm-build
key: ${{ matrix.container_img }}-llvm-${{ needs.constants.outputs.llvm_version }}-${{ matrix.python_version }}-wheel-build

- name: Check MHLO Build Cache
id: cache-mhlo-build
- name: Check Stablehlo Build Cache
id: cache-stablehlo-build
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}/mhlo-build
key: ${{ matrix.container_img }}-mhlo-${{ needs.constants.outputs.mhlo_version }}-wheel-build
path: ${{ github.workspace }}/stablehlo-build
key: ${{ matrix.container_img }}-stablehlo-${{ needs.constants.outputs.stablehlo_version }}-wheel-build
lookup-only: True

- name: Check Enzyme Build Cache
Expand All @@ -170,7 +163,7 @@ jobs:
- name: Install dependencies
if: |
steps.cache-llvm-build.outputs.cache-hit != 'true' ||
steps.cache-mhlo-build.outputs.cache-hit != 'true' ||
steps.cache-stablehlo-build.outputs.cache-hit != 'true' ||
steps.cache-enzyme-build.outputs.cache-hit != 'true'
run: |
cat /etc/dnf.conf | sed "s/\[main\]/\[main\]\ntimeout=5/g" > /etc/dnf.conf
Expand Down Expand Up @@ -207,31 +200,29 @@ jobs:
path: ${{ github.workspace }}/llvm-build
key: ${{ matrix.container_img }}-llvm-${{ needs.constants.outputs.llvm_version }}-${{matrix.python_version}}-wheel-build

- name: Build MHLO Dialect
if: steps.cache-mhlo-build.outputs.cache-hit != 'true'
# building with LLD is a strong requirement for mhlo
- name: Build Stablehlo Dialect
if: steps.cache-stablehlo-build.outputs.cache-hit != 'true'
run: |
export PATH=$GITHUB_WORKSPACE/llvm-build/bin:$PATH

cmake -S mlir/mlir-hlo -B $GITHUB_WORKSPACE/mhlo-build -G Ninja \
cmake -S $GITHUB_WORKSPACE/mlir/stablehlo -B $GITHUB_WORKSPACE/stablehlo-build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DMLIR_DIR="$GITHUB_WORKSPACE/llvm-build/lib/cmake/mlir" \
-DPython3_EXECUTABLE=$(which python${{ matrix.python_version }}) \
-DLLVM_ENABLE_ZLIB=FORCE_ON \
-DLLVM_ENABLE_ZSTD=OFF \
-DCMAKE_CXX_VISIBILITY_PRESET=default \
-DLLVM_ENABLE_LLD=ON
-DSTABLEHLO_ENABLE_LLD=ON \
-DSTABLEHLO_ENABLE_BINDINGS_PYTHON=OFF \
-DSTABLEHLO_ENABLE_SPLIT_DWARF=ON \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_CXX_VISIBILITY_PRESET=default

LIT_FILTER_OUT="chlo_legalize_to_mhlo" cmake --build $GITHUB_WORKSPACE/mhlo-build --target check-mlir-hlo
cmake --build $GITHUB_WORKSPACE/stablehlo-build

- name: Save MHLO Build
id: save-mhlo-build
if: steps.cache-mhlo-build.outputs.cache-hit != 'true'
- name: Save Stablehlo Build
id: save-stablehlo-build
if: steps.cache-stablehlo-build.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: ${{ github.workspace }}/mhlo-build
key: ${{ matrix.container_img }}-mhlo-${{ needs.constants.outputs.mhlo_version }}-wheel-build
path: ${{ github.workspace }}/stablehlo-build
key: ${{ matrix.container_img }}-stablehlo-${{ needs.constants.outputs.stablehlo_version }}-wheel-build

- name: Build Enzyme
if: steps.cache-enzyme-build.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -305,21 +296,21 @@ jobs:
key: ${{ matrix.container_img }}-llvm-${{ needs.constants.outputs.llvm_version }}-3.11-wheel-build
fail-on-cache-miss: True

- name: Get Cached MHLO Source
id: cache-mhlo-source
- name: Get Cached Stablehlo Source
id: cache-stablehlo-source
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}/mlir/mlir-hlo
key: mhlo-${{ needs.constants.outputs.mhlo_version }}-container-source
path: ${{ github.workspace }}/mlir/stablehlo
key: stablehlo-${{ needs.constants.outputs.stablehlo_version }}-container-source
enableCrossOsArchive: True
fail-on-cache-miss: True

- name: Get Cached MHLO Build
id: cache-mhlo-build
- name: Get Cached Stablehlo Build
id: cache-stablehlo-build
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}/mhlo-build
key: ${{ matrix.container_img }}-mhlo-${{ needs.constants.outputs.mhlo_version }}-wheel-build
path: ${{ github.workspace }}/stablehlo-build
key: ${{ matrix.container_img }}-stablehlo-${{ needs.constants.outputs.stablehlo_version }}-wheel-build
fail-on-cache-miss: True

- name: Get Cached Enzyme Source
Expand Down Expand Up @@ -372,8 +363,8 @@ jobs:
-DPython3_EXECUTABLE=$(which python${{ matrix.python_version }}) \
-DPython3_NumPy_INCLUDE_DIRS=$(python${{ matrix.python_version }} -c "import numpy as np; print(np.get_include())") \
-DMLIR_DIR="$GITHUB_WORKSPACE/llvm-build/lib/cmake/mlir" \
-DMHLO_DIR="$GITHUB_WORKSPACE/mhlo-build/lib/cmake/mlir-hlo" \
-DMHLO_BINARY_DIR="$GITHUB_WORKSPACE/mhlo-build/bin" \
-DSTABLEHLO_DIR="$GITHUB_WORKSPACE/mlir/stablehlo" \
-DSTABLEHLO_BUILD_DIR="$GITHUB_WORKSPACE/stablehlo-build" \
-DEnzyme_DIR="$GITHUB_WORKSPACE/enzyme-build" \
-DENZYME_SRC_DIR="$GITHUB_WORKSPACE/mlir/Enzyme" \
-DLLVM_ENABLE_ZLIB=FORCE_ON \
Expand All @@ -396,7 +387,7 @@ jobs:
run: |
PYTHON=python${{ matrix.python_version }} \
LLVM_BUILD_DIR="$GITHUB_WORKSPACE/llvm-build" \
MHLO_BUILD_DIR="$GITHUB_WORKSPACE/mhlo-build" \
STABLEHLO_BUILD_DIR="$GITHUB_WORKSPACE/stablehlo-build" \
DIALECTS_BUILD_DIR="$GITHUB_WORKSPACE/quantum-build" \
RT_BUILD_DIR="$GITHUB_WORKSPACE/runtime-build" \
OQC_BUILD_DIR="$GITHUB_WORKSPACE/oqc-build" \
Expand Down
90 changes: 40 additions & 50 deletions .github/workflows/build-wheel-linux-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ jobs:
key: llvm-${{ needs.constants.outputs.llvm_version }}-container-source
enableCrossOsArchive: True

- name: Cache MHLO Source
id: cache-mhlo-source
- name: Cache Stablehlo Source
id: cache-stablehlo-source
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/mlir/mlir-hlo
key: mhlo-${{ needs.constants.outputs.mhlo_version }}-container-source
path: ${{ github.workspace }}/mlir/stablehlo
key: stablehlo-${{ needs.constants.outputs.stablehlo_version }}-container-source
enableCrossOsArchive: True

- name: Cache Enzyme Source
Expand All @@ -128,25 +128,18 @@ jobs:
path: ${{ github.workspace }}/mlir/llvm-project

- name: Patch LLVM Source
if: steps.cache-mhlo-source.outputs.cache-hit != 'true'
if: steps.cache-llvm-source.outputs.cache-hit != 'true'
run: |
cd $GITHUB_WORKSPACE/mlir/llvm-project
git apply $GITHUB_WORKSPACE/mlir/patches/llvm-bufferization-segfault.patch

- name: Clone MHLO Submodule
if: steps.cache-mhlo-source.outputs.cache-hit != 'true'
- name: Clone Stablehlo Submodule
if: steps.cache-stablehlo-source.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: tensorflow/mlir-hlo
ref: ${{ needs.constants.outputs.mhlo_version }}
path: ${{ github.workspace }}/mlir/mlir-hlo

- name: Patch MHLO Source
if: steps.cache-mhlo-source.outputs.cache-hit != 'true'
run: |
cd $GITHUB_WORKSPACE/mlir/mlir-hlo
git apply $GITHUB_WORKSPACE/mlir/patches/mhlo-remove-shardy.patch
git apply $GITHUB_WORKSPACE/mlir/patches/mhlo-rename-sort.patch
repository: openxla/stablehlo
ref: ${{ needs.constants.outputs.stablehlo_version }}
path: ${{ github.workspace }}/mlir/stablehlo

- name: Clone Enzyme Submodule
if: steps.cache-enzyme-source.outputs.cache-hit != 'true'
Expand All @@ -170,12 +163,12 @@ jobs:
path: ${{ github.workspace }}/llvm-build
key: ${{ matrix.container_img }}-llvm-${{ needs.constants.outputs.llvm_version }}-${{ matrix.python_version }}-wheel-build

- name: Check MHLO Build Cache
id: cache-mhlo-build
- name: Check Stablehlo Build Cache
id: cache-stablehlo-build
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}/mhlo-build
key: ${{ matrix.container_img }}-mhlo-${{ needs.constants.outputs.mhlo_version }}-wheel-build
path: ${{ github.workspace }}/stablehlo-build
key: ${{ matrix.container_img }}-stablehlo-${{ needs.constants.outputs.stablehlo_version }}-wheel-build
lookup-only: True

- name: Check Enzyme Build Cache
Expand All @@ -189,7 +182,7 @@ jobs:
- name: Install dependencies (AlmaLinux)
if: |
steps.cache-llvm-build.outputs.cache-hit != 'true' ||
steps.cache-mhlo-build.outputs.cache-hit != 'true' ||
steps.cache-stablehlo-build.outputs.cache-hit != 'true' ||
steps.cache-enzyme-build.outputs.cache-hit != 'true'
run: |
# Reduce wait time for repos not responding
Expand All @@ -205,7 +198,6 @@ jobs:
PYTHON_BINS=$(find /opt/_internal/cpython-${{ matrix.python_version }}.*/bin -maxdepth 1 -type d | tr '\n' ':' | sed 's/:$//')
echo $PYTHON_BINS >> $GITHUB_PATH

# LLD is required for MHLO builds.
# (Don't forget to add the build directory to PATH in subsequent steps, so
# other tools can find it, in particular collect2 invoked by gcc.)
- name: Build LLVM / MLIR
Expand All @@ -230,31 +222,29 @@ jobs:
path: ${{ github.workspace }}/llvm-build
key: ${{ matrix.container_img }}-llvm-${{ needs.constants.outputs.llvm_version }}-${{matrix.python_version}}-wheel-build

- name: Build MHLO Dialect
if: steps.cache-mhlo-build.outputs.cache-hit != 'true'
# building with LLD is a strong requirement for mhlo
- name: Build Stablehlo Dialect
if: steps.cache-stablehlo-build.outputs.cache-hit != 'true'
run: |
export PATH=$GITHUB_WORKSPACE/llvm-build/bin:$PATH

cmake -S mlir/mlir-hlo -B $GITHUB_WORKSPACE/mhlo-build -G Ninja \
cmake -S $GITHUB_WORKSPACE/mlir/stablehlo -B $GITHUB_WORKSPACE/stablehlo-build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DMLIR_DIR="$GITHUB_WORKSPACE/llvm-build/lib/cmake/mlir" \
-DPython3_EXECUTABLE=$(which python${{ matrix.python_version }}) \
-DLLVM_ENABLE_ZLIB=FORCE_ON \
-DLLVM_ENABLE_ZSTD=OFF \
-DCMAKE_CXX_VISIBILITY_PRESET=default \
-DLLVM_ENABLE_LLD=ON
-DSTABLEHLO_ENABLE_LLD=ON \
-DSTABLEHLO_ENABLE_BINDINGS_PYTHON=OFF \
-DSTABLEHLO_ENABLE_SPLIT_DWARF=ON \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_CXX_VISIBILITY_PRESET=default

LIT_FILTER_OUT="chlo_legalize_to_mhlo" cmake --build $GITHUB_WORKSPACE/mhlo-build --target check-mlir-hlo
cmake --build $GITHUB_WORKSPACE/stablehlo-build

- name: Save MHLO Build
id: save-mhlo-build
if: steps.cache-mhlo-build.outputs.cache-hit != 'true'
- name: Save Stablehlo Build
id: save-stablehlo-build
if: steps.cache-stablehlo-build.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: ${{ github.workspace }}/mhlo-build
key: ${{ matrix.container_img }}-mhlo-${{ needs.constants.outputs.mhlo_version }}-wheel-build
path: ${{ github.workspace }}/stablehlo-build
key: ${{ matrix.container_img }}-stablehlo-${{ needs.constants.outputs.stablehlo_version }}-wheel-build

- name: Build Enzyme
if: steps.cache-enzyme-build.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -328,21 +318,21 @@ jobs:
key: ${{ matrix.container_img }}-llvm-${{ needs.constants.outputs.llvm_version }}-3.11-wheel-build
fail-on-cache-miss: True

- name: Get Cached MHLO Source
id: cache-mhlo-source
- name: Get Cached Stablehlo Source
id: cache-stablehlo-source
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}/mlir/mlir-hlo
key: mhlo-${{ needs.constants.outputs.mhlo_version }}-container-source
path: ${{ github.workspace }}/mlir/stablehlo
key: stablehlo-${{ needs.constants.outputs.stablehlo_version }}-container-source
enableCrossOsArchive: True
fail-on-cache-miss: True

- name: Get Cached MHLO Build
id: cache-mhlo-build
- name: Get Cached Stablehlo Build
id: cache-stablehlo-build
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}/mhlo-build
key: ${{ matrix.container_img }}-mhlo-${{ needs.constants.outputs.mhlo_version }}-wheel-build
path: ${{ github.workspace }}/stablehlo-build
key: ${{ matrix.container_img }}-stablehlo-${{ needs.constants.outputs.stablehlo_version }}-wheel-build
fail-on-cache-miss: True

- name: Get Cached Enzyme Source
Expand Down Expand Up @@ -397,8 +387,8 @@ jobs:
-DPython3_EXECUTABLE=$(which python${{ matrix.python_version }}) \
-DPython3_NumPy_INCLUDE_DIRS=$(python${{ matrix.python_version }} -c "import numpy as np; print(np.get_include())") \
-DMLIR_DIR="$GITHUB_WORKSPACE/llvm-build/lib/cmake/mlir" \
-DMHLO_DIR="$GITHUB_WORKSPACE/mhlo-build/lib/cmake/mlir-hlo" \
-DMHLO_BINARY_DIR="$GITHUB_WORKSPACE/mhlo-build/bin" \
-DSTABLEHLO_DIR="$GITHUB_WORKSPACE/mlir/stablehlo" \
-DSTABLEHLO_BUILD_DIR="$GITHUB_WORKSPACE/stablehlo-build" \
-DEnzyme_DIR="$GITHUB_WORKSPACE/enzyme-build" \
-DENZYME_SRC_DIR="$GITHUB_WORKSPACE/mlir/Enzyme" \
-DLLVM_ENABLE_ZLIB=FORCE_ON \
Expand All @@ -421,7 +411,7 @@ jobs:
run: |
PYTHON=python${{ matrix.python_version }} \
LLVM_BUILD_DIR="$GITHUB_WORKSPACE/llvm-build" \
MHLO_BUILD_DIR="$GITHUB_WORKSPACE/mhlo-build" \
STABLEHLO_BUILD_DIR="$GITHUB_WORKSPACE/stablehlo-build" \
DIALECTS_BUILD_DIR="$GITHUB_WORKSPACE/quantum-build" \
RT_BUILD_DIR="$GITHUB_WORKSPACE/runtime-build" \
OQC_BUILD_DIR="$GITHUB_WORKSPACE/oqc-build" \
Expand Down
Loading
Loading