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

[CtrlPkt] Add a pass to split control packet payload into chunks of 4 #1052

Merged
merged 3 commits into from
Jan 22, 2025

Conversation

Yu-Zhewen
Copy link
Contributor

No description provided.

@Yu-Zhewen Yu-Zhewen changed the title [CtrlPkt] Add pass to split control packet payload into 4-byte chunks [CtrlPkt] Add pass to split control packet payload into chunks of 4 Jan 22, 2025
@Yu-Zhewen Yu-Zhewen changed the title [CtrlPkt] Add pass to split control packet payload into chunks of 4 [CtrlPkt] Add a pass to split control packet payload into chunks of 4 Jan 22, 2025
runtime/src/iree-amd-aie/aie_runtime/iree_aie_runtime.h Outdated Show resolved Hide resolved

// -----

// For control packet reads (where `opcode=1` and `data` are not present), the split still occurs, with only the `address` and `length` attributes being updated.
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's the rationale here? Shouldn't we throw an error?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can send a control packet to request the core to send data back. In this case, the opcode is set to 1 (indicating a read request), the length field specifies the number of words to be returned, and the data attribute is left empty, as only the header is sent to the core.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

@jtuyls jtuyls Jan 22, 2025

Choose a reason for hiding this comment

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

Ok, thanks for the explanation, makes sense!

Also, just thinking about this now, but I think using an enum attribute instead of an int for the opcode would be helpful: CtrlPktType::Read instead of 1 etc (not for this PR).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I will make a separate PR for that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

implemented in #1056

Copy link
Collaborator

@jtuyls jtuyls left a comment

Choose a reason for hiding this comment

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

LGTM

@Yu-Zhewen Yu-Zhewen enabled auto-merge (squash) January 22, 2025 22:24
@Yu-Zhewen Yu-Zhewen merged commit f0edd97 into main Jan 22, 2025
7 checks passed
@Yu-Zhewen Yu-Zhewen deleted the zhewen_ctrlpkt_split branch January 22, 2025 22:46
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