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

Speculation Kill Logic Can Cause Deadlock #24

Open
dz333 opened this issue Jun 18, 2021 · 1 comment
Open

Speculation Kill Logic Can Cause Deadlock #24

dz333 opened this issue Jun 18, 2021 · 1 comment
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@dz333
Copy link
Collaborator

dz333 commented Jun 18, 2021

If the pipeline is branching and one of the stages inside of a branch can be 'killed' due to misspeculation
(i.e., it contains a spec_check() or spec_barrier() command in any of its stages),
Then this currently causes the pipeline to deadlock because of how branches are handled.

To compile a branch, a signal is sent from the beginning of the branch to the join point afterwards, in order to signal which branch was taken. The join point waits for data from the signaled stage before executing.

When speculative stages are killed, this extra conditional signal will not be killed, and thus the join point is waiting for data that will never arrive - or worse data may arrive from a later instruction and unintentionally this will execute out-of-order.

@dz333 dz333 added the bug Something isn't working label Jun 18, 2021
@dz333 dz333 self-assigned this Jun 18, 2021
@dz333 dz333 added the enhancement New feature or request label Nov 29, 2021
@dz333
Copy link
Collaborator Author

dz333 commented Nov 29, 2021

I'd also like to allow conditional speculation checks more precisely; right now I'm not entirely sure what happens if you conditionally establish that you're non-speculative (which frees up a slot in the spec table) and then unconditionally check it later.

This is going to lead to a codegen bug when you try to conditionally establish that a stage is non-speculative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant