-
Notifications
You must be signed in to change notification settings - Fork 229
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
compiler: prevent reduction clause for perfect-enough outer loops #2226
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## master #2226 +/- ##
==========================================
- Coverage 87.06% 87.04% -0.03%
==========================================
Files 228 228
Lines 40859 40919 +60
Branches 7482 7490 +8
==========================================
+ Hits 35573 35616 +43
- Misses 4676 4692 +16
- Partials 610 611 +1
|
mloubout
force-pushed
the
reduction-atimic
branch
4 times, most recently
from
October 6, 2023 18:20
9b8ecc8
to
d628f54
Compare
georgebisbas
approved these changes
Oct 9, 2023
devito/passes/iet/parpragma.py
Outdated
@@ -318,6 +318,16 @@ def _make_reductions(self, partree): | |||
if not any(i.is_ParallelAtomic for i in partree.collapsed): | |||
return partree | |||
|
|||
# We bypass the corner case where a reduction might not be optimal, mainly: | |||
# - Only the most inner loop is atomic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
innermost
FabioLuporini
approved these changes
Oct 10, 2023
FabioLuporini
force-pushed
the
reduction-atimic
branch
from
October 10, 2023 13:32
5469672
to
a70fafb
Compare
mloubout
force-pushed
the
reduction-atimic
branch
from
October 10, 2023 14:55
52d441c
to
c26228d
Compare
mloubout
force-pushed
the
reduction-atimic
branch
from
October 10, 2023 16:02
c26228d
to
daf671c
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #2224 . Added MFE as tests to CPU and GPU
This is not a full generalized fix, the dependency analysis still needs some work to detect some patterns than can be optimized such as
[noatomic, atomic, noatomic]
that should be lowered toparallel, nothing, simd]