Skip to content

[Handshake] Increase LSQ load/store queue to hold largest group#1004

Open
MaxWipfli wants to merge 1 commit into
mainfrom
mwipfli/lsq-grow-queues-to-fit
Open

[Handshake] Increase LSQ load/store queue to hold largest group#1004
MaxWipfli wants to merge 1 commit into
mainfrom
mwipfli/lsq-grow-queues-to-fit

Conversation

@MaxWipfli

@MaxWipfli MaxWipfli commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

If a single basic block (= group) has too many loads/stores, the LSQ must use larger load/store queues since allocation needs to happen at once. If there are at most L load and S stores in a single group, then the LSQ's load queue depth must be L+1 and the store queue depth must be S+1.

An assertion to ensure this in the LSQ generator was already added in #993. This now ensures that the C++ code always emits valid load/store queue sizes.

This fixes #832.

@murphe67

murphe67 commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

oh this is an interesting idea, yes makes sense 😁

@MaxWipfli MaxWipfli force-pushed the mwipfli/lsq-grow-queues-to-fit branch from 08be395 to e728763 Compare July 8, 2026 08:04
@MaxWipfli MaxWipfli marked this pull request as ready for review July 8, 2026 08:07
@MaxWipfli

Copy link
Copy Markdown
Collaborator Author

There is an alternative solution to handle large groups without exploding queue sizes (e.g., if there is a large group that is only executed once per kernel):

In particular, a single group could be split into multiple smaller groups (either in C++, or this could even be done by the LSQ generator internally), so that a single basic block could consist of multiple groups. However, this should only be implemented if it actually becomes a problem in practice.

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.

"array larger than LSQ depth" assertion failure

2 participants