Skip to content

Commit

Permalink
misc: Fix operator output with gflopss=None
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioLuporini committed Dec 5, 2024
1 parent 76b72fe commit 2e970db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion devito/operator/operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from tempfile import gettempdir

from sympy import sympify
import numpy as np

from devito.arch import ANYCPU, Device, compiler_registry, platform_registry
from devito.data import default_allocator
Expand Down Expand Up @@ -965,7 +966,7 @@ def _emit_apply_profiling(self, args):
if v is not None:
if v.oi is not None:
metrics.append("OI=%.2f" % fround(v.oi))
if v.gflopss is not None:
if v.gflopss is not None and np.isfinite(v.gflopss):
metrics.append("%.2f GFlops/s" % fround(v.gflopss))

v = summary.globals.get('fdlike')
Expand Down

0 comments on commit 2e970db

Please sign in to comment.