Skip to content

Commit

Permalink
Sort CMake configuration options
Browse files Browse the repository at this point in the history
This allows easier comparison between the various CI configurations.
  • Loading branch information
keryell committed Mar 25, 2024
1 parent c86f814 commit 624e09d
Show file tree
Hide file tree
Showing 7 changed files with 142 additions and 117 deletions.
58 changes: 33 additions & 25 deletions .github/workflows/buildAndTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,28 +102,32 @@ jobs:
mkdir build_assert
cd build_assert
# Please keep the options sorted so it is easier to compare
cmake .. \
-GNinja \
-DAIE_COMPILER=NONE \
-DAIE_ENABLE_AIRBIN=OFF \
-DAIE_ENABLE_PYTHON_PASSES=OFF \
-DAIE_LINKER=NONE \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_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_PLATFORM_NO_VERSIONED_SONAME=ON \
-DCMAKE_VISIBILITY_INLINES_HIDDEN=ON \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_VISIBILITY_PRESET=hidden \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_VISIBILITY_PRESET=hidden \
-DAIE_COMPILER=NONE \
-DAIE_LINKER=NONE \
-DAIE_ENABLE_PYTHON_PASSES=OFF \
-DAIE_ENABLE_AIRBIN=OFF \
-DCMAKE_EXE_LINKER_FLAGS_INIT="-fuse-ld=lld" \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_MODULE_LINKER_FLAGS_INIT="-fuse-ld=lld" \
-DCMAKE_MODULE_PATH=$PWD/../cmake/modulesXilinx \
-DCMAKE_PLATFORM_NO_VERSIONED_SONAME=ON \
-DCMAKE_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld" \
-DCMAKE_VISIBILITY_INLINES_HIDDEN=ON \
-DHOST_COMPILER=NONE \
-DLLVM_DIR=$PWD/../mlir/lib/cmake/llvm \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DLLVM_ENABLE_RTTI=ON \
-DCMAKE_MODULE_PATH=$PWD/../cmake/modulesXilinx \
-DMLIR_DIR=$PWD/../mlir/lib/cmake/mlir \
-DLLVM_DIR=$PWD/../mlir/lib/cmake/llvm \
-DLLVM_USE_LINKER=lld \
-DLLVM_EXTERNAL_LIT=$(which lit) \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-DLLVM_USE_LINKER=lld \
-DMLIR_DIR=$PWD/../mlir/lib/cmake/mlir
ninja
ninja check-aie
Expand All @@ -138,27 +142,31 @@ jobs:
mkdir build_release
cd build_release
# Please keep the options sorted so it is easier to compare
cmake .. \
-G Ninja \
-DAIE_COMPILER=NONE \
-DAIE_ENABLE_AIRBIN=OFF \
-DAIE_ENABLE_PYTHON_PASSES=OFF \
-DAIE_LINKER=NONE \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_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_PLATFORM_NO_VERSIONED_SONAME=ON \
-DCMAKE_VISIBILITY_INLINES_HIDDEN=ON \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_VISIBILITY_PRESET=hidden \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_VISIBILITY_PRESET=hidden \
-DAIE_COMPILER=NONE \
-DAIE_LINKER=NONE \
-DAIE_ENABLE_PYTHON_PASSES=OFF \
-DAIE_ENABLE_AIRBIN=OFF \
-DCMAKE_EXE_LINKER_FLAGS_INIT="-fuse-ld=lld" \
-DCMAKE_MODULE_LINKER_FLAGS_INIT="-fuse-ld=lld" \
-DCMAKE_MODULE_PATH=$PWD/../cmake/modulesXilinx \
-DCMAKE_PLATFORM_NO_VERSIONED_SONAME=ON \
-DCMAKE_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld" \
-DCMAKE_VISIBILITY_INLINES_HIDDEN=ON \
-DHOST_COMPILER=NONE \
-DLLVM_DIR=$PWD/../mlir/lib/cmake/llvm \
-DLLVM_ENABLE_ASSERTIONS=OFF \
-DLLVM_ENABLE_RTTI=ON \
-DCMAKE_MODULE_PATH=$PWD/../cmake/modulesXilinx \
-DMLIR_DIR=$PWD/../mlir/lib/cmake/mlir \
-DLLVM_DIR=$PWD/../mlir/lib/cmake/llvm \
-DLLVM_EXTERNAL_LIT=$(which lit) \
-DLLVM_USE_LINKER=lld \
-DLLVM_EXTERNAL_LIT=$(which lit)
-DMLIR_DIR=$PWD/../mlir/lib/cmake/mlir
ninja
ninja check-aie
Expand Down
41 changes: 21 additions & 20 deletions .github/workflows/buildAndTestAieTools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ jobs:
dotnet: true
haskell: true
large-packages: true
swap-storage: false
swap-storage: false

