You are viewing a plain text version of this content. The canonical link for it is here.
Posted to discuss-archive@tvm.apache.org by Max Sponner via Apache TVM Discuss <no...@discuss.tvm.ai> on 2021/06/01 11:39:05 UTC
[Apache TVM Discuss] [Questions] Measure Memory Allocation using
Debug Executor
Hi @manupa-arm ,
Thank you for this work :slight_smile:
I tried to access this data after compiling the GraphExecutorFactory, but am a bit confused by the output:
The output of function_metadata is a JSON, which seems to represent a dictionary, but the values for each function look like this `relay.backend.FunctionInfo(0xcb63c40)`.
How can I access the additional information from this? I am probably missing something...
---
[Visit Topic](https://discuss.tvm.apache.org/t/measure-memory-allocation-using-debug-executor/9679/6) to respond.
You are receiving this because you enabled mailing list mode.
To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/75f9b5c76f92cd1ca8b1d0a5e9f87917e79d3d39a47d89f4e3e595b07d3e520c).
[Apache TVM Discuss] [Questions] Measure Memory Allocation using
Debug Executor
Posted by Max Sponner via Apache TVM Discuss <no...@discuss.tvm.ai>.
Ah, yes, thank you. I am not sure, what I did wrong on the first try, but now it is working.
Thank you very much :slight_smile:
---
[Visit Topic](https://discuss.tvm.apache.org/t/measure-memory-allocation-using-debug-executor/9679/8) to respond.
You are receiving this because you enabled mailing list mode.
To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/e3560118fd4a9c3ba61b6b073a8cc4b9f4729c35d02a7c55088b8d08584cc811).
[Apache TVM Discuss] [Questions] Measure Memory Allocation using
Debug Executor
Posted by Manupa Karunaratne via Apache TVM Discuss <no...@discuss.tvm.ai>.
Hi @max1996 ,
function metadata is of type :
`Map<String, FunctionInfo> function_metadata;`
When accessed via Python it functions as a dictionary :) .
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())
---
[Visit Topic](https://discuss.tvm.apache.org/t/measure-memory-allocation-using-debug-executor/9679/7) to respond.
You are receiving this because you enabled mailing list mode.
To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/4fbfb4fc15337a2dcf7e0294180fcf198023d3562a3ec5a7e2d6f4e6da4e1b72).