CascadeFlowOp and ConfigureCascadeOp #1137
Workflow file for this run
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: | |
# A PR number if a pull request and otherwise the commit hash. This cancels | |
# queued and in-progress runs for the same PR (presubmit) or commit | |
# (postsubmit). | |
group: ci-build-test-ryzenai-${{ github.event.number || github.sha }} | |
cancel-in-progress: true | |
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: | | |
pip cache purge | |
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 | |
# 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 | |
pushd build | |
export PATH=/opt/Xilinx/Vitis/2023.2/bin:/opt/Xilinx/Vitis/2023.2/aietools/bin:$PATH | |
cmake .. -G Ninja \ | |
-DPython3_EXECUTABLE=$(which python) \ | |
-DCMAKE_INSTALL_PREFIX=$PWD/../mlir_aie \ | |
-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/../mlir/lib/cmake/mlir \ | |
-DXRT_ROOT=/opt/xilinx/xrt \ | |
-DAIE_ENABLE_GENERATE_CDO_DIRECT=ON \ | |
-DAIE_ENABLE_PYTHON_PASSES=OFF \ | |
-DAIE_ENABLE_XRT_PYTHON_BINDINGS=ON \ | |
-DAIE_INCLUDE_INTEGRATION_TESTS=OFF | |
ninja install | |
# hack: timed out tests aren't fails... | |
LIT_PATH=$(python -c "import lit; from pathlib import Path; print(Path(lit.__file__).parent)") | |
sed -i.bak 's/TIMEOUT = ResultCode("TIMEOUT", "Timed Out", True)/TIMEOUT = ResultCode("TIMEOUT", "Timed Out", False)/g' $LIT_PATH/Test.py | |
sed -i.bak 's/-sv --timeout 600/-sv --time-tests --timeout 600 -j12 --show-unsupported --show-excluded/g' $PWD/../test/CMakeLists.txt | |
LIT_FILTER_OUT=test/ipu-xrt/e2e ninja check-aie | |
sed -i.bak 's/-sv --timeout 600/-sv --time-tests --timeout 600 -j12 --show-unsupported --show-excluded/g' $PWD/../reference_designs/CMakeLists.txt | |
ninja check-reference-designs | |
popd | |
- name: Build mlir-aie python bindings | |
run: | | |
source aie-venv/bin/activate | |
export MLIR_INSTALL_ABS_PATH=$PWD/mlir | |
export MLIR_AIE_INSTALL_ABS_PATH=$PWD/mlir_aie | |
export WHEELHOUSE_DIR=$PWD/wheelhouse | |
export CMAKE_MODULE_PATH=$PWD/cmake/modulesXilinx | |
export PATH=/opt/Xilinx/Vitis/2023.2/bin:/opt/Xilinx/Vitis/2023.2/aietools/bin:$PATH | |
export XRT_ROOT=/opt/xilinx/xrt | |
export AIE_PROJECT_COMMIT=$(git rev-parse --short HEAD) | |
export DATETIME=$(date +"%Y%m%d%H") | |
cp python/requirements.txt utils/mlir_aie_wheels/python_bindings | |
cp python/aie-python-extras-req.txt utils/mlir_aie_wheels/python_bindings | |
pushd utils/mlir_aie_wheels/python_bindings | |
pip install wheel auditwheel patchelf | |
CIBW_ARCHS=x86_64 pip wheel . -v -w $WHEELHOUSE_DIR --no-build-isolation | |
auditwheel repair -w $WHEELHOUSE_DIR/repaired_wheel $WHEELHOUSE_DIR/aie-*.whl --plat manylinux_2_35_x86_64 | |
popd | |
- name: Install and test mlir-aie python bindings | |
run: | | |
source aie-venv/bin/activate | |
pip install wheelhouse/repaired_wheel/aie-*.whl --force-reinstall | |
export VITIS_DIR=/opt/Xilinx/Vitis/2023.2 | |
export XRT_ROOT=/opt/xilinx/xrt | |
export XILINXD_LICENSE_FILE=/opt/xilinx/Xilinx.lic | |
# wget -q https://raw.githubusercontent.com/gitGNU/gnu_parallel/master/src/parallel | |
# chmod +x parallel | |
# ls test/ipu-xrt/e2e/*.py | grep -v vectorized | ./parallel -j12 "python {}" | |
# python test/ipu-xrt/e2e/square_matrix_mult.py |