Skip to content

Commit

Permalink
Merge pull request #516 from OP2/profile-kernel-name
Browse files Browse the repository at this point in the history
* OP2/profile-kernel-name:
  Shorten some event names for -log_view formatting
  Parloop: Use iterset name for timing C kernel execution
  • Loading branch information
wence- committed Dec 8, 2016
2 parents 20ffe48 + 4517303 commit 6ff1148
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions pyop2/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4186,6 +4186,7 @@ def halo_exchange_end(self):
arg.halo_exchange_end(update_inc=self._only_local)

@collective
@timed_function("ParLoopRHaloBegin")
def reverse_halo_exchange_begin(self):
"""Start reverse halo exchanges (to gather remote data)"""
if self.is_direct:
Expand All @@ -4195,7 +4196,7 @@ def reverse_halo_exchange_begin(self):
arg.data.halo_exchange_begin(reverse=True)

@collective
@timed_function("ParLoopReverseHaloEnd")
@timed_function("ParLoopRHaloEnd")
def reverse_halo_exchange_end(self):
"""Finish reverse halo exchanges (to gather remote data)"""
if self.is_direct:
Expand All @@ -4205,14 +4206,14 @@ def reverse_halo_exchange_end(self):
arg.data.halo_exchange_end(reverse=True)

@collective
@timed_function("ParLoopReductionBegin")
@timed_function("ParLoopRednBegin")
def reduction_begin(self):
"""Start reductions"""
for arg in self.global_reduction_args:
arg.reduction_begin(self.comm)

@collective
@timed_function("ParLoopReductionEnd")
@timed_function("ParLoopRednEnd")
def reduction_end(self):
"""End reductions"""
for arg in self.global_reduction_args:
Expand Down
2 changes: 1 addition & 1 deletion pyop2/sequential.py
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ def _jitmodule(self):

@collective
def _compute(self, part, fun, *arglist):
with timed_region("ParLoopCKernel"):
with timed_region("ParLoop%s" % self.iterset.name):
fun(part.offset, part.offset + part.size, *arglist)
self.log_flops()

Expand Down

0 comments on commit 6ff1148

Please sign in to comment.