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 NpuTctSync operation #990

Merged
merged 7 commits into from
Dec 18, 2024
Merged

Add NpuTctSync operation #990

merged 7 commits into from
Dec 18, 2024

Conversation

Yu-Zhewen
Copy link
Contributor

@Yu-Zhewen Yu-Zhewen commented Dec 16, 2024

This PR introduces the tct_sync operation, designed to replace dma_wait during the ControlCodeLowering pass. The primary motivation for this change is to ensure a one-to-one conversion in the subsequent ControlCodeToTransaction pass.

Checks for the same row, channel, and direction are now handled during the ControlCodeLowering pass instead of the ControlCodeToTransaction pass. Some unit tests have also been relocated.

@Yu-Zhewen Yu-Zhewen changed the title [Draft] Add NpuTctSync operation Add NpuTctSync operation Dec 18, 2024
@@ -1022,6 +1022,31 @@ def AMDAIE_NpuWriteBdOp: AMDAIE_Op<"npu.write_bd"> {
let assemblyFormat = [{ attr-dict }];
}

def AMDAIE_NpuTctSyncOp: AMDAIE_Op<"npu.tct_sync"> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you add a roundtrip test for this op as well?

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) December 18, 2024 20:03
@Yu-Zhewen Yu-Zhewen merged commit befab5e into main Dec 18, 2024
8 checks passed
@Yu-Zhewen Yu-Zhewen deleted the zhewen_tct_sync branch December 18, 2024 20:28
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