Enable ipu run script #4
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: | |
- test-ryzen-ai | |
workflow_dispatch: | |
inputs: | |
AIE_COMMIT: | |
description: 'which aie commit to build' | |
type: string | |
required: false | |
default: '' | |
LIT_FILTER: | |
description: 'LIT_FILTER for tests (regex of paths in test/)' | |
type: string | |
required: false | |
default: 'dialect|Conversion|Targets|Integration|python' | |
defaults: | |
run: | |
shell: bash | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
jobs: | |
build-repo: | |
name: Build and Test | |
runs-on: amd7940hs | |
steps: | |
- name: Docker prune | |
shell: bash | |
run: | | |
docker system prune -a -f | |
- uses: actions/checkout@v3 | |
with: | |
submodules: "true" | |
- uses: uraimo/[email protected] | |
name: Run commands | |
id: runcmd | |
with: | |
distro: none | |
base_image: ghcr.io/xilinx/mlir-aie/xilinx:latest | |
githubToken: ${{ github.token }} | |
dockerRunArgs: | | |
--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 | |
mkdir build | |
cd build | |
cmake .. -G Ninja \ | |
-DMLIR_DIR=/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 \ | |
-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 \ | |
-DCMAKE_INSTALL_PREFIX=install | |
ninja install | |
cp /usr/lib/firmware/amdaie/1502/1x4.xclbin install/data/1x4.xclbin | |
sed -i.bak 's/-sv --timeout 600/-sv --timeout 600 -j12/g' ../test/CMakeLists.txt | |
PATH=/opt/Xilinx/Vitis/2023.2/aietools/bin:$PATH ninja check-aie |