Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packet-flow routing at SHIM DMA MM2S channels, for control packets #712

Merged
merged 15 commits into from
Aug 16, 2024

Conversation

erwei-xilinx
Copy link
Collaborator

@erwei-xilinx erwei-xilinx commented Aug 14, 2024

This PR adds to air-to-aie the option to insert-control-packet-flow, which performs the following actions:

  • It generates aie.packet_flow instead of aie.flow ops for any shim dma mm2s streaming connections. Packet-flow routing allows for sharing of shim dma channels as fanout.
  • For each column used in the design, it spawns a network of packet-flow routings between the column's shim dma mm2s channels, and the CTRL port of all tiles in that column.

TODO: board test added in this PR shall fail for now, until mlir-aie's pathfinder for packet-flow allocation is updated.
TODO: the new board test shall pass once this PR lands in mlir-aie: Xilinx/mlir-aie#1694
TODO: bump mlir-aie once pathfinder update has landed.

@erwei-xilinx
Copy link
Collaborator Author

Cc: @Yu-Zhewen

Comment on lines +3244 to +3246
// Create an overlay of packet flow network sending control packets from shim
// dma mm2s channels to tiles in a column.
void createControlPacketFlow(AIE::DeviceOp device) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell this is a mlir-aie transformation. Can we put it there instead? If it was generalized a bit then it could already be used to fix this which is just a very small control overlay. It could be inserted with a pass instead. And I can think of several other uses.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that makes great sense to me. It could totally become an mlir-aie pass, because it was only looking at aie.tile ops in the IR.

This overlay being generated comes with some constraints though. One thing that I haven't figure out is, if the mlir-aie design already has circuit-switch routed shim dma mm2s channel usage, then we certainly cannot use those channels for control packets. In AIR that was easily controlled, because we generate the whole design, and we can force the design to never circuit-switch reserve any shim s2mm channels to begin with. Whereas if this one becomes an mlir-aie pass, then I haven't figured out how to make this overlay flexible to an existing aie design, while still enfocing full connectivitly to every tile's control port...

Maybe we can discuss this in greater details in our meeting on Friday?

@erwei-xilinx erwei-xilinx marked this pull request as ready for review August 16, 2024 20:11
@erwei-xilinx erwei-xilinx enabled auto-merge (squash) August 16, 2024 22:02
@erwei-xilinx erwei-xilinx merged commit b72ff2b into Xilinx:main Aug 16, 2024
11 checks passed
@erwei-xilinx erwei-xilinx deleted the packet_routing_at_shim branch August 16, 2024 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants