Color detect (#777) #244
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Test with AIE tools on Ryzen AI | |
on: | |
push: | |
branches: | |
- main | |
- test-ryzen-ai | |
pull_request: | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: bash | |
concurrency: | |
group: ci-build-test-ryzenai | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
XILINXD_LICENSE_FILE: /opt/xilinx/Xilinx.lic | |
jobs: | |
build-repo: | |
name: Build and Test | |
runs-on: amd7940hs | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: "true" | |
- name: Run commands | |
run: | | |
python -m venv aie-venv | |
source aie-venv/bin/activate | |
pip install -r utils/requirements.txt | |
pip install lit | |
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 {} \; | |
mkdir build | |
cd build | |
export PATH=/opt/Xilinx/Vitis/2023.2/bin:/opt/Xilinx/Vitis/2023.2/aietools/bin:$PATH | |
cmake .. -G Ninja \ | |
-DMLIR_DIR=$PWD/../mlir/lib/cmake/mlir \ | |
-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_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld" \ | |
-DCMAKE_C_COMPILER_LAUNCHER=ccache \ | |
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
-DXRT_ROOT=/opt/xilinx/xrt \ | |
-DAIE_ENABLE_PYTHON_PASSES=OFF \ | |
-DCMAKE_INSTALL_PREFIX=install | |
ninja install | |
sed -i.bak 's/-sv --timeout 600/-sv --timeout 600 -j12 --show-unsupported/g' $PWD/../test/CMakeLists.txt | |
sed -i.bak 's/-sv --timeout 300/-sv --timeout 600 -j12 --show-unsupported/g' $PWD/../reference_designs/CMakeLists.txt | |
ninja check-aie | |
ninja check-reference-designs |