nod-ai / iree-amd-aie

IREE plugin repository for the AMD AIE accelerator
Apache License 2.0
46 stars 23 forks source link

[AMD-AIE] Fix UnrollAndDistributeWorkgroup pass for non-normalised loop bound #374

Closed Abhishek-Varma closed 1 month ago

Abhishek-Varma commented 1 month ago

-- This commit adds a fix to --iree-amdaie-unroll-and-distribute-workgroup pass in order to handle non-normalised loop bounds.

Signed-off-by: Abhishek Varma abhvarma@amd.com

Abhishek-Varma commented 1 month ago

Relaying message from the WIP PR for adding C++ pipeline : https://github.com/nod-ai/iree-amd-aie/pull/368#issuecomment-2126755096

This helps fix a crash when trying to use the C++ pipeline -> the amdaie.tile op is hoisted out to the beginning of the amdaie.workgroup, but while trying to do so we're creating an invalid IR since the operand of the amdaie.tile is tied to the loop IV. This itself turned out to be a red-herring since the current implementation of the pass adds a strict check for normalised loop bounds, as a result of which it never unrolls the SCF loop and spuriously hoists the amdaie.tile op.