-
Notifications
You must be signed in to change notification settings - Fork 67
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
diy7: additional "safe" relaxations reduces number of generated cycles #531
Comments
Hi @chacon01. Here is an explanation, in
I'd like to have your opinion on an evolution. For instance, I can introduce a new (default) mode that would not apply the po-safe mechanism. I will anyway fix the po-safe mechanism so that it considers s/d status. This last fix would restore the "increasing cycle" property in your example, but not in the general case. |
Hi @maranget. I'm happy with the addition of a new mode that doesn't apply Are there any other optimizations in |
Hi @chacon01. I'll add the new mode (called 'default'...) and attempt to document modes a bit more. As to your question, yes there is another subtlety : if you declare some fence candidate as safe, then some rejections of composing fence and dependencies candidate occur. Although I cannot reproduce the effect now, there is a potential "non-monotonic" effect here. |
The 'fence' effect is marginal because all compositions c1;c2 where c1 or c2 is a fence are rejected, except a few where c1 (resp. c2) is a dependency c2 (resp c1) is a fence with the 's' specification and W/R extremities are the same as the one of the fence.The case looks so specific that I am tempted to suppress it. If one want such compositions (e.g. |
That makes sense, thanks. I'm not concerned about non-monotonicity for the fence case as you've described it. In the specific case you're considering, I agree that it can be suppressed provided that composite relaxations still allow it to be generated. |
Composite relaxations are not checked using mode checks. For instance [PodWR,PodRR] will be accepted and will find its way to cycles, even in the quite strict 'critical' mode that reject the compositon of internal candidates:
|
Draft PR #532 attempts a monotonic, better documented, default mode for diy. Documentation is work in progress. If you care for a try... |
Hi @maranget, this appears to be working better. I'm seeing additional generated that weren't present under |
Hi @maranget It looks like some of the logic introduced in PR #532 has resulted in us losing some cycles in the new default mode that were previously being generated in the old SC mode. Example: If I enable the debug logic you added in your patch, I can see that With the following patch, I'm now able to generate the missing cycles.
From a diff of my generation (~170k baseline cycles from before PR #532) with the above patch, I can see that we no longer miss any cycles and are seeing ~17k new cycles (vs 10k new cycles and 3k missing with just PR #532). The extra 4K cycles look to be as result of other new combinations of Not sure the best way to approach this, but my personal opinion is the generator shouldn't be generating less cycles unless we can suitably justify it and we need to be extra careful when defining such rules - control of this might be better left to the user through the relaxations passed via |
Hi @benbancroft. I am sorry I have changed the patterns in a restrictive sense. I thought that the combination of of If understand you correctly, you suggest applying the above patch? If so I am happy to make a PR of it. |
Hi @maranget, sorry that @benbancroft and I didn't notice that some cycles got lost on the original patch. I think I'm happy with having @benbancroft's patch applied. |
Hi @maranget From testing my patch using a fairly exhaustive If it is easier for you, happy to submit a PR on my end - just let me know what works best. Many thanks again for working up the original PR. |
Hi @chacon01 and @benbancroft, should we close the issue ? As PR #538 apparently fixes at least the lack of monotony. |
Hi again @chacon01 and @benbancroft , PR #538 was somehow insufficient. More precisely the code was not implementing the documentation. As a consequence, less cycles involving Rfi were generated and an experiment described in the manual was no longer working as advertised (see issue #550). PR #552 (not merged yet) is a fix attempt. As a result of PR #552, the number of cycles generated in default mode has increased significantly. Time permitting, I'd like to have your opinion on the new behaviour before merging. |
Hi @maranget, @benbancroft and I have looked at the generation results and while we're seeing some new cycles, others are now missing. The overall number of cycles hasn't changed by that much: of the ~846k we generated, there were ~58k new cycles and ~26k missing cycles. One example of a missing cycle can be seen with
Before #552 (as of
With #552 (I merged
I don't have an example where the "increasing cycle" property is violated with #552, but those examples are difficult to find in general. |
Hi @chacon01 an and @benbancroft. I could reproduce the problem. However I have a question. Before PR #532, which was introduced because of the non-monotonicity of Namelely, this old version does not allow the composition po with different variable at endpoints followed by dependency with the same variable at endpoints (here PodWR followed by DpAddrsR) because this sequence is included in the (safe) edge FInally do we want to allow this composition of "po diff followed by dependency same"?. If the answer is yes I can allow it easily by extending PR #552. Otherwise can we merge the PR without further experiments? |
Merged, thanks to all. |
Hi,
We're observing that some invocations of
diy7
cause fewer cycles to be generated when additional relaxations are added to the "safe" list. For exampleproduces one cycle,
PodWR Amo.Cas Rfe DpDatadW Rfi PosRR Fre
whereasproduces none (note the addition of
PodWR
in the "safe" list). My expectation would be that addingPodWR
would have causeddiy7
to produce a (non-strict) superset of what it produced without it. I tried experimenting with different modes; this doesn't appear to occur with-mode free
(addingPodWR
causes a new cycle to appear instead of causing one to not appear).I see that the documentation is somewhat vague about what the
sc
mode doesIs there some explanation why adding relaxations to the safe list would cause cycles to no longer be generated when using
sc
?The text was updated successfully, but these errors were encountered: