Closed makslevental closed 3 months ago
After an inordinant amount of thrashing, this PR is ready for review @daveliddell @newling @nirvedhmeshram
Also just making sure this is working e2e for some matmul example for Chess as well locally for you since we dont test that in CI but it is something we definitely care about.
Chess shouldn't be affected at all here but sure I can test that locally.
Adding the full iree-compile
command (that I basically pulled from run_matmul_test.sh
):
iree-compile \
test_matmuls/mm_test1_bf16_f32_m64_n64_k64_ir.mlir \
--iree-hal-target-backends=amd-aie \
--iree-amdaie-lower-to-aie-pipeline=air \
--iree-amdaie-tile-pipeline=pad-pack \
--iree-amd-aie-peano-install-dir=/tmp/llvm-aie \
--iree-amd-aie-mlir-aie-install-dir=/tmp/mlir_aie \
--iree-amd-aie-install-dir=/tmp/iree-install \
--iree-amd-aie-vitis-install-dir=/opt/Xilinx/Vitis/2023.2 \
--iree-hal-dump-executable-files-to=test_matmuls \
--iree-amd-aie-show-invoked-commands \
-o test_matmuls/mm_test1_bf16_f32_m64_n64_k64.vmfb
I'll note here though that these tests currently do not pass with Peano tip so the iree-amd-aie-peano-install-dir=/tmp/llvm-aie
is the same that we have here in CI. This is next on my TODO list (update our CI to use tip Peano).
Doing
export PATH=/opt/Xilinx/Vitis/2023.2/aietools/bin:$PATH
export VITIS=/opt/Xilinx/Vitis/2023.2
and adding --iree-amd-aie-enable-chess=true
to the above command works.
Of course this is all very annoying but I have fixes/QoL improvements for this too in upcoming PRs.
This PR adds executable targets to our CMakes to build both
xclbinutil
andbootgen
; previously these were fetched/gotten from a distro ofmlir-aie
and/or env. We already have these same submodules (XRT
andbootgen
) so the only thing we're really vendoring here is the CMake. The advantages of this are :me_basic.o
(once https://github.com/Xilinx/llvm-aie/pull/109 lands) we will no longer need a distro ofmlir-aie
(but obv still need the submodule for a little while longer);XRT
's xclbinutil);Note, all of the CMake shenanigans are very necessary because the respective code bases are quite questionable...............
Note also that it's clear
XCLBinGenConfig
needlessly duplicates many of the options inAMDAIEOptions
. I'll get rid of the former in the a follow-up PR (see https://github.com/nod-ai/iree-amd-aie/issues/504).[^1]: Indeed
bootgen
is already here asbootgen-lib
.