Skip to content
Merged
Changes from all commits
Commits
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
22 changes: 20 additions & 2 deletions .github/workflows/enzyme-bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,12 @@ jobs:
- name: Install dependencies
run: |
apt-get update
apt-get install -y binutils ninja-build cmake gcc g++ python3 python3-dev
apt-get install -y binutils ninja-build cmake gcc g++ python3 python3-dev gnupg ca-certificates opencl-headers ocl-icd-opencl-dev
curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/3bf863cc.pub | gpg --dearmor -o /usr/share/keyrings/cuda-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/cuda-archive-keyring.gpg] https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64 /" > /etc/apt/sources.list.d/cuda.list
apt-get update
apt-get install -y cuda-toolkit-12-9
ln -sf /usr/local/cuda-12.9 /usr/local/cuda

- name: Check out Reactant
uses: actions/checkout@v6
Expand All @@ -79,6 +84,7 @@ jobs:
with:
repository: 'wsmoses/Enzyme-GPU-Tests'
path: 'Enzyme-GPU-Tests'
ref: 'mlir'

- name: Set BASE_DIR
# We have to use `${GITHUB_WORKSPACE}` instead of `github.workspace` because GitHub
Expand Down Expand Up @@ -118,7 +124,7 @@ jobs:
working-directory: ${{ env.BASE_DIR }}/'Reactant'
run: |
mkdir reactant-build && cd reactant-build
cmake ../enzyme -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DLLVM_DIR=${{ env.BASE_DIR }}/llvm-project/mlir-build
cmake ../enzyme -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DLLVM_DIR=${{ env.BASE_DIR }}/llvm-project/mlir-build -DENZYME_CLANG_PLUGIN=ON
ninja

- uses: bazel-contrib/setup-bazel@0.15.0
Expand Down Expand Up @@ -162,8 +168,20 @@ jobs:
run: |
bazel build $BAZEL_FLAGS --color=yes -c opt //:libRaise.so --test_output=errors

- name: Build Enzyme plugin
working-directory: ${{ env.BASE_DIR }}/'Reactant'
run: |
cd reactant-build
ninja ClangEnzyme-22

- name: LBM build
working-directory: ${{ env.BASE_DIR }}/'Enzyme-GPU-Tests'
env:
ENZYME_PATH: ${{ env.BASE_DIR }}/Reactant/reactant-build/Enzyme/ClangEnzyme-22.so
CLANG_PATH: ${{ env.BASE_DIR }}/llvm-project/mlir-build/bin/clang++
LIB_RAISE_PATH: ${{ env.BASE_DIR }}/Enzyme-JaX/bazel-bin/libRaise.so
CUDA_PATH: /usr/local/cuda
run: |
cd LBM
make -j
make run
Loading