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

Linear transfer without transformation but with repeat #1882

Merged
merged 7 commits into from
Oct 25, 2024

Conversation

hunhoffe
Copy link
Collaborator

@hunhoffe hunhoffe commented Oct 24, 2024

This PR relaxes some constraints made by checks in AIEXDialect.cpp and AIEDmaToNpu.cpp to allow one to continue to special-case the linear transfer without transform but to allow repeat_count/iteration_stride.

To be specific, cases such as size=[1, 1, 1, N], strides=[0, 0, 0, 1] were special-cased so that when N exceeded the maximum allowable size, the transformation was still considered legal. This special case can still be done in this case: size=[repeat_count, 1, 1, N], strides=[iteration_stride, 0, 0, 1] but was previously disallowed by checks.

I've relaxed the checks to allow this case and also added an example of this case in test/npu-xrt.

I also tried to fix-up some documentation to reflect the repeat_count/iteration_stride information.

Copy link
Contributor

github-actions bot commented Oct 24, 2024

Coverage Report

Created: 2024-10-24 22:09

Click here for information about interpreting this report.

FilenameFunction CoverageLine CoverageRegion CoverageBranch Coverage
IR/AIEXDialect.cpp 100.00% 86.00% 88.49% 79.35%
Transforms/AIEDmaToNpu.cpp 100.00% 91.00% 85.61% 73.26%
Totals 100.00% 88.42% 87.53% 77.41%
Generated by llvm-cov -- llvm version 14.0.0

@hunhoffe hunhoffe changed the title [WIP] Stricter checks for sizes/strides [WIP] Sizes/Strides Clarity Oct 24, 2024
@hunhoffe hunhoffe changed the title [WIP] Sizes/Strides Clarity Linear transfer without transformation but with repeat Oct 24, 2024
@hunhoffe hunhoffe marked this pull request as ready for review October 24, 2024 22:29
@hunhoffe hunhoffe added this pull request to the merge queue Oct 25, 2024
Merged via the queue into main with commit 088876d Oct 25, 2024
52 checks passed
@hunhoffe hunhoffe deleted the stride-wrap-checks-exploration branch October 25, 2024 14:36
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