We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb3b7aa commit 10ab882Copy full SHA for 10ab882
pyop2/base.py
@@ -3537,8 +3537,21 @@ def num_flops(self):
3537
3538
@cached_property
3539
def num_bytes(self):
3540
- # Fake number serving as place holder
3541
- return 1e7
+ # Measuring Streaming data footprint
+ n_bytes = 0
3542
+ for arg in self.args:
3543
+ n_bytes += arg.data.nbytes
3544
+ if arg.access is not READ:
3545
+ # Writing access counts as 2 accesses
3546
3547
+ for map_ in arg.map_tuple:
3548
+ if map_ is not None:
3549
+ for m in map_:
3550
+ n_bytes += m._values.nbytes
3551
+ if self.iterset.size == 0:
3552
+ return 0
3553
+ else:
3554
+ return n_bytes/self.iterset.size
3555
3556
def log_flops(self, flops):
3557
pass
0 commit comments