Skip to content

Commit

Permalink
CI Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
eddierichter-amd committed Mar 21, 2024
1 parent 40bd347 commit 6851e9c
Showing 1 changed file with 71 additions and 83 deletions.
154 changes: 71 additions & 83 deletions .github/workflows/buildAndTestAieToolsHsa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,89 +70,77 @@ jobs:
sudo apt update
sudo apt install rocm-hip-runtime-dev5.6.0 && sudo apt-get clean
- uses: uraimo/run-on-arch-action@v2.5.0
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
cd /
git clone https://github.com/Xilinx/mlir-aie.git
cd /mlir-aie
- name: Run commands
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
# Downloading the ROCm air platforms
apt install pkg-config
echo "Cloning ROCm AIR"
source utils/clone-rocm-air-platforms.sh
echo "Building ROCt"
source ROCm-air-platforms/utils/clone-build-roct.sh
echo "Building ROCr"
source ROCm-air-platforms/utils/clone-build-rocr.sh
# Downloading the ROCm air platforms
source utils/clone-rocm-air-platforms.sh
source ROCm-air-platforms/utils/clone-build-roct.sh
source ROCm-air-platforms/utils/clone-build-rocr.sh
# Need to install external libxaie
source utils/github-clone-build-libxaie.sh
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
cmake .. -G Ninja \
-DLibXAIE_ROOT=`pwd`/../aienginev2/install \
-Dhsakmt_DIR=`pwd`/../rocm/lib/cmake/hsakmt/ \
-DAIE_RUNTIME_TARGETS=x86_64-hsa \
-DAIE_RUNTIME_TEST_TARGET=x86_64-hsa \
-Dhsa-runtime64_DIR=`pwd`/../rocm/lib/cmake/hsa-runtime64/ \
-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_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld" \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_INSTALL_PREFIX=install
# Need to install external libxaie
source utils/github-clone-build-libxaie.sh
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
cmake .. -G Ninja \
-DLibXAIE_ROOT=`pwd`/../aienginev2/install \
-Dhsakmt_DIR=`pwd`/../rocm/lib/cmake/hsakmt/ \
-DAIE_RUNTIME_TARGETS=x86_64-hsa \
-DAIE_RUNTIME_TEST_TARGET=x86_64-hsa \
-Dhsa-runtime64_DIR=`pwd`/../rocm/lib/cmake/hsa-runtime64/ \
-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_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld" \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_INSTALL_PREFIX=install
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
ninja check-reference-designs
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
ninja check-reference-designs

0 comments on commit 6851e9c

Please sign in to comment.