Fixes for building with Ryzen AI Software 1.3.0
Two changes here:
-
The Ryzen AI Software 1.3.0 installer installs things into a python venv. The binaries are put in the venv binary path (e.g.
venv/bin) whereas the libraries and headers are installed into the python site-packages directory (e.g.venv/lib/python3.10/site-packages/include). This means that just using the path ofxchessccis not adequate for findingAIETOOLS_DIRpath. So, this PR updates FindAIETools.cmake to search foradf.hto locate the include path instead of inferring it from the binary path. Then,AIETOOLS_DIRpath is the parent of the include dir. -
Make DSP lib optional because it is not present in the Ryzen AI software installation.
Without this I get errors like:
[139/591] Generating mm.o
FAILED: aie_kernels/mm.o /workspace/build/aie_kernels/mm.o
cd /workspace/build/aie_kernels && /workspace/mlir-aie/tools/chess-clang/xchesscc_wrapper AIE2 -aietools /workspace/venv -I /workspace/venv/include -c /workspace/mlir-aie/aie_kernels/mm.cc -o /workspace/build/aie_kernels/mm.o
Error: Couldn't open "/workspace/venv/data/aie_ml/lib/me.prx": no such file or directory
xchesscc Failed
The Program xchesscc has encountered an unexpected error exiting ... xchesscc Failed