- name: Docker prune
shell: bash
run: |
docker system prune -a -f
- uses: uraimo/[email protected]
name: Run commands
id: runcmd
Expand All @@ -66,60 +66,61 @@ jobs:
--mac-address ${{ secrets.XILINX_MAC }}
run: |
ls -l /opt/Xilinx/Vitis/2023.2/
# this is the inverse of `base64 -w 1000000 Xilinx.lic`
# the -w ("wrap after 1000000 cols") is so that there are no spaces in the XILINX_LIC env var
echo -n "${{ secrets.XILINX_LIC }}" | base64 --decode > ~/.Xilinx/Xilinx.lic
cd /
git clone https://github.com/Xilinx/mlir-aie.git
cd /mlir-aie
git checkout ${{ github.head_ref }}
if [ x"${{ inputs.AIE_COMMIT }}" != x"" ]; then
git reset --hard ${{ inputs.AIE_COMMIT }}
fi
git submodule update --init --recursive
apt install python3.10-venv
python -m venv aie-venv
source aie-venv/bin/activate
pip install -r python/requirements.txt
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
find mlir -exec touch -a -m -t 201108231405.14 {} \;
# don't delete the space in the sed
pushd cmake/modulesXilinx && sed -i.bak 's/ VITIS_VPP//g' FindVitis.cmake && popd
mkdir build && cd build
export PATH=/opt/Xilinx/Vitis/2023.2/bin:/opt/Xilinx/Vitis/2023.2/aietools/bin:$PATH
# Please keep the options sorted so it is easier to compare
cmake .. -G Ninja \
-DMLIR_DIR=$PWD/../mlir/lib/cmake/mlir \
-DVITIS_ROOT=/opt/Xilinx/Vitis/2023.2/ \
-DVitis_VERSION_MAJOR=2023 \
-DVitis_VERSION_MINOR=2 \
-DCMAKE_MODULE_PATH=$PWD/../cmake/modulesXilinx \
-DLLVM_EXTERNAL_LIT=$(which lit) \
-DAIE_INCLUDE_INTEGRATION_TESTS=OFF \
-DAIE_ENABLE_PYTHON_PASSES=OFF \
-DCMAKE_EXE_LINKER_FLAGS_INIT="-fuse-ld=lld" \
-DCMAKE_MODULE_LINKER_FLAGS_INIT="-fuse-ld=lld" \
-DCMAKE_MODULE_PATH=$PWD/../cmake/modulesXilinx \
-DCMAKE_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld" \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_INSTALL_PREFIX=install
-DCMAKE_INSTALL_PREFIX=install \
-DLLVM_EXTERNAL_LIT=$(which lit) \
-DMLIR_DIR=$PWD/../mlir/lib/cmake/mlir \
-DVITIS_ROOT=/opt/Xilinx/Vitis/2023.2 \
-DVitis_VERSION_MAJOR=2023 \
-DVitis_VERSION_MINOR=2
ninja
if [ x"${{ inputs.LIT_FILTER }}" == x"" ]; then
export LIT_FILTER="${{ inputs.LIT_FILTER }}"
fi
# filter out CODirect until I put bootgen into the image
export LIT_OPTS="-sv --timeout 600 -j1 --filter-out Targets/AIEGenerateCDODirect"
ninja check-aie
Expand Down
22 changes: 12 additions & 10 deletions .github/workflows/buildAndTestMulti.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,24 +127,26 @@ jobs:
LLVM_EXTERNAL_LIT="$(which lit)"
fi
# Please keep the options sorted so it is easier to compare
cmake .. \
-G Ninja \
-DAIE_COMPILER=NONE \
-DAIE_ENABLE_PYTHON_PASSES=OFF \
-DAIE_LINKER=NONE \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_PLATFORM_NO_VERSIONED_SONAME=ON \
-DCMAKE_VISIBILITY_INLINES_HIDDEN=ON \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_VISIBILITY_PRESET=hidden \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_VISIBILITY_PRESET=hidden \
-DAIE_COMPILER=NONE \
-DAIE_LINKER=NONE \
-DAIE_ENABLE_PYTHON_PASSES=OFF \
-DCMAKE_MODULE_PATH=$PWD/../cmake/modulesXilinx \
-DCMAKE_PLATFORM_NO_VERSIONED_SONAME=ON \
-DCMAKE_VISIBILITY_INLINES_HIDDEN=ON \
-DHOST_COMPILER=NONE \
-DLLVM_DIR=$PWD/../mlir/lib/cmake/llvm \
-DLLVM_ENABLE_ASSERTIONS=${{ matrix.ENABLE_ASSERTIONS }} \
-DLLVM_ENABLE_RTTI=${{ matrix.ENABLE_RTTI }} \
-DCMAKE_MODULE_PATH=$PWD/../cmake/modulesXilinx \
-DMLIR_DIR=$PWD/../mlir/lib/cmake/mlir \
-DLLVM_DIR=$PWD/../mlir/lib/cmake/llvm \
-DLLVM_EXTERNAL_LIT="$LLVM_EXTERNAL_LIT"
-DLLVM_EXTERNAL_LIT="$LLVM_EXTERNAL_LIT" \
-DMLIR_DIR=$PWD/../mlir/lib/cmake/mlir
ninja
# tests hang/fail on windows
Expand Down
53 changes: 30 additions & 23 deletions .github/workflows/buildAndTestPythons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,27 +103,31 @@ jobs:
mkdir build_assert
cd build_assert
# Please keep the options sorted so it is easier to compare
cmake .. \
-GNinja \
-DAIE_COMPILER=NONE \
-DAIE_ENABLE_PYTHON_PASSES=OFF \
-DAIE_LINKER=NONE \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_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_PLATFORM_NO_VERSIONED_SONAME=ON \
-DCMAKE_VISIBILITY_INLINES_HIDDEN=ON \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_VISIBILITY_PRESET=hidden \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_VISIBILITY_PRESET=hidden \
-DAIE_COMPILER=NONE \
-DAIE_LINKER=NONE \
-DAIE_ENABLE_PYTHON_PASSES=OFF \
-DCMAKE_EXE_LINKER_FLAGS_INIT="-fuse-ld=lld" \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_MODULE_LINKER_FLAGS_INIT="-fuse-ld=lld" \
-DCMAKE_MODULE_PATH=$PWD/../cmake/modulesXilinx \
-DCMAKE_PLATFORM_NO_VERSIONED_SONAME=ON \
-DCMAKE_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld" \
-DCMAKE_VISIBILITY_INLINES_HIDDEN=ON \
-DHOST_COMPILER=NONE \
-DLLVM_DIR=$PWD/../mlir/lib/cmake/llvm \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DLLVM_ENABLE_RTTI=ON \
-DCMAKE_MODULE_PATH=$PWD/../cmake/modulesXilinx \
-DMLIR_DIR=$PWD/../mlir/lib/cmake/mlir \
-DLLVM_DIR=$PWD/../mlir/lib/cmake/llvm \
-DLLVM_USE_LINKER=lld \
-DLLVM_EXTERNAL_LIT=$(which lit) \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-DLLVM_USE_LINKER=lld \
-DMLIR_DIR=$PWD/../mlir/lib/cmake/mlir
ninja
ninja check-aie
Expand All @@ -140,24 +144,27 @@ jobs:
cmake .. \
-G Ninja \
-DAIE_COMPILER=NONE \
-DAIE_ENABLE_PYTHON_PASSES=OFF \
-DAIE_LINKER=NONE \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_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_PLATFORM_NO_VERSIONED_SONAME=ON \
-DCMAKE_VISIBILITY_INLINES_HIDDEN=ON \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_VISIBILITY_PRESET=hidden \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_VISIBILITY_PRESET=hidden \
-DAIE_COMPILER=NONE \
-DAIE_LINKER=NONE \
-DAIE_ENABLE_PYTHON_PASSES=OFF \
-DCMAKE_EXE_LINKER_FLAGS_INIT="-fuse-ld=lld" \
-DCMAKE_MODULE_LINKER_FLAGS_INIT="-fuse-ld=lld" \
-DCMAKE_MODULE_PATH=$PWD/../cmake/modulesXilinx \
-DCMAKE_PLATFORM_NO_VERSIONED_SONAME=ON \
-DCMAKE_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld" \
-DCMAKE_VISIBILITY_INLINES_HIDDEN=ON \
-DHOST_COMPILER=NONE \
-DLLVM_DIR=$PWD/../mlir/lib/cmake/llvm \
-DLLVM_ENABLE_ASSERTIONS=OFF \
-DLLVM_ENABLE_RTTI=ON \
-DCMAKE_MODULE_PATH=$PWD/../cmake/modulesXilinx \
-DMLIR_DIR=$PWD/../mlir/lib/cmake/mlir \
-DLLVM_DIR=$PWD/../mlir/lib/cmake/llvm \
-DLLVM_EXTERNAL_LIT=$(which lit) \
-DLLVM_USE_LINKER=lld \
-DLLVM_EXTERNAL_LIT=$(which lit)
-DMLIR_DIR=$PWD/../mlir/lib/cmake/mlir
ninja
ninja check-aie
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/buildAndTestRyzenAI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,21 +60,22 @@ jobs:
pushd build
export PATH=/opt/Xilinx/Vitis/2023.2/bin:/opt/Xilinx/Vitis/2023.2/aietools/bin:$PATH
# Please keep the options sorted so it is easier to compare
cmake .. -G Ninja \
-DPython3_EXECUTABLE=$(which python) \
-DCMAKE_INSTALL_PREFIX=$PWD/../mlir_aie \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DAIE_ENABLE_PYTHON_PASSES=OFF \
-DAIE_ENABLE_XRT_PYTHON_BINDINGS=ON \
-DAIE_INCLUDE_INTEGRATION_TESTS=OFF \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_EXE_LINKER_FLAGS_INIT="-fuse-ld=lld" \
-DCMAKE_INSTALL_PREFIX=$PWD/../mlir_aie \
-DCMAKE_MODULE_LINKER_FLAGS_INIT="-fuse-ld=lld" \
-DCMAKE_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld" \
-DCMAKE_MODULE_PATH=$PWD/../cmake/modulesXilinx \
-DCMAKE_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld" \
-DLLVM_EXTERNAL_LIT=$(which lit) \
-DMLIR_DIR=$PWD/../mlir/lib/cmake/mlir \
-DXRT_ROOT=/opt/xilinx/xrt \
-DAIE_ENABLE_PYTHON_PASSES=OFF \
-DAIE_ENABLE_XRT_PYTHON_BINDINGS=ON \
-DAIE_INCLUDE_INTEGRATION_TESTS=OFF
-DPython3_EXECUTABLE=$(which python) \
-DXRT_ROOT=/opt/xilinx/xrt
ninja install
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/generateDocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,17 @@ jobs:
mkdir build_release
pushd build_release
# Please keep the options sorted so it is easier to compare
cmake .. \
-DAIE_ENABLE_PYTHON_PASSES=OFF \
-DAIE_INCLUDE_DOCS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_ASSERTIONS=OFF \
-DCMAKE_MODULE_PATH=$PWD/../cmake/modulesXilinx \
-DMLIR_DIR=$PWD/../mlir/lib/cmake/mlir \
-DLLVM_DIR=$PWD/../mlir/lib/cmake/llvm \
-DLLVM_ENABLE_ASSERTIONS=OFF \
-DLLVM_EXTERNAL_LIT=$(which lit) \
-DLLVM_USE_LINKER=lld \
-DAIE_INCLUDE_DOCS=ON \
-DAIE_ENABLE_PYTHON_PASSES=OFF \
-DLLVM_EXTERNAL_LIT=$(which lit)
-DMLIR_DIR=$PWD/../mlir/lib/cmake/mlir
make docs
popd
cp -r docs/* build_release/docs
Expand Down
Loading

0 comments on commit 624e09d

Please sign in to comment.