nod-ai / iree-amd-aie

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

[WIP] Lower memref.alloc to amdaie.buffer #813

Closed newling closed 1 month ago

newling commented 1 month ago

This along with https://github.com/nod-ai/iree-amd-aie/pull/811 gets depthwise convolution with packing working again

Abhishek-Varma commented 1 month ago

Hi @newling

Could you use this pass instead after AMDAIEObjectfifoBufferization ?

I don't think we would be needing this PR.

Also, I'll be raising a PR in a while enabling the above (merged) pass by default in the main pipeline (along with removing some constraints from vectorization changes for "Matmul + truncf").

EDIT: Rather if the already merged pass works, you can modify this PR title to maybe "Enable iree-amdaie-temporary-alloc-bufferization" and keep just the enabling change in Passes.cpp ?

newling commented 1 month ago

Hi @newling

Could you use this pass instead after AMDAIEObjectfifoBufferization ?

I don't think we would be needing this PR.

Also, I'll be raising a PR in a while enabling the above (merged) pass by default in the main pipeline.

Ok, cool, I'll try this tomorrow. Thanks for keeping an eye on the PRs and seeing this one appear!

newling commented 1 month ago

@Abhishek-Varma your pass does the trick for me.

One caveat: if someone adds HoistStaticallyBoundAllocationsPass before AMDAIEObjectfifoBufferization then the pass doesn't work, because the pass assumes the temporary allocations are inside the CoreOps. I might make a PR to address this later...