- Notifications
You must be signed in to change notification settings - Fork161
Data layout transformations on objectfifo join/split output/input#2706
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
github-actionsbot commentedNov 12, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Coverage ReportCreated: 2025-11-22 08:29Clickhere for information about interpreting this report.
Generated by llvm-cov -- llvm version 18.1.3 |
fifield commentedNov 12, 2025
Maybe it's obvious, but the hardware does not support this. It should be an error. |
…mations/test.cppCo-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…mations/test.cppCo-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
| if (j >= OUT_HEIGHT / 2) | ||
| ref++; | ||
| if (*(bufOut + i + OUT_WIDTH * j) != ref) { | ||
| std::cout << "Error in output " << i + OUT_WIDTH * j << ": " << *(bufOut + i + OUT_WIDTH * j) << " != " << ref |
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.
[clang-format]reported byreviewdog 🐶
| std::cout <<"Error in output" << i + OUT_WIDTH * j <<":" << *(bufOut + i + OUT_WIDTH * j) <<" !=" << ref | |
| std::cout <<"Error in output" << i + OUT_WIDTH * j <<":" | |
| << *(bufOut + i + OUT_WIDTH * j) <<" !=" << ref |
| << std::endl; | ||
| errors++; | ||
| } else { | ||
| std::cout << "Correct output " << i + OUT_WIDTH * j << ": " << *(bufOut + i + OUT_WIDTH * j) << " == " << ref |
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.
[clang-format]reported byreviewdog 🐶
| std::cout <<"Correct output" << i + OUT_WIDTH * j <<":" << *(bufOut + i + OUT_WIDTH * j) <<" ==" << ref | |
| std::cout <<"Correct output" << i + OUT_WIDTH * j <<":" | |
| << *(bufOut + i + OUT_WIDTH * j) <<" ==" << ref |
| # Input | ||
| of_offsets = [8 * worker for worker in range(n_workers)] | ||
| of_in = ObjectFifo(tile24_ty, depth=depth, name="in", dims_from_stream_per_cons=[(8, 3), (3, 1)]) |
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.
[black]reported byreviewdog 🐶
| of_in=ObjectFifo(tile24_ty,depth=depth,name="in",dims_from_stream_per_cons=[(8,3), (3,1)]) | |
| of_in=ObjectFifo( | |
| tile24_ty,depth=depth,name="in",dims_from_stream_per_cons=[(8,3), (3,1)] | |
| ) |
Uh oh!
There was an error while loading.Please reload this page.
Following discussion in#2678 this PR introduces an example in which the outputs of three compute tiles are joined in a mem tile before the final 48-element wide tensor (i32) is sent to external memory.
In this example, two iterations of the join pattern are required to move the 48-element wide output data tensor from the NPU to external memory. In combination with the
toStreamdata layout transformation on the 48-element wide data, the following BD programming is required:The objectfifo lowering for a join currently only works at the granularity of the smaller tensors, and thus cannot apply the data layout transformation on the final output tensor. This PR enhances the lowering such that the pattern above is produced instead. This is similar for the distribute pattern using the fromStream data layout transformation on the input objectfifo.
TODO: