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

[WIP] Enable init values for Object FIFO #1813

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from
Draft

Conversation

AndraBisca
Copy link
Collaborator

@AndraBisca AndraBisca commented Oct 2, 2024

This PR builds on top of #1801 to enable objectfifos to take as input an array of initial values.

Specifically:

  • initial values should be of the MLIR type ElementsAttr,
  • the above should also be of the same memref type as the objectfifo type,
  • the initial values array should be of the same size as the depth of the objectfifo,
  • the objectfifo lowering is modified to generate AIE_LockOps with init values such that the initialized objects will not be overwritten before they are communicated to the consumer(s).

abisca and others added 15 commits October 1, 2024 08:19
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Comment on lines 337 to +338
auto prodLock = builder.create<LockOp>(
builder.getUnknownLoc(), creation_tile, prodLockID, numElem);
builder.getUnknownLoc(), creation_tile, prodLockID, numElem - initValues);
Copy link
Contributor

Choose a reason for hiding this comment

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

[clang-format] reported by reviewdog 🐶

Suggested change
auto prodLock = builder.create<LockOp>(
builder.getUnknownLoc(), creation_tile, prodLockID, numElem);
builder.getUnknownLoc(), creation_tile, prodLockID, numElem - initValues);
auto prodLock =
builder.create<LockOp>(builder.getUnknownLoc(), creation_tile,
prodLockID, numElem - initValues);

Comment on lines 346 to +347
auto consLock = builder.create<LockOp>(builder.getUnknownLoc(),
creation_tile, consLockID, 0);
creation_tile, consLockID, initValues);
Copy link
Contributor

Choose a reason for hiding this comment

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

[clang-format] reported by reviewdog 🐶

Suggested change
auto consLock = builder.create<LockOp>(builder.getUnknownLoc(),
creation_tile, consLockID, 0);
creation_tile, consLockID, initValues);
auto consLock = builder.create<LockOp>(
builder.getUnknownLoc(), creation_tile, consLockID, initValues);

Copy link
Contributor

Coverage Report

Created: 2024-10-30 20:51

Click here for information about interpreting this report.

FilenameFunction CoverageLine CoverageRegion CoverageBranch Coverage
IR/AIEDialect.cpp 89.78% 81.84% 84.26% 74.21%
Transforms/AIEObjectFifoStatefulTransform.cpp 100.00% 93.90% 91.68% 85.54%
Totals 92.18% 87.52% 86.89% 78.60%
Generated by llvm-cov -- llvm version 14.0.0

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.

3 participants