diff --git a/.github/workflows/buildAndTestRyzenAISw.yml b/.github/workflows/buildAndTestRyzenAISw.yml index aace4d8739..bc1c2c9f59 100644 --- a/.github/workflows/buildAndTestRyzenAISw.yml +++ b/.github/workflows/buildAndTestRyzenAISw.yml @@ -4,8 +4,7 @@ on: push: branches: - main - - ryzen-ai-sw-test -# pull_request: + pull_request: workflow_dispatch: inputs: AIE_COMMIT: @@ -13,11 +12,6 @@ on: type: string required: false default: '' - LIT_FILTER: - description: 'LIT_FILTER for tests (regex of paths in test/)' - type: string - required: false - default: '' defaults: run: @@ -38,7 +32,9 @@ jobs: name: Build and Test with Ryzen AI Software runs-on: ubuntu-latest - + strategy: + matrix: + ubuntu_version: [ "ubuntu22", "ubuntu24" ] steps: - name: Free disk space @@ -59,37 +55,36 @@ jobs: - uses: actions/checkout@v4 with: submodules: "true" - - uses: uraimo/run-on-arch-action@v2.5.0 + - uses: uraimo/run-on-arch-action@v2.7.0 name: Build and Test id: runcmd with: distro: none - base_image: ghcr.io/xilinx/mlir-aie/ubuntu22-ryzenai-1.3.0ea + base_image: ghcr.io/xilinx/mlir-aie/${{ matrix.ubuntu_version }}-ryzenai-1.3.0ea:1.0 githubToken: ${{ github.token }} dockerRunArgs: | - --mac-address ${{ secrets.XILINX_MAC }} + --mac-address 02:42:ac:11:00:02 + env: | + XILINXD_LICENSE_FILE: /opt/xilinx/Xilinx.lic run: | MLIR_DIR=$PWD pushd /workspace - # 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 > /workspace/Xilinx.lic - export XILINXD_LICENSE_FILE=/workspace/Xilinx.lic - - ccrypt -d -K ${{ secrets.RYZEN_AI_SW_KEY }} /workspace/ryzen_ai-1.3.0ea1.tgz.cpt tar xvf /workspace/ryzen_ai-1.3.0ea1.tgz pushd /workspace/ryzen_ai-1.3.0 + # The ryzen_ai-1.3 wheels are built for python3.10 + sed -i 's/python -/python3.10 -/g' install_ryzen_ai_1_3.sh ./install_ryzen_ai_1_3.sh -a yes -p /workspace/venv -l popd export LD_LIBRARY_PATH= export PYTHONPATH= source /workspace/venv/bin/activate + export LD_LIBRARY_PATH= source /opt/xilinx/xrt/setup.sh popd - + if [ x"${{ inputs.AIE_COMMIT }}" != x"" ]; then git reset --hard ${{ inputs.AIE_COMMIT }} fi @@ -121,7 +116,7 @@ jobs: -DAIE_ENABLE_PYTHON_PASSES=OFF \ -DAIE_ENABLE_XRT_PYTHON_BINDINGS=ON \ -DAIE_INCLUDE_INTEGRATION_TESTS=OFF \ - -DAIE_VITIS_COMPOONENTS="AIE2;AIE2P" \ + -DAIE_VITIS_COMPONENTS='AIE2;AIE2P' \ -DPython3_EXECUTABLE=$(which python) \ -DLLVM_EXTERNAL_LIT=$(which lit) \ -DCMAKE_INSTALL_PREFIX=/workspace/install \ diff --git a/.github/workflows/buildRyzenWheels.yml b/.github/workflows/buildRyzenWheels.yml index fe47854e3b..ad8c6c28b7 100644 --- a/.github/workflows/buildRyzenWheels.yml +++ b/.github/workflows/buildRyzenWheels.yml @@ -1,4 +1,4 @@ -name: Build wheels on/for Ryzen AI +name: Build wheels for Ryzen AI on: pull_request: @@ -22,66 +22,94 @@ concurrency: env: DEBIAN_FRONTEND: noninteractive + VITIS: /opt/ryzen_ai-1.3.0/vitis_aie_essentials XILINXD_LICENSE_FILE: /opt/xilinx/Xilinx.lic jobs: build-repo: name: Build and upload mlir_aie wheels - runs-on: amd7940hs + runs-on: ubuntu-latest permissions: id-token: write contents: write + packages: read steps: + - name: Free disk space + uses: descriptinc/free-disk-space@main + with: + tool-cache: true + android: true + dotnet: true + haskell: true + large-packages: true + swap-storage: false - uses: actions/checkout@v4 with: submodules: "true" - - uses: actions/setup-python@v5 + - uses: uraimo/run-on-arch-action@v2.7.0 + name: Build mlir-aie + id: runcmd with: - python-version: '3.10' - - - name: Build mlir-aie distro - run: | - - pip cache purge - - python -m venv aie-venv - source aie-venv/bin/activate - pip install -r python/requirements.txt - HOST_MLIR_PYTHON_PACKAGE_PREFIX=aie pip install -r python/requirements_extras.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 {} \; - - export PATH=/opt/Xilinx/Vitis/2023.2/bin:/opt/Xilinx/Vitis/2023.2/aietools/bin:$PATH - export MLIR_INSTALL_ABS_PATH=$PWD/mlir - export MLIR_AIE_SOURCE_DIR=$PWD - export WHEELHOUSE_DIR=$PWD/wheelhouse - export CMAKE_MODULE_PATH=$PWD/cmake/modulesXilinx - export XRT_ROOT=/opt/xilinx/xrt - export AIE_PROJECT_COMMIT=$(git rev-parse --short HEAD) - export DATETIME=$(date +"%Y%m%d%H") - - pushd utils/mlir_aie_wheels - - pip install wheel auditwheel patchelf importlib_metadata - CIBW_ARCHS=x86_64 pip wheel . -v -w $WHEELHOUSE_DIR --no-build-isolation - - popd - - auditwheel repair -w $WHEELHOUSE_DIR/repaired_wheel $WHEELHOUSE_DIR/mlir_aie-*.whl --plat manylinux_2_35_x86_64 --exclude libcdo_driver.so --exclude libmlir_float16_utils.so - WHL_FN=$(ls $WHEELHOUSE_DIR/repaired_wheel/mlir_aie*whl) - mv "$WHL_FN" "`echo $WHL_FN | sed "s/cp310-cp310/py3-none/"`" + distro: none + arch: none + base_image: ghcr.io/xilinx/mlir-aie/ubuntu22-ryzenai-1.3.0ea:1.1 + githubToken: ${{ github.token }} + dockerRunArgs: | + --mac-address 02:42:ac:11:00:02 + env: | + VITIS: ${{ env.VITIS }} + XILINXD_LICENSE_FILE: ${{ env.XILINXD_LICENSE_FILE }} + run: | + git config --global --add safe.directory $PWD + MLIR_VERSION=$(git rev-parse --short HEAD) + echo "Building mlir-aie version $MLIR_VERSION" + + python -m venv ${{ github.workspace }}/aie-venv + source ${{ github.workspace }}/aie-venv/bin/activate + + echo "Installing vitis_aie_essentials ..." + pushd /opt + tar xfz /workspace/vaie.tgz + popd + + pip install -r python/requirements.txt + pip install -r python/requirements_ml.txt + HOST_MLIR_PYTHON_PACKAGE_PREFIX=aie pip install -r python/requirements_extras.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 {} \; + + export PATH=$VITIS/bin:$VITIS/aietools/bin:$PATH + export MLIR_INSTALL_ABS_PATH=$PWD/mlir + export MLIR_AIE_SOURCE_DIR=$PWD + export WHEELHOUSE_DIR=$PWD/wheelhouse + export CMAKE_MODULE_PATH=$PWD/cmake/modulesXilinx + export XRT_ROOT=/opt/xilinx/xrt + export AIE_PROJECT_COMMIT=$MLIR_VERSION + export AIE_VITIS_COMPONENTS='AIE2;AIE2P' + export DATETIME=$(date +"%Y%m%d%H") + + pushd utils/mlir_aie_wheels + + pip install wheel auditwheel patchelf importlib_metadata + CIBW_ARCHS=x86_64 pip wheel . -v -w $WHEELHOUSE_DIR --no-build-isolation + + popd + + auditwheel repair -w $WHEELHOUSE_DIR/repaired_wheel $WHEELHOUSE_DIR/mlir_aie-*.whl --plat manylinux_2_35_x86_64 --exclude libcdo_driver.so --exclude libmlir_float16_utils.so + WHL_FN=$(ls $WHEELHOUSE_DIR/repaired_wheel/mlir_aie*whl) + mv "$WHL_FN" "`echo $WHL_FN | sed "s/cp310-cp310/py3-none/"`" - name: Upload mlir_aie uses: actions/upload-artifact@v3 @@ -104,14 +132,13 @@ jobs: build-wheel: name: Build wheel - - runs-on: amd7940hs - + runs-on: ubuntu-latest needs: build-repo permissions: id-token: write contents: write + packages: read strategy: fail-fast: false @@ -127,10 +154,6 @@ jobs: fetch-depth: 2 submodules: "true" - - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python_version }} - - uses: actions/download-artifact@v3 with: # unpacks default artifact into dist/ @@ -138,48 +161,65 @@ jobs: name: mlir_aie path: . - - name: Build mlir-aie python bindings - run: | - - # faster to do this twice instead of upload the directory with ~4000 files in it... - 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 {} \; - - unzip -q mlir_aie-*.whl - find mlir_aie -exec touch -a -m -t 201108231405.14 {} \; - - python -m venv aie-venv - source aie-venv/bin/activate - pip install -r python/requirements.txt - HOST_MLIR_PYTHON_PACKAGE_PREFIX=aie pip install -r python/requirements_extras.txt - 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 - - 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 - DEBUG=1 CIBW_ARCHS=x86_64 pip wheel . -v -w $WHEELHOUSE_DIR --no-build-isolation - - popd - - auditwheel repair -w $WHEELHOUSE_DIR/repaired_wheel $WHEELHOUSE_DIR/aie_python_bindings*whl --plat manylinux_2_35_x86_64 + - uses: uraimo/run-on-arch-action@v2.7.0 + name: Build mlir-aie python bindings + id: runcmd + with: + distro: none + arch: none + base_image: ghcr.io/xilinx/mlir-aie/ubuntu22-ryzenai-1.3.0ea:1.1 + githubToken: ${{ github.token }} + dockerRunArgs: | + --mac-address 02:42:ac:11:00:02 + env: | + VITIS: ${{ env.VITIS }} + XILINXD_LICENSE_FILE: ${{ env.XILINXD_LICENSE_FILE }} + run: | + git config --global --add safe.directory $PWD + MLIR_VERSION=$(git rev-parse --short HEAD) + echo "Building mlir-aie version $MLIR_VERSION ..." + + # faster to do this twice instead of upload the directory with ~4000 files in it... + 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 {} \; + + unzip -q mlir_aie-*.whl + find mlir_aie -exec touch -a -m -t 201108231405.14 {} \; + + python${{ matrix.python_version }} -m venv aie-venv + source aie-venv/bin/activate + + pip install -r python/requirements.txt + HOST_MLIR_PYTHON_PACKAGE_PREFIX=aie pip install -r python/requirements_extras.txt + 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=$VITIS/bin:$VITIS/aietools/bin:$PATH + export XRT_ROOT=/opt/xilinx/xrt + export AIE_PROJECT_COMMIT=$MLIR_VERSION + export DATETIME=$(date +"%Y%m%d%H") + + cp python/requirements.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 + DEBUG=1 CIBW_ARCHS=x86_64 pip wheel . -v -w $WHEELHOUSE_DIR --no-build-isolation + + popd + + auditwheel repair -w $WHEELHOUSE_DIR/repaired_wheel $WHEELHOUSE_DIR/aie_python_bindings*whl --plat manylinux_2_35_x86_64 - uses: geekyeggo/delete-artifact@v4 if: github.event_name == 'pull_request' diff --git a/docs/conferenceDescriptions/micro24TutorialDescription.md b/docs/conferenceDescriptions/micro24TutorialDescription.md index 1ebf26fbff..2f8ba5eeb5 100644 --- a/docs/conferenceDescriptions/micro24TutorialDescription.md +++ b/docs/conferenceDescriptions/micro24TutorialDescription.md @@ -21,30 +21,26 @@ Prerequisite: Please bring your laptop so that you can SSH into our Ryzen™ AI- | Time | Topic | Presenter | Slides or Code | |------|-------|-----------|----------------| -| 08:30am | Intro to spatial compute and explicit data movement | Kristof | [Programming Guide](../../programming_guide/) | -| 08:45am | "Hello World" from Ryzen™ AI | Joe | [AI Engine Basic Building Blocks](../../programming_guide/section-1/) | -| 09:00am | Data movement on Ryzen™ AI with objectFIFOs | Joe | [Data Movement](../../programming_guide/section-2/) | -| 09:30am | Your First Program | Kristof | [My First Program](../../programming_guide/section-3) | -| 09:50am | Exercise 1: Build and run your first program | All | [Passthrough](../../programming_examples/basic/passthrough_kernel/) | -| 10:00am | Break | | | -| 10:30am | Exercise 2: Vector-Scalar Mul | All | [Vector Scalar Mul](../../programming_examples/basic/vector_scalar_mul/) | -| 10:40am | Tracing and performance analysis | Jack | [Timers](../../programming_guide/section-4/section-4a/) and [Tracing](../../programming_guide/section-4/section-4b/) | -| 11:10am | Exercise 3: Tracing vector-scalar | All | [Vector Scalar Mul](../../programming_examples/basic/vector_scalar_mul/) | -| 11:30am | Vectorizing on AIE | Jack | [Kernel Vectorization](../../programming_guide/section-4/section-4c/) | -| 11:40am | Exercise 4: Vectorized vector-scalar | All | [Vector Scalar Mul](../../programming_examples/basic/vector_scalar_mul/) | -| 12:00pm | Dataflow and larger designs | Joe | [Example Vector Designs](../../programming_guide/section-5/) and [Large Example Designs](../../programming_guide/section-6/) | -| 12:15pm | Exercises | All | [Programming Examples](../../programming_examples/) | -| 12:30pm | Close Tutorial | All | | +| 08:00am | Intro to spatial compute and explicit data movement | Kristof | [Programming Guide](../../programming_guide/) | +| 08:15am | "Hello World" from Ryzen™ AI | Joe | [AI Engine Basic Building Blocks](../../programming_guide/section-1/) | +| 08:30am | Data movement on Ryzen™ AI with objectFIFOs | Joe | [Data Movement](../../programming_guide/section-2/) | +| 09:00am | Your First Program | Kristof | [My First Program](../../programming_guide/section-3) | +| 09:20am | Exercise 1: Build and run your first program | All | [Passthrough](../../programming_examples/basic/passthrough_kernel/) | +| 09:30am | Break | | | +| 10:00am | Exercise 2: Vector-Scalar Mul | All | [Vector Scalar Mul](../../programming_examples/basic/vector_scalar_mul/) | +| 10:10am | Tracing and performance analysis | Kristof | [Timers](../../programming_guide/section-4/section-4a/) and [Tracing](../../programming_guide/section-4/section-4b/) | +| 10:40am | Exercise 3: Tracing vector-scalar | All | [Vector Scalar Mul](../../programming_examples/basic/vector_scalar_mul/) | +| 10:50am | Vectorizing on AIE | Kristof | [Kernel Vectorization](../../programming_guide/section-4/section-4c/) | +| 11:10am | Exercise 4: Vectorized vector-scalar | All | [Vector Scalar Mul](../../programming_examples/basic/vector_scalar_mul/) | +| 11:20pm | Dataflow and larger designs | Joe | [Example Vector Designs](../../programming_guide/section-5/) and [Large Example Designs](../../programming_guide/section-6/) | +| 11:30pm | Exercises | All | [Programming Examples](../../programming_examples/) | +| 11:50pm | Close Tutorial | All | | ## Organizers -*Jack Lo* is a Senior Member of Technical Staff in AMD’s Research and Advanced Development group. At AMD, he is focused on developing tool frameworks and optimizing applications for current and future AMD devices, particularly in the area of adaptive computing and AI processing. - *Joseph Melber* is a Senior Member of Technical Staff in AMD’s Research and Advanced Development group. At AMD, he is working on hardware architectures and compiler technologies for current and future AMD devices. He received a BS in electrical engineering from the University Buffalo, as well as MS and PhD degrees from the electrical and computer engineering department at Carnegie Mellon University. His research interests include runtime systems, compiler abstractions for data movement, and hardware prototypes for future adaptive heterogeneous computing architectures. -*Andrew Schmidt* is a Senior Member of Technical Staff in the AMD University Program. At AMD, he provides tutorials, training workshops and engages with universities across undergraduate and graduate curriculum, as well as research projects. The AMD University Program offers researchers access to state-of-the-art hardware through various programs including the HPC Fund, HACC program, and donation program and offers professors and lecturers free software licenses and educational resources to support classroom teaching. He has extensive background on adaptive computing acceleration with heterogenous architectures, previously working at the University of Southern California’s Information Sciences Institute where his focus was on reconfigurable computing, computer architecture, and hardware assurance. He received his BS and MS in Computer Engineering from the University of Kansas and his PhD in Electrical Engineering from the University of North Carolina at Charlotte where his focus was on efficient utilization of heterogenous resources for High Performance Reconfigurable Computing. - *Kristof Denolf* is a Fellow in AMD's Research and Advanced Development group where he is working on energy-efficient computer vision and video processing applications to shape future AMD devices. He earned an M.Eng. in electronics from the Katholieke Hogeschool Brugge-Oostende (1998), now part of KULeuven, an M.Sc. in electronic system design from Leeds Beckett University (2000), and a Ph.D. from the Technical University Eindhoven (2007). He has over 25 years of combined research and industry experience at IMEC, Philips, Barco, Apple, Xilinx, and AMD. His main research interests are all aspects of the cost-efficient and dataflow-oriented design of video, vision, and graphics systems. -*Phil James-Roxby* is a Senior Fellow in AMD’s Research and Advanced Development group, working on compilers and runtimes to support current and future AMD devices, particularly in the domain of AI processing. In the past, he has been responsible for a number of software enablement activities for hardware devices, including SDNet and SDAccel at Xilinx, and the original development environment for the AI Engines. He holds a PhD from the University of Manchester on hardware acceleration of embedded machine learning applications, and his main research interest continues to be how to enable users to efficiently use diverse hardware in heterogeneous systems. +*Andrew Schmidt* is a Senior Member of Technical Staff in the AMD University Program. At AMD, he provides tutorials, training workshops and engages with universities across undergraduate and graduate curriculum, as well as research projects. The AMD University Program offers researchers access to state-of-the-art hardware through various programs including the HPC Fund, HACC program, and donation program and offers professors and lecturers free software licenses and educational resources to support classroom teaching. He has extensive background on adaptive computing acceleration with heterogenous architectures, previously working at the University of Southern California’s Information Sciences Institute where his focus was on reconfigurable computing, computer architecture, and hardware assurance. He received his BS and MS in Computer Engineering from the University of Kansas and his PhD in Electrical Engineering from the University of North Carolina at Charlotte where his focus was on efficient utilization of heterogenous resources for High Performance Reconfigurable Computing. diff --git a/programming_examples/basic/dma_transpose/Makefile b/programming_examples/basic/dma_transpose/Makefile index 76d3214afc..87771d1ab0 100644 --- a/programming_examples/basic/dma_transpose/Makefile +++ b/programming_examples/basic/dma_transpose/Makefile @@ -41,7 +41,7 @@ else cp _build/${targetname} $@ endif -run: ${targetname}.exe build/final.xclbin build/insts.txt +run: ${targetname}.exe build/final.xclbin ${powershell} ./$< -x build/final.xclbin -i build/insts.txt -k MLIR_AIE --M ${M} --K ${K} clean: diff --git a/programming_examples/basic/matrix_scalar_add/Makefile b/programming_examples/basic/matrix_scalar_add/Makefile index f4ab08e26d..2ef8b41066 100644 --- a/programming_examples/basic/matrix_scalar_add/Makefile +++ b/programming_examples/basic/matrix_scalar_add/Makefile @@ -56,7 +56,7 @@ vck5000: build/aie.mlir -Wl,-R/opt/xaiengine/lib \ -Wl,--whole-archive -Wl,--no-whole-archive -lstdc++ -ldl -lelf -o test.elf -run: ${targetname}.exe build/final.xclbin build/insts.txt +run: ${targetname}.exe build/final.xclbin ${powershell} ./$< -x build/final.xclbin -i build/insts.txt -k MLIR_AIE clean: diff --git a/programming_examples/basic/passthrough_dmas/Makefile b/programming_examples/basic/passthrough_dmas/Makefile index 5b61b999bf..bd5fc73651 100644 --- a/programming_examples/basic/passthrough_dmas/Makefile +++ b/programming_examples/basic/passthrough_dmas/Makefile @@ -47,7 +47,7 @@ else cp _build/${targetname} $@ endif -run: ${targetname}.exe build/final.xclbin build/insts.txt +run: ${targetname}.exe build/final.xclbin ${powershell} ./$< -x build/final.xclbin -i build/insts.txt -k MLIR_AIE -l ${LENGTH} # Changing variables when we target VCK5000 diff --git a/programming_examples/basic/vector_exp/Makefile b/programming_examples/basic/vector_exp/Makefile index a546a809c2..0101c64552 100644 --- a/programming_examples/basic/vector_exp/Makefile +++ b/programming_examples/basic/vector_exp/Makefile @@ -50,7 +50,7 @@ else cp _build/${targetname} $@ endif -run: ${targetname}.exe build/final.xclbin build/insts.txt +run: ${targetname}.exe build/final.xclbin ${powershell} ./$< -x build/final.xclbin -i build/insts.txt -k MLIR_AIE clean: diff --git a/programming_examples/basic/vector_reduce_add/Makefile b/programming_examples/basic/vector_reduce_add/Makefile index a98a1f223b..2b59a78f41 100644 --- a/programming_examples/basic/vector_reduce_add/Makefile +++ b/programming_examples/basic/vector_reduce_add/Makefile @@ -45,7 +45,7 @@ else cp _build/${targetname} $@ endif -run: ${targetname}.exe build/final.xclbin build/insts.txt +run: ${targetname}.exe build/final.xclbin ${powershell} ./$< -x build/final.xclbin -i build/insts.txt -k MLIR_AIE trace: diff --git a/programming_examples/basic/vector_reduce_max/Makefile b/programming_examples/basic/vector_reduce_max/Makefile index c642abd684..225190998c 100755 --- a/programming_examples/basic/vector_reduce_max/Makefile +++ b/programming_examples/basic/vector_reduce_max/Makefile @@ -47,7 +47,7 @@ else cp _build/${targetname} $@ endif -run: ${targetname}.exe build/final.xclbin build/insts.txt +run: ${targetname}.exe build/final.xclbin ${powershell} ./$< -x build/final.xclbin -i build/insts.txt -k MLIR_AIE trace: diff --git a/programming_examples/basic/vector_reduce_min/Makefile b/programming_examples/basic/vector_reduce_min/Makefile index 9a64469ca1..9ccfd039ae 100755 --- a/programming_examples/basic/vector_reduce_min/Makefile +++ b/programming_examples/basic/vector_reduce_min/Makefile @@ -45,7 +45,7 @@ else cp _build/${targetname} $@ endif -run: ${targetname}.exe build/final.xclbin build/insts.txt +run: ${targetname}.exe build/final.xclbin ${powershell} ./$< -x build/final.xclbin -i build/insts.txt -k MLIR_AIE trace: diff --git a/programming_examples/basic/vector_scalar_add/Makefile b/programming_examples/basic/vector_scalar_add/Makefile index 677abb9c03..730c044574 100644 --- a/programming_examples/basic/vector_scalar_add/Makefile +++ b/programming_examples/basic/vector_scalar_add/Makefile @@ -37,7 +37,7 @@ else cp _build/${targetname} $@ endif -run: ${targetname}.exe build/final.xclbin build/insts.txt +run: ${targetname}.exe build/final.xclbin ${powershell} ./$< -x build/final.xclbin -i build/insts.txt -k MLIR_AIE clean: diff --git a/programming_examples/basic/vector_scalar_add_runlist/Makefile b/programming_examples/basic/vector_scalar_add_runlist/Makefile index 677abb9c03..730c044574 100644 --- a/programming_examples/basic/vector_scalar_add_runlist/Makefile +++ b/programming_examples/basic/vector_scalar_add_runlist/Makefile @@ -37,7 +37,7 @@ else cp _build/${targetname} $@ endif -run: ${targetname}.exe build/final.xclbin build/insts.txt +run: ${targetname}.exe build/final.xclbin ${powershell} ./$< -x build/final.xclbin -i build/insts.txt -k MLIR_AIE clean: diff --git a/programming_examples/basic/vector_vector_add/Makefile b/programming_examples/basic/vector_vector_add/Makefile index eaf0a1aa39..2416e3322f 100755 --- a/programming_examples/basic/vector_vector_add/Makefile +++ b/programming_examples/basic/vector_vector_add/Makefile @@ -53,7 +53,7 @@ vck5000: build/aie.mlir ${srcdir}/../../../install/runtime_lib/x86_64-hsa/test_lib/src/test_library.cpp \ -Wl,--whole-archive -Wl,--no-whole-archive -lstdc++ -ldl -lelf -o test.elf -run: ${targetname}.exe build/final.xclbin build/insts.txt +run: ${targetname}.exe build/final.xclbin ${powershell} ./$< -x build/final.xclbin -i build/insts.txt -k MLIR_AIE clean: diff --git a/programming_examples/basic/vector_vector_modulo/Makefile b/programming_examples/basic/vector_vector_modulo/Makefile index a5a7721b52..06cbd2e327 100755 --- a/programming_examples/basic/vector_vector_modulo/Makefile +++ b/programming_examples/basic/vector_vector_modulo/Makefile @@ -56,7 +56,7 @@ vck5000: build/aie.mlir -Wl,-R/opt/xaiengine/lib \ -Wl,--whole-archive -Wl,--no-whole-archive -lstdc++ -ldl -lelf -o test.elf -run: ${targetname}.exe build/final.xclbin build/insts.txt +run: ${targetname}.exe build/final.xclbin ${powershell} ./$< -x build/final.xclbin -i build/insts.txt -k MLIR_AIE clean: diff --git a/programming_examples/basic/vector_vector_mul/Makefile b/programming_examples/basic/vector_vector_mul/Makefile index ba30fe1437..f5bbef8d3b 100755 --- a/programming_examples/basic/vector_vector_mul/Makefile +++ b/programming_examples/basic/vector_vector_mul/Makefile @@ -57,7 +57,7 @@ vck5000: build/aie.mlir -Wl,--whole-archive -Wl,--no-whole-archive -lstdc++ -ldl -lelf -o test.elf -run: ${targetname}.exe build/final.xclbin build/insts.txt +run: ${targetname}.exe build/final.xclbin ${powershell} ./$< -x build/final.xclbin -i build/insts.txt -k MLIR_AIE clean: diff --git a/programming_examples/ml/eltwise_add/Makefile b/programming_examples/ml/eltwise_add/Makefile index 2628da1fb8..eb6118cfb6 100644 --- a/programming_examples/ml/eltwise_add/Makefile +++ b/programming_examples/ml/eltwise_add/Makefile @@ -55,10 +55,10 @@ else endif -run: ${targetname}.exe build/final.xclbin build/insts.txt +run: ${targetname}.exe build/final.xclbin ${powershell} ./$< -x build/final.xclbin -i build/insts.txt -k MLIR_AIE -trace: ${targetname}.exe build/final_trace.xclbin build/insts.txt +trace: ${targetname}.exe build/final_trace.xclbin ${powershell} ./$< -x build/final_trace.xclbin -i build/insts.txt -k MLIR_AIE -t ${trace_size} ../../utils/parse_eventIR.py --filename trace.txt --mlir build/aie_trace.mlir --colshift 1 > parse_eventIR_vs.json diff --git a/programming_examples/ml/eltwise_mul/Makefile b/programming_examples/ml/eltwise_mul/Makefile index ccf87b3fe4..25f85d13bb 100644 --- a/programming_examples/ml/eltwise_mul/Makefile +++ b/programming_examples/ml/eltwise_mul/Makefile @@ -55,10 +55,10 @@ else cp _build/${targetname} $@ endif -run: ${targetname}.exe build/final.xclbin build/insts.txt +run: ${targetname}.exe build/final.xclbin ${powershell} ./$< -x build/final.xclbin -i build/insts.txt -k MLIR_AIE -trace: ${targetname}.exe build/final_trace.xclbin build/insts.txt +trace: ${targetname}.exe build/final_trace.xclbin ${powershell} ./$< -x build/final_trace.xclbin -i build/insts.txt -k MLIR_AIE -t ${trace_size} ../../utils/parse_eventIR.py --filename trace.txt --mlir build/aie_trace.mlir --colshift 1 > parse_eventIR_vs.json clean: diff --git a/programming_examples/ml/relu/Makefile b/programming_examples/ml/relu/Makefile index 4705618de9..49beea23b3 100644 --- a/programming_examples/ml/relu/Makefile +++ b/programming_examples/ml/relu/Makefile @@ -54,10 +54,10 @@ else cp _build/${targetname} $@ endif -run: ${targetname}.exe build/final.xclbin build/insts.txt +run: ${targetname}.exe build/final.xclbin ${powershell} ./$< -x build/final.xclbin -i build/insts.txt -k MLIR_AIE -trace: ${targetname}.exe build/final_trace.xclbin build/insts.txt +trace: ${targetname}.exe build/final_trace.xclbin ${powershell} ./$< -x build/final_trace.xclbin -i build/insts.txt -k MLIR_AIE -t ${trace_size} ../../utils/parse_eventIR.py --filename trace.txt --mlir build/aie_trace.mlir --colshift 1 > parse_eventIR_vs.json diff --git a/programming_examples/ml/softmax/Makefile b/programming_examples/ml/softmax/Makefile index 0f0ae172ee..41b35843af 100755 --- a/programming_examples/ml/softmax/Makefile +++ b/programming_examples/ml/softmax/Makefile @@ -68,13 +68,13 @@ else cp _build/${targetname} $@ endif -run: ${targetname}.exe build/final.xclbin build/insts.txt +run: ${targetname}.exe build/final.xclbin ${powershell} ./$< -x build/final.xclbin -i build/insts.txt -k MLIR_AIE -profile: ${targetname}.exe build/final.xclbin build/insts.txt +profile: ${targetname}.exe build/final.xclbin ${powershell} ./$< -x build/final.xclbin -i build/insts.txt -k MLIR_AIE -p results.csv -trace: ${targetname}.exe build/final_trace.xclbin build/insts.txt +trace: ${targetname}.exe build/final_trace.xclbin ${powershell} ./$< -x build/final_trace.xclbin -i build/insts.txt -k MLIR_AIE -t ${trace_size} ../../utils/parse_eventIR.py --filename trace.txt --mlir build/aie_trace.mlir --colshift 1 > parse_eventIR_vs.json diff --git a/programming_guide/section-2/section-2e/02_external_mem_to_core/Makefile b/programming_guide/section-2/section-2e/02_external_mem_to_core/Makefile index 360f443dd1..fb36b7c9fd 100644 --- a/programming_guide/section-2/section-2e/02_external_mem_to_core/Makefile +++ b/programming_guide/section-2/section-2e/02_external_mem_to_core/Makefile @@ -37,7 +37,7 @@ else cp _build/${targetname} $@ endif -run: ${targetname}.exe build/final.xclbin build/insts.txt +run: ${targetname}.exe build/final.xclbin ${powershell} ./$< -x build/final.xclbin -i build/insts.txt -k MLIR_AIE clean: diff --git a/programming_guide/section-2/section-2e/03_external_mem_to_core_L2/Makefile b/programming_guide/section-2/section-2e/03_external_mem_to_core_L2/Makefile index 1a14f5d5a8..6561ad00fb 100644 --- a/programming_guide/section-2/section-2e/03_external_mem_to_core_L2/Makefile +++ b/programming_guide/section-2/section-2e/03_external_mem_to_core_L2/Makefile @@ -37,7 +37,7 @@ else cp _build/${targetname} $@ endif -run: ${targetname}.exe build/final.xclbin build/insts.txt +run: ${targetname}.exe build/final.xclbin ${powershell} ./$< -x build/final.xclbin -i build/insts.txt -k MLIR_AIE clean: diff --git a/programming_guide/section-2/section-2e/04_distribute_L2/Makefile b/programming_guide/section-2/section-2e/04_distribute_L2/Makefile index 902ebbb30b..f85f6d8373 100644 --- a/programming_guide/section-2/section-2e/04_distribute_L2/Makefile +++ b/programming_guide/section-2/section-2e/04_distribute_L2/Makefile @@ -37,7 +37,7 @@ else cp _build/${targetname} $@ endif -run: ${targetname}.exe build/final.xclbin build/insts.txt +run: ${targetname}.exe build/final.xclbin ${powershell} ./$< -x build/final.xclbin -i build/insts.txt -k MLIR_AIE clean: diff --git a/programming_guide/section-2/section-2e/05_join_L2/Makefile b/programming_guide/section-2/section-2e/05_join_L2/Makefile index aedfb86167..a05d31c899 100644 --- a/programming_guide/section-2/section-2e/05_join_L2/Makefile +++ b/programming_guide/section-2/section-2e/05_join_L2/Makefile @@ -37,7 +37,7 @@ else cp _build/${targetname} $@ endif -run: ${targetname}.exe build/final.xclbin build/insts.txt +run: ${targetname}.exe build/final.xclbin ${powershell} ./$< -x build/final.xclbin -i build/insts.txt -k MLIR_AIE clean: diff --git a/programming_guide/section-3/Makefile b/programming_guide/section-3/Makefile index 7b0a84983b..33f0868060 100644 --- a/programming_guide/section-3/Makefile +++ b/programming_guide/section-3/Makefile @@ -39,7 +39,7 @@ else cp _build/${targetname} $@ endif -run: ${targetname}.exe build/final.xclbin build/insts.txt +run: ${targetname}.exe build/final.xclbin ${powershell} ./$< -x build/final.xclbin -i build/insts.txt -k MLIR_AIE run_py: build/final.xclbin build/insts.txt diff --git a/programming_guide/section-4/section-4a/Makefile b/programming_guide/section-4/section-4a/Makefile index b301cd5d6d..811831920a 100644 --- a/programming_guide/section-4/section-4a/Makefile +++ b/programming_guide/section-4/section-4a/Makefile @@ -39,7 +39,7 @@ else cp _build/${targetname} $@ endif -run: ${targetname}.exe build/final.xclbin build/insts.txt +run: ${targetname}.exe build/final.xclbin ${powershell} ./$< -x build/final.xclbin -i build/insts.txt -k MLIR_AIE run-10: ${targetname}.exe build/final.xclbin build/insts.txt diff --git a/utils/mlir_aie_wheels/setup.py b/utils/mlir_aie_wheels/setup.py index c801f50951..60ae6df5d1 100644 --- a/utils/mlir_aie_wheels/setup.py +++ b/utils/mlir_aie_wheels/setup.py @@ -142,7 +142,7 @@ def build_extension(self, ext: CMakeExtension) -> None: "-DCMAKE_PLATFORM_NO_VERSIONED_SONAME=ON", "-DLLVM_CCACHE_BUILD=ON", f"-DLLVM_ENABLE_RTTI={os.getenv('ENABLE_RTTI', 'ON')}", - "-DAIE_VITIS_COMPONENTS=AIE2;AIE2P", + f"-DAIE_VITIS_COMPONENTS={os.getenv('AIE_VITIS_COMPONENTS', 'AIE2')}", "-DAIE_ENABLE_BINDINGS_PYTHON=ON", "-DAIE_ENABLE_PYTHON_PASSES=OFF", "-DMLIR_DETECT_PYTHON_ENV_PRIME_SEARCH=ON",