From c43d1600f908610e30d3c346ba7018239444d8a4 Mon Sep 17 00:00:00 2001 From: Aswinmcw Date: Fri, 8 Nov 2024 06:06:17 +0000 Subject: [PATCH] #14406: Fix BW computation --- tests/ttnn/unit_tests/operations/ccl/perf/perf_csv.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/ttnn/unit_tests/operations/ccl/perf/perf_csv.py b/tests/ttnn/unit_tests/operations/ccl/perf/perf_csv.py index b5faf0801491..31f4636aa662 100644 --- a/tests/ttnn/unit_tests/operations/ccl/perf/perf_csv.py +++ b/tests/ttnn/unit_tests/operations/ccl/perf/perf_csv.py @@ -12,7 +12,7 @@ def perf_report(file_path): df = df.dropna(subset=["DEVICE ERISC KERNEL DURATION [ns]"]) df = df[df["OP TO OP LATENCY [ns]"] != 0] - df = df[df["TRACE ID"].notna() & (df["TRACE ID"] != "")] + df = df[df["METAL TRACE ID"].notna() & (df["METAL TRACE ID"] != "")] def remove_keys_from_attributes(attributes): attributes = attributes.replace(";", ",").replace("'", '"') @@ -156,15 +156,15 @@ def calculate_bandwidth(row): op_bw = (output_tensor_volume * (n_chips - 1) / n_chips) / longest_device_fw_time link_bw = (output_tensor_volume * (n_chips - 1) / n_chips) / longest_erisc_fw_time elif row["OP CODE"] == "ReduceScatter": - op_bw = (input_tensor_volume / n_chips) / longest_device_fw_time - link_bw = (input_tensor_volume * (n_chips - 1) / n_chips) / longest_erisc_fw_time + op_bw = input_tensor_volume / longest_device_fw_time + link_bw = input_tensor_volume / longest_erisc_fw_time elif row["topology"] == "Linear": if row["OP CODE"] == "AllGather": op_bw = input_tensor_volume * n_chips / longest_device_fw_time link_bw = input_tensor_volume * (n_chips - 1) / longest_erisc_fw_time elif row["OP CODE"] == "ReduceScatter": op_bw = input_tensor_volume / longest_device_fw_time - link_bw = input_tensor_volume * (n_chips - 1) / n_chips / longest_erisc_fw_time + link_bw = input_tensor_volume / longest_erisc_fw_time return round(op_bw, 2), round(link_bw, 2) for i, (group, group_df) in enumerate(grouped, start=1): @@ -196,6 +196,7 @@ def calculate_bandwidth(row): "output_mem_config": group_df["output_mem_config"].iloc[0] if "output_mem_config" in group_df else "", "topology": group_df["topology"].iloc[0], "Layout": group_df["Layout"].iloc[0] if "Layout" in group_df else "", + "Data Type": group_df["Data Type"].iloc[0] if "Data Type" in group_df else "", } for column in numeric_columns: