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

[CreateLogicalObjectFifoLink] Fail if accesses not contiguous #696

Merged
merged 3 commits into from
Aug 29, 2024

Conversation

newling
Copy link
Contributor

@newling newling commented Aug 23, 2024

I was looking into this pass because convolution lowering hits

error: 'amdaie.circular_dma_cpy_nd' op access pattern of strided operation overlaps with next one, which is not supported for now

But looking at the code now, it looks like it'll currently only work for the the access patterns are perfectly contiguous? If that's the case, I can look into fixing it (for both cases -- overlapping and non-contiguous).

I left a comment in the code describing my thinking

@jtuyls
Copy link
Collaborator

jtuyls commented Aug 26, 2024

But looking at the code now, it looks like it'll currently only work for the the access patterns are perfectly contiguous?

I think 'contiguous access patterns' is ambiguous. The access pattern of a single DMA does not need be contiguous (e.g. sizes: [2, 1024], strides: [2048, 1] is not a contiguous access pattern), but the access patterns of multiple consumers/producers that need to be linked indeed need to be contiguous with respect to each other. I guess you're only referring to the latter, right?

@newling newling force-pushed the link_creation_additional_check branch from f129c10 to 58dec2d Compare August 26, 2024 15:06
@newling
Copy link
Contributor Author

newling commented Aug 26, 2024

But looking at the code now, it looks like it'll currently only work for the the access patterns are perfectly contiguous?

I think 'contiguous access patterns' is ambiguous. The access pattern of a single DMA does not need be contiguous (e.g. sizes: [2, 1024], strides: [2048, 1] is not a contiguous access pattern), but the access patterns of multiple consumers/producers that need to be linked indeed need to be contiguous with respect to each other. I guess you're only referring to the latter, right?

Yes, I'm referring to the multiple ops being linked. The code which sets all offsets to zero seems to be expecting something stricter than the code checks for (this PR makes the check stricter).

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

@newling newling force-pushed the link_creation_additional_check branch 2 times, most recently from 43b22c0 to b3a261a Compare August 28, 2024 04:15
@newling newling force-pushed the link_creation_additional_check branch from 1a69d7e to 676f451 Compare August 29, 2024 18:08
@newling newling enabled auto-merge (squash) August 29, 2024 21:58
@newling newling merged commit 1f32c6c into nod-ai:main Aug 29, 2024
6 checks passed
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