in bench_cluster/communication/utils.py [0:0]
def print_header(bw_unit, raw, comm_op):
world_size = dist.get_world_size()
tput = f'Throughput ({bw_unit})'
busbw = f'BusBW ({bw_unit})'
header = f"\n---- Performance of {comm_op} on {world_size} devices ---------------------------------------------------------\n"
duration_str = 'Duration'
if raw:
duration_str += ' (us)'
header += f"{'Size (Bytes)':20s} {'Description':25s} {duration_str:20s} {tput:20s} {busbw:20s}\n"
header += "----------------------------------------------------------------------------------------------------"
print_rank_0(header)