@@ -66,37 +66,25 @@ def component_latency(
6666 actions [f"{ action .name } _actions" ] += 0
6767
6868 if isinstance (name2component [component ], TensorHolder ):
69- read_actions_val = (
70- buffet_stats .max_per_unit_read_actions
71- + buffet_stats .max_per_parent_drain_read_actions
72- )
69+ # On main, max_per_unit_read_actions already includes drain reads
70+ # (folded in by analyze_storage).
71+ read_actions_val = buffet_stats .max_per_unit_read_actions
7372 actions ["read_actions" ] += read_actions_val
7473 per_tensor_reads [component ][buffet .tensor ] += read_actions_val
75- # Per-unit computation-path reads only (no fill/drain).
76- # Use for PE buffer BW where fills go through the parent's port .
74+ # Per-unit computation-path reads (on main, same as read_actions
75+ # since fill/drain are folded in) .
7776 actions ["pu_read_actions" ] += buffet_stats .max_per_unit_read_actions
7877 # Total actions across all spatial instances (for BW throttling
7978 # of shared levels above spatial, e.g. shared_glb)
80- total_read_actions_val = (
81- buffet_stats .total_read_actions
82- + buffet_stats .total_parent_drain_read_actions
83- )
84- actions ["total_read_actions" ] += total_read_actions_val
79+ actions ["total_read_actions" ] += buffet_stats .total_read_actions
8580 if not isinstance (name2component [component ], arch .Toll ):
86- write_actions_val = (
87- buffet_stats .max_per_unit_write_actions
88- + buffet_stats .max_per_parent_fill_write_actions
89- )
81+ write_actions_val = buffet_stats .max_per_unit_write_actions
9082 actions ["write_actions" ] += write_actions_val
9183 per_tensor_writes [component ][buffet .tensor ] += write_actions_val
9284 actions ["pu_write_actions" ] += (
9385 buffet_stats .max_per_unit_write_actions
9486 )
95- total_write_actions_val = (
96- buffet_stats .total_write_actions
97- + buffet_stats .total_parent_fill_write_actions
98- )
99- actions ["total_write_actions" ] += total_write_actions_val
87+ actions ["total_write_actions" ] += buffet_stats .total_write_actions
10088 elif isinstance (name2component [component ], arch .Compute ):
10189 pass
10290 else :
0 commit comments