Skip to content

Commit

Permalink
AIRCopyToDma: Compose a chain of memref ops to src/dst memrefs, as ca…
Browse files Browse the repository at this point in the history
…nonicalizer (#749)

* Purge condenseMemrefDataReorderingToAIRDma from -air-dma-to-copy

* Reimplement condenseMemrefDataReorderingToAIRDma as canonicalizer to air.channel.put/get and air.dma_memcpy_nd

* Switch to use replaceOpWithNewOp method for patterns; fixup comments

* Fixup typo

* Call canonicalization pattern at the end of copyToDma
  • Loading branch information
erwei-xilinx authored Oct 24, 2024
1 parent 9160ca7 commit 0541d96
Show file tree
Hide file tree
Showing 6 changed files with 566 additions and 575 deletions.
3 changes: 3 additions & 0 deletions mlir/include/air/Dialect/AIR/AIR.td
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ def air_DmaMemcpyNdOp: air_Op<"dma_memcpy_nd",
return -1;
}
}];
let hasCanonicalizer = 1;
}

def air_WaitAllOp: air_Op<"wait_all", [air_AsyncOpInterface]> {
Expand Down Expand Up @@ -404,6 +405,7 @@ def air_ChannelPutOp : air_Op<"channel.put", [air_AsyncOpInterface,
return -1;
}
}];
let hasCanonicalizer = 1;
}

def air_ChannelGetOp : air_Op<"channel.get", [air_AsyncOpInterface,
Expand Down Expand Up @@ -445,6 +447,7 @@ def air_ChannelGetOp : air_Op<"channel.get", [air_AsyncOpInterface,
return -1;
}
}];
let hasCanonicalizer = 1;
}

// AIR asynchronous region for dynamic event dispatching.
Expand Down
Loading

0 comments on commit 0541d96

Please sign in to comment.