Skip to content

Commit

Permalink
Update lib/Dialect/AIE/Transforms/AIEAssignBuffers.cpp
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
AndraBisca and github-actions[bot] authored Apr 24, 2024
1 parent 4abbb80 commit 9132f59
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions lib/Dialect/AIE/Transforms/AIEAssignBuffers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,11 @@ struct SimpleBankAwareAllocationPattern : public OpRewritePattern<TileOp> {
bankIndex = setBufferAddress(buffer, numBanks, bankIndex, nextAddrInBanks, bankLimits);

// Sort by smallest address before printing memory map.
std::sort(allBuffers.begin(), allBuffers.end(),
[](BufferOp a, BufferOp b) {
assert(a.getAddress().has_value() &&
"buffer must have address assigned");
assert(b.getAddress().has_value() &&
"buffer must have address assigned");
return a.getAddress().value() < b.getAddress().value();
});
std::sort(allBuffers.begin(), allBuffers.end(), [](BufferOp a, BufferOp b) {
assert(a.getAddress().has_value() && "buffer must have address assigned");
assert(b.getAddress().has_value() && "buffer must have address assigned");
return a.getAddress().value() < b.getAddress().value();
});
// Check if memory was exceeded on any bank and print debug info.
return checkAndPrintOverflow(tile, numBanks, stacksize, allBuffers, nextAddrInBanks, bankLimits);
}
Expand Down

0 comments on commit 9132f59

Please sign in to comment.