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] Support implicit source/target addressing in amdaie.npu.dma_cpy_nd #505

Closed Abhishek-Varma closed 17 hours ago

Abhishek-Varma commented 6 days ago

-- This commit adds a fix for supporting implicit source/target addressing in amdaie.npu.dma_cpy_nd ops as part of --iree-amdaie-lower-to-aie pass.

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

Abhishek-Varma commented 18 hours ago

Hi @jtuyls - I've addressed your changes.

Note: For the size/stride check only one lit test would suffice because staticSize/staticStride size is same - so we only need to check on shapeArr.size() being greater than that at the beginning of static metadata formation.

jtuyls commented 17 hours ago

Hi @jtuyls - I've addressed your changes.

Note: For the size/stride check only one lit test would suffice because staticSize/staticStride size is same - so we only need to check on shapeArr.size() being greater than that at the beginning of static metadata formation.

That's not really guaranteed from the function's perspective right? Someone could change the sizes of the size and stride vectors so they're not the same anymore? You could add an assert to ensure the sizes are the same.

Abhishek-Varma commented 17 hours ago

Hi @jtuyls - I've addressed your changes. Note: For the size/stride check only one lit test would suffice because staticSize/staticStride size is same - so we only need to check on shapeArr.size() being greater than that at the beginning of static metadata formation.

That's not really guaranteed from the function's perspective right? Someone could change the sizes of the size and stride vectors so they're not the same anymore? You could add an assert to ensure the sizes are the same.

Sure. I've added an assert now within the function.