Measure Memory Allocation using Debug Executor

Hi @max1996 ,

function metadata is of type :

Map<String, FunctionInfo> function_metadata;

When accessed via Python it functions as a dictionary :slight_smile: .

struct FunctionInfoNode : public Object {
  Map<Target, Integer> workspace_sizes;
  Map<Target, Integer> io_sizes;
  Map<Target, Integer> constant_sizes;
  Map<Target, tir::PrimFunc> tir_primfuncs;
  Map<Target, Function> relay_primfuncs;

A FunctionInfo structure should also be visible in Python and again it creates Maps (dicts in Python) that maps for Target → various_info.

Try printing the items, so you should see what I mean. Maybe using a code snippet as follows :

func_metadata = lib.function_metadata    
for func_name, finfo in func_metadata.items():
        print(finfo.workspace_sizes.items())
        print(finfo.tir_primfuncs.items())
1 Like