File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,9 @@ class TestCaseSummary:
131131 undelegated_op_counts : Counter | None = None
132132 """ The number of undelegated occurances of each operator in the graph. """
133133
134+ pte_size_bytes : int | None = None
135+ """ The size of the PTE file in bytes. """
136+
134137
135138class TestSessionState :
136139 test_case_summaries : list [TestCaseSummary ]
@@ -302,6 +305,7 @@ def generate_csv_report(summary: RunSummary, output: TextIO):
302305 "Undelegated Nodes" ,
303306 "Delegated Ops" ,
304307 "Undelegated Ops" ,
308+ "PTE Size (Kb)" ,
305309 ]
306310 )
307311
@@ -336,5 +340,8 @@ def generate_csv_report(summary: RunSummary, output: TextIO):
336340 row ["Undelegated Nodes" ] = _sum_op_counts (record .undelegated_op_counts )
337341 row ["Delegated Ops" ] = _serialize_op_counts (record .delegated_op_counts )
338342 row ["Undelegated Ops" ] = _serialize_op_counts (record .undelegated_op_counts )
343+ row ["PTE Size (Kb)" ] = (
344+ record .pte_size_bytes / 1000.0 if record .pte_size_bytes else ""
345+ )
339346
340347 writer .writerow (row )
Original file line number Diff line number Diff line change @@ -129,6 +129,7 @@ def build_result(
129129 if is_delegated :
130130 try :
131131 tester .to_executorch ().serialize ()
132+ extra_stats ["pte_size_bytes" ] = len (tester .get_artifact ())
132133 except Exception as e :
133134 # We could introduce a result value for this, but I'm not sure it's necessary.
134135 # We can do this if we ever see to_executorch() or serialize() fail due a backend issue.
You can’t perform that action at this time.
0 commit comments