Skip to content

Commit

Permalink
Merge pull request #2494 from devitocodes/tweak-profiler
Browse files Browse the repository at this point in the history
misc: Fixup Profiler.add_global_vanilla
  • Loading branch information
FabioLuporini authored Dec 4, 2024
2 parents f54378d + 5933c80 commit 78691c5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions devito/operator/profiling.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,12 +454,13 @@ def add_glb_vanilla(self, key, time):
ops = sum(v.ops for v in self.input.values())
traffic = sum(v.traffic for v in self.input.values())

if np.isnan(traffic) or traffic == 0:
return

gflops = float(ops)/10**9
gflopss = gflops/time
oi = float(ops/traffic)

if np.isnan(traffic) or traffic == 0:
oi = None
else:
oi = float(ops/traffic)

self.globals[key] = PerfEntry(time, gflopss, None, oi, None, None)

Expand Down

0 comments on commit 78691c5

Please sign in to comment.