Open josemonsalve2 opened 4 months ago
Makes sense, thanks for the clear description. I can confirm that when I run
iree-compile --mlir-disable-threading --iree-hal-target-backends=amd-aie test.mlir --iree-amd-aie-mlir-aie-install-dir=dir0 --iree-amd-aie-peano-install-dir=dir1 --iree-amd-aie-vitis-install-dir=dir2 -o test.vmfb
I see
Generating: /tmp/amdaie_xclbin_fb-085db8/aie_cdo_elfs.bin
Generating: /tmp/amdaie_xclbin_fb-085db8/aie_cdo_init.bin
Generating: /tmp/amdaie_xclbin_fb-085db8/aie_cdo_enable.bin
****** Bootgen v2024.1
**** Build date : Jun 14 2024-13:59:59
** Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
** Copyright 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
[INFO] : Bootimage generated successfully
XRT Build Version: 2.18.22 (master)
Build Date: 2024-05-21 20:14:13
Hash ID: c678a9469f9b20fcb9a04bbedb5c51f8473faec0
Creating a default 'in-memory' xclbin image.
Section: 'MEM_TOPOLOGY'(6) was successfully added.
Size : 88 bytes
Format : JSON
File : '/tmp/amdaie_xclbin_fb-085db8/mem_topology.json'
Section: 'AIE_PARTITION'(32) was successfully added.
Size : 76592 bytes
Format : JSON
File : '/tmp/amdaie_xclbin_fb-085db8/aie_partition.json'
Info: Embedded Metadata section is missing project.platform.device.core element, adding it.
Successfully wrote (82706 bytes) to the output file: /tmp/amdaie_xclbin_fb-085db8/matmul_int32_dispatch_0_matmul_128x128x256_0.xclbin
Leaving xclbinutil.
And that logging should really be off by default (I'm not even sure if there's an option to remove it). I'll investigate this
I suppose that's a partial solution (better than your current solution!) but I also wonder if there's a better fix at the python level, to separate any logging which might appear, from the vmfb. i.e. an equivalent of the "-o test.vmfb" we use at the command-line. I'm not sure if this already exists (I haven't used the python API) --maybe a good question for the public discord IREE channel.
Yes, I felt this was more of an IREE binding bug, than a AIE bug. But since it is hard to reproduce outside of this right now, I might as well start here.
Removed some of the printing here: https://github.com/Xilinx/mlir-aie/pull/1583/files and here: https://github.com/Xilinx/bootgen/pull/34
So that should make it nice and quiet on the iree-compile side.
No idea how long it will take for the above PRs to filter through to us though
Hi all,
I am having some issues with the compiler Python bindings and AIE support.
In my setup, I have the XRT and XDNA driver built in debug mode.
For the following code:
I can build it with the following command:
And I get this output:
The problem seems to be the output from the binary utilities for the AIE. When using the Python bindings, this text is prepended into the compiler's output.
Let's take an example of a python code:
I get the following error:
If I try to print the output of the compilation, I get the following: Python code:
The text output [trunkated]:
The binary output [Trunkated]:
You can notice the text at the beginning:
Which causes the corruption of the module in the
copy_buffer
function.A current trick I use is to search for
PK\x03\04
and remove all the previous content. That seems to work.But this is not a propper solution.