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

[enhancement] XLS proc jit should detect at least trivial livelock conditions #1592

Open
allight opened this issue Sep 5, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@allight
Copy link
Collaborator

allight commented Sep 5, 2024

What's hard to do? (limit 100 words)

If you run a jit until blocked we have deadlock detection but we do not have livelock detection of any kind. Even trivial livelocks like an empty proc will make the 'until-blocked' useless.

Current best alternative workaround (limit 100 words)

Perform DFE to remove empty procs before running the proc jit and avoid other livelock patterns.

Your view of the "best case XLS enhancement" (limit 100 words)

Detect at least trivial live-lock conditions and return errors if they are entered.

@allight allight added the enhancement New feature or request label Sep 5, 2024
copybara-service bot pushed a commit that referenced this issue Sep 5, 2024
Running dslx_tests though the ir jit allows much longer running tests to be run at the cost of somewhat significant (~1sec/test) startup time.

Currently all tests in a file must be run with a single evaluator.

The 'compare' dslx_test_args functionality is not available when using evaluators other than 'dslx-interpreter' since it directly relies on DSLX interpreter behaviors for its implementation.

The evaluator option has no effect on quick_checks at this time.

Bug: #1592
Bug: #1573
PiperOrigin-RevId: 671555663
@meheff
Copy link
Collaborator

meheff commented Sep 16, 2024

Without solving the halting problem, one relatively easy case to catch would be: no data sent on channels, all procs blocked or iterating without changing state.

@allight
Copy link
Collaborator Author

allight commented Sep 16, 2024

yeah that's basically what I'm thinking of. Issue is that right now we don't really keep track of the old state for anything.

Doing any sort of detection when values are actually being passed along channels is much more difficult.

And of course full livelock detection is halting problem.

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

No branches or pull requests

2 participants