nod-ai / iree-amd-aie

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

Decouple packToDma pass from AIR pipeline #773

Closed yzhang93 closed 2 months ago

yzhang93 commented 2 months ago

It's not necessary to go from LinalgExt::PackOp -> air::DmaMemcpyNdOp -> AMDAIE::DmaCpyNdOp. With packToDma pass decoupled from AIR pipeline, we can refactor the codes to convert directly from PackOp to AMDAIE::DmaCpyNdOp (will address in the next PR).

For AIR pipeline, DecomposeLinalgExtPackUnPackToAIR can be used for both pack-peel and pad-pack pipelines. It doesn't have use packToDma pass. As a consequence, AMDAIECanonicalizeDma pass can also be eliminated, since similar logic already exists in MLIR-AIR and AMDAIECanonicalizeDoublyStridedOp for objectFifo.

erwei-xilinx commented 2 months ago

Makes sense to me re AIR. Thanks!