Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#341: Added support for step debugger and memory dumps after each op …
…invocation (#1616) 2 new modes in ttrt (debugger + memory) ``` ttrt run <flatbuffer> --debugger ``` This will start a pdb debugger after every op invocation in runtime. Further support will be added. ``` ttrt run <flatbuffer> --memory ttrt perf <flatbuffer> --memory ``` This will dump memory reports after each op invocation in runtime. A memory_report.json file will be dumped, containing all the ops (an entry for each) and the dram/l1 memory usage. This is global view of the board. ``` { "loc": "loc(\"/code/tt-mlir/test/python/golden/test_ttir_ops.py:65:id(0)\")", "debug_str": "%6 = \"ttnn.add\"(%2, %4, %5) <{operandSegmentSizes = array<i32: 2, 1>}> : (tensor<64x128xf32, #ttnn.ttnn_layout<(d0, d1) -> (d0, d1), <1x1>, memref<2x4x!tt.tile<32x32, f32>, #ttnn.buffer_type<dram>>, <interleaved>>>, tensor<64x128xf32, #ttnn.ttnn_layout<(d0, d1) -> (d0, d1), <1x1>, memref<2x4x!tt.tile<32x32, f32>, #ttnn.buffer_type<dram>>, <interleaved>>>, tensor<64x128xf32, #ttnn.ttnn_layout<(d0, d1) -> (d0, d1), <1x1>, memref<2x4x!tt.tile<32x32, f32>, #ttnn.buffer_type<dram>>, <interleaved>>>) -> tensor<64x128xf32, #ttnn.ttnn_layout<(d0, d1) -> (d0, d1), <1x1>, memref<2x4x!tt.tile<32x32, f32>, #ttnn.buffer_type<dram>>, <interleaved>>> loc(\"/code/tt-mlir/test/python/golden/test_ttir_ops.py:65:id(0)\")", "dram": { "total_allocatable (bytes) : total_allocatable/bank * num_banks": "12884901504", "total_allocated (bytes) : total_allocated/bank * num_banks": "3268608", "total_free (bytes) : total_allocatable - total_allocated": "12881632896", "blocks": [ { "address (bytes)": "32", "size (bytes)": "90112", "allocated (y/n)": "Y" }, { "address (bytes)": "90144", "size (bytes)": "90112", "allocated (y/n)": "Y" }, { "address (bytes)": "180256", "size (bytes)": "4096", "allocated (y/n)": "N" }, { "address (bytes)": "184352", "size (bytes)": "90112", "allocated (y/n)": "Y" }, { "address (bytes)": "274464", "size (bytes)": "1073465312", "allocated (y/n)": "N" }, { "address (bytes)": "1073739776", "size (bytes)": "2048", "allocated (y/n)": "Y" } ], "total_allocatable (bytes) : per bank": "1073741792", "total_allocated (bytes): per bank": "272384", "total_free (bytes) : per bank": "1073469408", "largest_free_block (bytes) : per bank": "1073465312" }, "l1": { "total_allocatable (bytes) : total_allocatable/bank * num_banks": "87504896", "total_allocated (bytes) : total_allocated/bank * num_banks": "0", "total_free (bytes) : total_allocatable - total_allocated": "87504896", "blocks": [ { "address (bytes)": "99104", "size (bytes)": "1367264", "allocated (y/n)": "N" } ], "total_allocatable (bytes) : per bank": "1367264", "total_allocated (bytes): per bank": "0", "total_free (bytes) : per bank": "1367264", "largest_free_block (bytes) : per bank": "1367264", "largest_contiguous_free_block (bytes) : per bank": "1367264" } }, ```
- Loading branch information