Skip to content

Commit

Permalink
dont build llvm
Browse files Browse the repository at this point in the history
  • Loading branch information
fifield committed Apr 25, 2024
1 parent 537205c commit 132e271
Showing 1 changed file with 19 additions and 53 deletions.
72 changes: 19 additions & 53 deletions .github/workflows/buildAndTestRyzenAI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,58 +43,29 @@ jobs:
pip install --upgrade pip
pip install lit cmake joblib bfloat16
- name: Build and Install libxaie
run: utils/github-clone-build-libxaie.sh

- name: Get mlir-aie
id: clone-mlir-aie
run: |
utils/clone-mlir-aie.sh
source air-venv/bin/activate
pushd mlir-aie
pip install -r python/requirements.txt
popd
- name: Get LLVM
id: clone-llvm
run: utils/clone-llvm.sh
shell: bash

- name: Build and Install LLVM
run: utils/github-build-llvm.sh
run: utils/clone-mlir-aie.sh

- name: Build and Install mlir-aie
run: |
source air-venv/bin/activate
pushd mlir-aie
pip install -r python/requirements.txt
mkdir build
pushd build
export PATH=$PATH:/opt/Xilinx/Vitis/2023.2/bin:/opt/Xilinx/Vitis/2023.2/aietools/bin
cmake .. \
-GNinja \
-DCMAKE_BUILD_TYPE=Debug \
-DPython3_EXECUTABLE=$(which python) \
-DCMAKE_INSTALL_PREFIX=$PWD/../install \
-DCMAKE_C_COMPILER=clang-15 \
-DCMAKE_CXX_COMPILER=clang++-15 \
-DCMAKE_ASM_COMPILER=clang-15 \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_EXE_LINKER_FLAGS_INIT="-fuse-ld=lld" \
-DCMAKE_MODULE_LINKER_FLAGS_INIT="-fuse-ld=lld" \
-DCMAKE_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld" \
-DCMAKE_MODULE_PATH=$PWD/../cmake/modulesXilinx \
-DLLVM_EXTERNAL_LIT=$(which lit) \
-DMLIR_DIR=$PWD/../../llvm/install/lib/cmake/mlir/ \
-DXRT_ROOT=/opt/xilinx/xrt \
-DAIE_ENABLE_PYTHON_PASSES=OFF \
-DAIE_ENABLE_XRT_PYTHON_BINDINGS=ON \
-DAIE_INCLUDE_INTEGRATION_TESTS=OFF
ninja install
VERSION=$(utils/clone-llvm.sh --get-wheel-version)
pip -q download mlir==$VERSION \
-f https://github.com/Xilinx/mlir-aie/releases/expanded_assets/mlir-distro
unzip -q mlir-*.whl
# I have no clue why but the system clock on GHA containers is like 12 hours ahead.
# That means wheels have file with time stamps in the future which makes ninja loop
# forever when configuring. Set the time to some arbitrary stamp in the past just to be safe.
find mlir -exec touch -a -m -t 201108231405.14 {} \;
popd
rm -rf build
popd
utils/github-build-mlir-aie.sh
# Build the repo test target in debug mode to build and test.
- name: Build and test (Assert)
Expand All @@ -110,20 +81,15 @@ jobs:
-DLLVM_ENABLE_ASSERTIONS=ON \
-DPython3_EXECUTABLE=$(which python) \
-DCMAKE_INSTALL_PREFIX=$PWD/../install \
-DCMAKE_C_COMPILER=clang-15 \
-DCMAKE_CXX_COMPILER=clang++-15 \
-DCMAKE_ASM_COMPILER=clang-15 \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_EXE_LINKER_FLAGS_INIT="-fuse-ld=lld" \
-DCMAKE_MODULE_LINKER_FLAGS_INIT="-fuse-ld=lld" \
-DCMAKE_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld" \
-DCMAKE_MODULE_PATH=$PWD/../mlir-aie/cmake/modulesXilinx \
-DLLVM_EXTERNAL_LIT=$(which lit) \
-DMLIR_DIR=$PWD/../llvm/install/lib/cmake/mlir/ \
-DAIE_DIR=$PWD/../mlir-aie/install/lib/cmake/aie/ \
-Dx86_64_TOOLCHAIN_FILE=$PWD/../cmake/modules/toolchain_x86_64.cmake \
-DLibXAIE_ROOT=$PWD/../mlir-aie/install/runtime_lib/x86_64/xaiengine \
-DMLIR_DIR=`pwd`/../mlir-aie/mlir/lib/cmake/mlir \
-DLLVM_DIR=`pwd`/../mlir-aie/mlir/lib/cmake/llvm \
-DAIE_DIR=`pwd`/../mlir-aie/install/lib/cmake/aie/ \
-Dx86_64_TOOLCHAIN_FILE=`pwd`/../cmake/modules/toolchain_x86_64.cmake \
-DLibXAIE_ROOT=`pwd`/../aienginev2/install \
-DAIR_RUNTIME_TARGETS:STRING="x86_64" \
-DXRT_ROOT=/opt/xilinx/xrt \
-DENABLE_RUN_XRT_TESTS=ON
Expand Down

0 comments on commit 132e271

Please sign in to comment.