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

Add amdaie.flow for packet flow lowering #815

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

jtuyls
Copy link
Collaborator

@jtuyls jtuyls commented Oct 2, 2024

This PR introduces the amdaie.flow operation (in consistency with aie.flow). This operation represents connections between ports/channels on tiles in the array and is lowered to aie.flow for routing. This idea is to lower amdaie.connection to amdaie.flow + DMA operations, however this PR goes halfway by creating amdaie.flow operations, while still keeping a reference inside amdaie.connection as the latter is still needed inside LowerToAIE for lowering to the AIE dialect DMA operations. This will be cleaned up in the future, but for now, this enables me to start adding routes for control packets in conjunction with data routes for #714.

Comment on lines 48 to 49
auto ui8ty =
IntegerType::get(rewriter.getContext(), 8, IntegerType::Unsigned);
Copy link
Contributor

Choose a reason for hiding this comment

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

Pull this out of the walk.

Copy link
Collaborator

@makslevental makslevental Oct 2, 2024

Choose a reason for hiding this comment

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

Also please deposit $5 in the auto jar and please remove auto (yes I know I'm being a pedant...)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Actually, here I think it's fine as the type is clear from the context. You see this all over IREE/LLVM and is okayed by the style guide we follow: https://google.github.io/styleguide/cppguide.html#Type_deduction

@jtuyls jtuyls force-pushed the connection-to-flow branch from 72bedbe to 8a8f85f Compare October 2, 2024 14:16
Copy link
Contributor

@Abhishek-Varma Abhishek-Varma left a comment

Choose a reason for hiding this comment

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

A few more nits to address before merging. LGTM otherwise.

@jtuyls jtuyls force-pushed the connection-to-flow branch from 8a8f85f to 7382ded Compare October 2, 2024 14:55
@jtuyls jtuyls merged commit b7f8fc4 into nod-ai:main Oct 2, 2024
6 checks passed
@jtuyls jtuyls deleted the connection-to-flow branch October 2, 2024 16:21
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.

3 participants