-
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
mpi: Instrument compute0 core after specialising as ComputeCall #2143
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2143 +/- ##
==========================================
+ Coverage 87.09% 87.11% +0.02%
==========================================
Files 223 223
Lines 39871 39886 +15
Branches 5170 5170
==========================================
+ Hits 34726 34748 +22
+ Misses 4568 4562 -6
+ Partials 577 576 -1
|
c5508ed
to
921e8aa
Compare
devito/mpi/routines.py
Outdated
@@ -1025,6 +1025,23 @@ def __init__(self, name, body, parameters): | |||
super(HaloUpdate, self).__init__(name, body, parameters) | |||
|
|||
|
|||
class ComputeFunction(ElementalFunction): |
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.
This doesn't scale -- if you had 12 different kinds of Callables, what would you do? 12 different routines, one for each of them?
Here's an alternative
In ir/iet/efuncs.py, alter:
class ElementalFunction(...):
_Call_cls = ElementalCall
...
def make_call(...):
return self._Call_cls(...)
Also, the fact that your make_compute_func
is essentially a copy-paste of make_efunc
should have smelled bad
You can extend make_efunc
s.t.
def make_efunc(..., efunc_type=None):
...
so eventually here in routines.py all you will need to do is:
class ComputeCall(ElementalCall):
pass
class ComputeFunction(ElementalFunction):
_Call_cls = ComputeCall
Then calling make_efunc(..., efunc_type=ComputeFunction)
I'm not claiming this is exceptionally clean (the whole make_efunc
thing seems like an overkill to me, but what can we do, it's been around for ages...), but at least it scales
921e8aa
to
7321fb0
Compare
7321fb0
to
8bb5b24
Compare
Requested changes have ben addressed |
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.
This LGTG to me now. @mloubout ?
8bb5b24
to
cf1ba20
Compare
This PR aims to make compute0 "more special" for instrumenting
and then adds a timer for the compute0 core area in FULL mpi mode (for advanced2 profiling)
e.g now we get:
Generated code-diff: