-
Notifications
You must be signed in to change notification settings - Fork 102
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
Add support for splitting if's with barriers in parallel ops without interchanging them #240
Conversation
Can this not alternatively become the following, avoiding code duplication?
|
One can choose between
and
by specifying (the default is still the original old way) Both of the new ways result in close to no overall performance difference on all of rodinia combined, with individual benchmark speedups seemingly ranging from -7% to +4% and -2% to +2% respectively compared to the current transformation. (some of it could be attributed to randomness) |
eb40deb
to
863615c
Compare
This reverts commit dfacb91.
f7b8015
to
5b98d5d
Compare
This pr adds two new ways to handle ifs with barriers in parallel regions.
This is the current way it is done:
The first one allows ifs with directly nested barriers to be split at the barrier without the need to split them off with barriers and interchange them with the parallel op as such:
This should hopefully improve performance since it keeps A, B and C,D in the same parallel region.
The second one joins the appropriate blocks for the two cases where the if condition evaluates to true or false
This allows us to get rid of the branch in the parallel at the cost of increased code size.
This second way actually makes the code size explode exponentially wrt the number of barriers so it might only have limited use with the help of some heuristics (not yet implemented) to decide when to use it.