-
Notifications
You must be signed in to change notification settings - Fork 78
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
Make aiex.npu.dma_memcpy_nd d0 stride explicit #1586
Conversation
361705c
to
5fcb734
Compare
Coverage ReportCreated: 2024-06-28 20:13Click here for information about interpreting this report.
Generated by llvm-cov -- llvm version 14.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Have you tested using a d0 stride != 1
at all?
// strides[0] == 1 is ok iff the tranfer size is a multiple of | ||
// addressGranularity, which is checked below | ||
if (i == 0 && raw_strides[i] == 1) | ||
continue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Technically something like
sizes=[addressGranularity/2, addressGranularity/2]
strides=[addressGranularity/2, 1]
(and similar examples for higher dimensions, with addressGranularity in bytes)
is equivalent to
sizes=[addressGranularity]
strides=[1]
but would currently error.
I think it's a non-issue as this is clearly a contrived example with no real uses. (Except maybe automatically generated code?)
So this looks good to me with this check.
The stride of the inner dimension is assumed to be one for npu.dma_memcpy_nd (e.g. here). This PR makes it an explicit operand.
replaces #1584