nod-ai / iree-amd-aie

IREE plugin repository for the AMD AIE accelerator
Apache License 2.0
69 stars 30 forks source link

Fix bug in PushToQueue address generation #912

Closed jtuyls closed 1 day ago

jtuyls commented 1 day ago

The address generation for the PushToQueue op is incorrect for column != 0 and row == 0 as the condition col && row is not true. There is not need for this condition and the base tile address can always be computed as ((col & 0xff) << colShift) | ((row & 0xff) << rowShift), see: https://github.com/Xilinx/aie-rt/blob/3fdf8d8d9a7a2abcd8df76155f950680607eac8a/driver/src/common/xaie_helper.h#L159

Note that we don't see this issue in main right now and this is prefetching an issue that's occurring on 4x4.

newling commented 1 day ago

Ouch, this looks like it must have been really difficult to find.