File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1371,28 +1371,27 @@ def get_nbytes(obj):
13711371
13721372 # Filter out arrays, aliases and non-AbstractFunction objects
13731373 op_symbols = [i for i in op_symbols if i .is_AbstractFunction
1374- and not i .is_Array and not i .alias ]
1374+ and not i .is_ArrayBasic and not i .alias ]
13751375
13761376 for i in op_symbols :
13771377 # FIXME: Probably wrong for streamed functions
1378+ # TODO: Need a hook for PRO here
13781379 # Will overreport memory usage currently
13791380 try :
13801381 # TODO: is _obj even needed?
13811382 v = get_nbytes (self [i .name ]._obj )
13821383 except AttributeError :
13831384 v = get_nbytes (self .get (i .name , i ))
13841385
1385- if i ._mem_host :
1386+ if i ._mem_host or i ._mem_mapped :
1387+ # No need to add to device , as it will be counted
1388+ # by nbytes_consumed_memmapped
13861389 host += v
13871390 elif i ._mem_local :
13881391 if isinstance (self .platform , Device ):
13891392 device += v
13901393 else :
13911394 host += v
1392- elif i ._mem_mapped :
1393- # No need to add to device, as it will be counted
1394- # by nbytes_consumed_memmapped
1395- host += v
13961395
13971396 return {disk_layer : 0 , host_layer : host , device_layer : device }
13981397
You can’t perform that action at this time.
0 commit comments