-
Notifications
You must be signed in to change notification settings - Fork 234
compiler: Revamp data streaming #1702
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1702 +/- ##
==========================================
- Coverage 89.10% 88.54% -0.57%
==========================================
Files 207 208 +1
Lines 32759 33440 +681
Branches 4245 4352 +107
==========================================
+ Hits 29190 29608 +418
- Misses 3085 3334 +249
- Partials 484 498 +14
Continue to review full report at Codecov.
|
a606c53
to
b5669de
Compare
@@ -460,7 +460,7 @@ def __init__(self, *args, **kwargs): | |||
self.cflags.remove('-std=c99') | |||
self.cflags.remove('-O3') | |||
self.cflags.remove('-Wall') | |||
self.cflags += ['-std=c++11', '-acc:gpu', '-mp'] | |||
self.cflags += ['-std=c++11', '-acc:gpu', '-gpu=pinned', '-mp'] |
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.
ok
""" | ||
# TODO: this is currently very rudimentary | ||
required = derive_parameters(iet) |
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.
required
assigned twice?
# Attach SyncOps to Clusters | ||
actions = defaultdict(Actions) | ||
|
||
# Case 1 |
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.
Any docs to provide more details for each case?
else: | ||
size = async_degree | ||
|
||
# Replace `d` with a suitable CustomDimension `bd` |
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.
bd-db mismatch ?
`time` Dimension, we could have `{time: (time_m + db0) % 2, (time_m + db0)}`; | ||
likewise, for backwards, `{time: (time_M - 2 + db0) % 4, time_M - 2 + db0}`. | ||
""" | ||
mapper = {} |
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.
bd bm mismatch
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.
yeah, you're very right, but the gencode name convention and the variable name convention in the python code is sometimes different. I'll see what needs to be done to fix this
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.
Except the Precedence thing I don't think makes sense, no other comments loks fine to me.
devito/passes/iet/parpragma.py
Outdated
else: | ||
nofs, size = i | ||
if isinstance(nofs, Mod): | ||
# NOTE: work around alleged SymPy bug which doesn't allow |
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.
As said on slack, it's not a sympy bug, it's a choice of devito to go with %
while sympy uses fmod
which is a function call and therefore always has precedence over Mul.
I think it makes much more sense to fix print_Mod
rather than adding this odd extra type.
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.
It's actually very easy to fix if you use ourMod
instead of the sympy one and add
@property
def precedence(self):
return 49 # precedence(Mul)-1
since the first thing sympy checks is if it's defined before going to the defaults
https://github.com/sympy/sympy/blob/126f80578140e752ad5135aac77b8ff887eede3e/sympy/printing/precedence.py#L123
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.
right. However, as explained on Slack, I forgot that this piece of code is actually dead, so I just dropped it
18765ab
to
e21744f
Compare
This PR:
buffering
pass) and by requesting the OpenACC runtime to always allocate pinned memory (optiongpu=pinned
added toNvidiaCompiler
class)