nod-ai / iree-amd-aie

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

[InsertAIEWorkgroup] Refactor to only insert cores and rename #406

Closed jtuyls closed 3 weeks ago

jtuyls commented 3 weeks ago

Third and final PR in a sequence to remove amdaie.workgroup before the AMDAIECreateAIEWorkgroup pass. Right now, local amdaie.workgroup operations are inserted first and then consolidated into a single amdaie.workgroup operation. This flow is confusing and not necessary. As mentioned in the PR that added AMDAIECreateAIEWorkgroup (https://github.com/nod-ai/iree-amd-aie/pull/316):

I noticed that it's probably not necessary to create/insert workgroups before this pass, so I will probably get it out of InsertAIEWorkgroup in a follow-up. This will also resolve the unclarity of having both a InsertAIEWorkgroup and CreateAIEWorkgroup pass. This inconsistency is the result of some rewrites/refactoring after getting in the earlier transformations.

This PR removes the amdaie.workgroup insertion and renames AMDAIEInsertAIEWorkgroupPass to AMDAIEInsertCoresPass.

@yzhang93 Could you help review as you have the most context on this?