nod-ai / iree-amd-aie

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

[CombineStridedOps] Add a combinable case #839

Closed yzhang93 closed 1 month ago

yzhang93 commented 1 month ago

This PR adds a corner case for strided op combination. With this PR, the following strides ops:

48 = amdaie.npu.dma_cpy_nd %8([] [] [], %31[0, %45] [32, 64] [128, 1]) : source_type = !amdaie.logicalobjectfifo<memref<16384xi32>>
%49 = amdaie.npu.dma_cpy_nd %8([] [] [], %31[32, %45] [96, 64] [128, 1]) : source_type = !amdaie.logicalobjectfifo<memref<16384xi32>>

can be combined as

%48 = amdaie.npu.dma_cpy_nd %8([] [] [], %31[0, %45] [128, 64] [128, 1]) : source_type = !amdaie.logicalobjectfifo<memref<16384xi32>>

Addressed review comments https://github.com/nod-ai/iree-amd-aie/pull/826#discussion_r1792561366.