Skip to content

Commit

Permalink
[micro prof] [fix] fix bus_bw formula for broadcast op.
Browse files Browse the repository at this point in the history
  • Loading branch information
suisiyuan committed Apr 2, 2024
1 parent caa15f3 commit 83713a2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions byte_micro_perf/backends/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ def dump_communication_ops_report(
mb = dtype_size * size / 1024 / 1024
algo_bw = dtype_size * size / latency / 1e3
bus_bw = algo_bw * (group_size - 1) / group_size

if op_name == "broadcast":
bus_bw = algo_bw
if op_name == "allreduce":
bus_bw *= 2

Expand Down

0 comments on commit 83713a2

Please sign in to comment.