-
Notifications
You must be signed in to change notification settings - Fork 30
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
Side-effectful Nontermination [DRAFT] #772
base: development
Are you sure you want to change the base?
Conversation
Updated expected values in LivenessTest for existing tests that now show liveness violations (from UNKNOWN to FAIL)
The existing liveness tests seem to be correct, and the change from UNKNOWN to FAIL was not caused by side-effectful nontermination but by point (2) I mentioned above. The relaxation of some barriers caused an assertion failure, which then caused some thread to abort and not release its lock, which was then treated as liveness issue. EDIT: Fixed the issue and reverted expected outcome of some tests. |
Fixed Nontermination verdict if nontermination was caused due to assertion failure. Updated expected outcomes of LivenessTest caused by the above change.
Updated expected values in LivenessTest for existing tests that now show liveness violations (from UNKNOWN to FAIL)
Fixed Nontermination verdict if nontermination was caused due to assertion failure. Updated expected outcomes of LivenessTest caused by the above change.
2150e68
to
5200c69
Compare
Can't we add a configurable (similar to several of our providers) that allows us to define a more fine-grained skip predicate and define the predicate accordingly based on the progress model? |
We could have skip lists per progress model, but can't we instead just comment out the tests in the expected files? Those files are already defined on a per-progress-model basis. |
Having skip list per model is not maintainable. If at some point we notice that e.g., the arch can also influence these things we need to do yet another level of splitting.
As long as we do not lose the information we currently have (e.g., removing the lines is a "no go"), it should be fine. |
Using providers to skip the tests would effectively also just be a skiplist per model, but just written in code (unless you find a way to skip tests based on something other than their name). |
Little update: this branch can give wrong verdicts on some simple cases where SCCP eliminates loop counter variables and the loop termination condition entirely.
The above program is wrongly considered non-terminating if unrolled insufficiently. EDIT: This is fixed now |
I suspect that the problem is not SCCP, but rather |
It's both actually. SCCP makes the assignments dead and even if they were not deleted I would like my code to not care about variables that are not live inside the loop (I have not implemented this yet, but I will eventually). |
…detection: this removes a wrong verdict related to SCCP removing the whole loop body. Added new test related to above issue. Minor updates to related code.
How necessary is it to support non-termination due to blocked |
The best would be to have support for non-termination for a given encoding of |
Then I will copy over whatever we are doing right now for blocked control barriers into the new non-termination detection. |
@ThomasHaas as you asked me, I added / enabled some more tests (I am still working on a test for fairness of store conditionals). About the CADP tests: there are quite a few examples that are supposed to pass but we report a violation. IIRC, the expected results were automatically generated from the artifact of the forward progress paper based on the strong fairness conditions. Here is a link where one can easily check what are the expected results from their side. |
Since we compile
|
Have you tried that program on this branch? On development we have a rough fix for fairness on store conditionals (we just don't have a test validating that). |
I did not remember we already had this: it seems to work, if I disable store fairness encoding, the new test fails.
The first jump condition was wrong, it should have check that the value is different than zero. Fixed in the last commit. |
The SPIRV barrier benchmark you added should be FAIL rather than PASS, no? |
Yes, my bad.
I slightly modified the code to change the expected result based on the configuration. |
Hmm, while this is a safe version, I think it does not really exhibit waiting behaviour of the control barrier since there is nothing to wait for. Btw. how do you generate the SPIRV code? Also, do you do the configurations manually or does the compiler also generate them? Maybe I can compile some code myself if I know how to. |
You need both the clspv compiler and SPIRV-Tools.
and then manually add the configuration. The last step was failing for this test so I simply change the memory model manually ( |
BTW, even if the test seems trivial, it already shows a bug introduced in this branch. The kernel should deadlock if the WG has more than one thread. In this branch we (wrongly) report |
Yes, cause I didn't implement control barriers at all, i.e., there was not a single line of code handling them. Pure control-barrier nontermination actually requires nothing of the new theory: it is a standard reachability problem as no thread does anything anymore and thus is witnessed by standard finite executions. The most interesting type of non-termination would involve both barriers and loops: some threads get stuck in barriers while others are looping (possibly even with barriers inside the loop). |
This PR adds a new, improved encoding that can detect some cases of side-effectful non-termination.
I added 5 new benchmarks to specifically test this, and updated the verdicts of the existing liveness tests that are now correctly identified as FAIL rather than UNKNOWN.
The encoding is functional and replaces the old encoding for deadlocks/liveness issues.
So feel free to test this branch on some real code.
Important notes:
The reasons that this PR is marked as DRAFT are:
The new encoding currently does also detect liveness issue that are caused by assertion failures, which the old one did not. This is easy to fix but we also have no test cases for this yet.LitmusVulkanFairLivenessTest
will fail. We would need to be able to enable tests only for certain progress models and skip them for others.StoreExclusive
is not considered so far. We also do not have tests for this scenario.Because of points (1) and (4), I have not yet deleted the old code (it is unused though).