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

Configure AIE using control packets #1728

Merged
merged 17 commits into from
Aug 30, 2024

Conversation

erwei-xilinx
Copy link
Collaborator

npu_maskwrite32(addr, value, mask)
else:
raise Exception(f"Unhandled op: {op:#x}")
if mlir_ctrl_pkt:
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a nice quick way to get a proof of concept but I think npu op to control packet conversion should be an mlir pass in C++ if it is going to be supported in mlir-aie. Converting runtime sequence mlir to a binary blob then to control packet mlir is a bit hacky.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Totally agreed. I'm thinking that perhaps ideally there should be an mlir pass that converts write32/blockwrite/maskedwrite32 ops into control packet ops, and another pass that converts control packet ops to dma_memcpy_nd ops represeting shim dma issuing control packet writes to tiles. Let me create an issue to extend this discussion.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sounds good. This txn2mlir.py script is mostly intended to be a disassembler and debugging aid. It is not intended to be load bearing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Issue created: #1729

Copy link
Collaborator

Choose a reason for hiding this comment

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

related to #1740

Copy link
Collaborator

@fifield fifield left a comment

Choose a reason for hiding this comment

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

This should wait for #1709 to land. That one is still a draft because it lacks proper tests.

include/aie/Dialect/AIEX/IR/AIEX.td Outdated Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ideally this file should be generated as part of the test

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Agreed. Locally this file is generated by mlir passes. Let me create a separate PR for those passes that I'm working on locally.

@erwei-xilinx
Copy link
Collaborator Author

This should wait for #1709 to land. That one is still a draft because it lacks proper tests.

Agreed. Will rebase after that one lands on main with more tests.

@erwei-xilinx
Copy link
Collaborator Author

This should wait for #1709 to land. That one is still a draft because it lacks proper tests.

@fifield, thanks for landing the PR. I've pulled main into this branch. Could you please lift the block? Thanks.

@erwei-xilinx erwei-xilinx added this pull request to the merge queue Aug 29, 2024
@erwei-xilinx erwei-xilinx removed this pull request from the merge queue due to a manual request Aug 29, 2024
@erwei-xilinx erwei-xilinx added this pull request to the merge queue Aug 30, 2024
Merged via the queue into Xilinx:main with commit a863d44 Aug 30, 2024
71 checks passed
@erwei-xilinx erwei-xilinx deleted the ctrl_pkt_reconfig branch August 30, 2024 01:22
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