-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
12 additions
and
32 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ defaults: | |
|
||
env: | ||
DEBIAN_FRONTEND: noninteractive | ||
XILINXD_LICENSE_FILE: /opt/xilinx/Xilinx.lic | ||
|
||
jobs: | ||
build-repo: | ||
|
@@ -32,47 +33,26 @@ jobs: | |
|
||
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 | ||
env: | ||
DEVICE_CGROUP_RULES: "'c 261:* rmw'" | ||
with: | ||
distro: none | ||
base_image: ghcr.io/xilinx/mlir-aie/xilinx:latest | ||
githubToken: ${{ github.token }} | ||
dockerRunArgs: | | ||
--mac-address ${{ secrets.XILINX_MAC }} | ||
-v /usr/lib/firmware/amdaie/1502:/usr/lib/firmware/amdaie/1502 | ||
-v /opt/xilinx:/opt/xilinx | ||
-v /dev:/dev | ||
--device-cgroup-rule $DEVICE_CGROUP_RULES | ||
run: | | ||
cp -a $PWD /mlir-aie | ||
- name: Run commands | ||
run: | | ||
# 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 | ||
python -m venv aie-venv | ||
source aie-venv/bin/activate | ||
pip install cmake numpy psutil pybind11 rich pkginfo lit PyYAML | ||
cd / | ||
pip -q download mlir -f https://makslevental.github.io/wheels && unzip -q mlir-18*.whl | ||
mkdir /build | ||
cd /build | ||
mkdir build | ||
cd build | ||
export PATH=/opt/Xilinx/Vitis/2023.2/bin:/opt/Xilinx/Vitis/2023.2/aietools/bin:$PATH | ||
cmake /mlir-aie -G Ninja \ | ||
-DMLIR_DIR=/mlir/lib/cmake/mlir \ | ||
-DCMAKE_MODULE_PATH=/mlir-aie/cmake/modulesXilinx \ | ||
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 \ | ||
-DCMAKE_EXE_LINKER_FLAGS_INIT="-fuse-ld=lld" \ | ||
|
@@ -86,5 +66,5 @@ jobs: | |
cp /usr/lib/firmware/amdaie/1502/1x4.xclbin data/1x4.xclbin | ||
cp /usr/lib/firmware/amdaie/1502/1x4.xclbin install/data/1x4.xclbin | ||
sed -i.bak 's/-sv --timeout 600/-sv --timeout 600 -j12 --show-unsupported/g' /mlir-aie/test/CMakeLists.txt | ||
sed -i.bak 's/-sv --timeout 600/-sv --timeout 600 -j12 --show-unsupported/g' $PWD/../test/CMakeLists.txt | ||
ninja check-aie |