Repository navigation
Revert "feat: added p90 step time logic for GEMM and HBM tail latencies" - #136
Conversation
…es (AI-Hypercomputer#129)" This reverts commit 77c6dee.
There was a problem hiding this comment.
Code Review
This pull request simplifies benchmark metric reporting by removing p10 and p90 statistics across several files, keeping only the median (p50) values. The reviewer feedback identifies a compatibility issue with Python versions older than 3.12 due to the use of double quotes inside double-quoted f-string expressions, and points out a missing space in the throughput formatting in benchmark_utils.py.
| f"time taken (median): {time_statistics.statistics["p50"]:.4f} ms, " | ||
| f"bandwidth (median): {statistics.statistics["p50"]:.3f} GB/s" |
There was a problem hiding this comment.
Using double quotes inside a double-quoted f-string expression (e.g., statistics["p50"]) is only supported in Python 3.12+. For backward compatibility with Python < 3.12 (which is common in many ML environments), use single quotes for dictionary keys inside double-quoted f-strings.
| f"time taken (median): {time_statistics.statistics["p50"]:.4f} ms, " | |
| f"bandwidth (median): {statistics.statistics["p50"]:.3f} GB/s" | |
| f"time taken (median): {time_statistics.statistics['p50']:.4f} ms, " | |
| f"bandwidth (median): {statistics.statistics['p50']:.3f} GB/s" |
| f"Total floating-point ops: {total_flops}, Step Time (median): " | ||
| f"{average_time_ms_statistics.statistics["p50"]:.2f}, " | ||
| f"Step Time (p90): " | ||
| f"{average_time_ms_statistics.statistics["p90"]:.2f}, " | ||
| f"Throughput (p10): " | ||
| f"{tflops_per_sec_statistics.statistics["p10"]:.2f}" | ||
| f" TFLOP / second / device, " | ||
| f"Throughput (median): " | ||
| f"{tflops_per_sec_statistics.statistics["p50"]:.2f}" | ||
| f" TFLOP / second / device, " | ||
| f"Throughput (p90): " | ||
| f"{tflops_per_sec_statistics.statistics["p90"]:.2f}" | ||
| f" TFLOP / second / device, " | ||
| f"TotalThroughput (p10): " | ||
| f"{tflops_per_sec_all_devices_statistics.statistics["p10"]:.2f} " | ||
| f"TFLOP / second, " | ||
| f"TotalThroughput (median): " | ||
| f"{tflops_per_sec_all_devices_statistics.statistics["p50"]:.2f} " | ||
| f"TFLOP / second, " | ||
| f"TotalThroughput (p90): " | ||
| f"{tflops_per_sec_all_devices_statistics.statistics["p90"]:.2f} " | ||
| f"TFLOP / second, " | ||
| f"MFU (p10): {mfu_statistics.statistics["p10"]:.2%}, " | ||
| f"MFU (median): {mfu_statistics.statistics["p50"]:.2%}, " | ||
| f"MFU (p90): {mfu_statistics.statistics["p90"]:.2%}" | ||
| f"MFU: {mfu_statistics.statistics["p50"]:.2%}" |
There was a problem hiding this comment.
Using double quotes inside a double-quoted f-string expression (e.g., statistics["p50"]) is only supported in Python 3.12+. For backward compatibility with Python < 3.12, use single quotes for dictionary keys inside double-quoted f-strings.
| f"Total floating-point ops: {total_flops}, Step Time (median): " | |
| f"{average_time_ms_statistics.statistics["p50"]:.2f}, " | |
| f"Step Time (p90): " | |
| f"{average_time_ms_statistics.statistics["p90"]:.2f}, " | |
| f"Throughput (p10): " | |
| f"{tflops_per_sec_statistics.statistics["p10"]:.2f}" | |
| f" TFLOP / second / device, " | |
| f"Throughput (median): " | |
| f"{tflops_per_sec_statistics.statistics["p50"]:.2f}" | |
| f" TFLOP / second / device, " | |
| f"Throughput (p90): " | |
| f"{tflops_per_sec_statistics.statistics["p90"]:.2f}" | |
| f" TFLOP / second / device, " | |
| f"TotalThroughput (p10): " | |
| f"{tflops_per_sec_all_devices_statistics.statistics["p10"]:.2f} " | |
| f"TFLOP / second, " | |
| f"TotalThroughput (median): " | |
| f"{tflops_per_sec_all_devices_statistics.statistics["p50"]:.2f} " | |
| f"TFLOP / second, " | |
| f"TotalThroughput (p90): " | |
| f"{tflops_per_sec_all_devices_statistics.statistics["p90"]:.2f} " | |
| f"TFLOP / second, " | |
| f"MFU (p10): {mfu_statistics.statistics["p10"]:.2%}, " | |
| f"MFU (median): {mfu_statistics.statistics["p50"]:.2%}, " | |
| f"MFU (p90): {mfu_statistics.statistics["p90"]:.2%}" | |
| f"MFU: {mfu_statistics.statistics["p50"]:.2%}" | |
| f"Total floating-point ops: {total_flops}, Step Time (median): " | |
| f"{average_time_ms_statistics.statistics['p50']:.2f}, " | |
| f"Throughput (median): " | |
| f"{tflops_per_sec_statistics.statistics['p50']:.2f}" | |
| f" TFLOP / second / device, " | |
| f"TotalThroughput (median): " | |
| f"{tflops_per_sec_all_devices_statistics.statistics['p50']:.2f} " | |
| f"TFLOP / second, " | |
| f"MFU: {mfu_statistics.statistics['p50']:.2%}" |
| f"Total bytes: {total_bytes}, Step Time (median): " | ||
| f"{average_time_ms_statistics.statistics["p50"]:.2f}, " | ||
| f"Step Time (p90): " | ||
| f"{average_time_ms_statistics.statistics["p90"]:.2f}, " | ||
| f"Throughput (p10): " | ||
| f"{gigabytes_per_sec_statistics.statistics["p10"]:.2f} " | ||
| f"GBytes / second / device, " | ||
| f"Throughput (median): " | ||
| f"Throughput (median):" | ||
| f"{gigabytes_per_sec_statistics.statistics["p50"]:.2f} " | ||
| f"GBytes / second / device, " | ||
| f"Throughput (p90): " | ||
| f"{gigabytes_per_sec_statistics.statistics["p90"]:.2f} " | ||
| f"GBytes / second / device, " | ||
| f"TotalThroughput (p10): " | ||
| f"{gigabytes_per_sec_all_devices_statistics.statistics["p10"]:.2f} " | ||
| f"GBytes / second, " | ||
| f"TotalThroughput (median): " | ||
| f"{gigabytes_per_sec_all_devices_statistics.statistics["p50"]:.2f} " | ||
| f"GBytes / second, " | ||
| f"TotalThroughput (p90): " | ||
| f"{gigabytes_per_sec_all_devices_statistics.statistics["p90"]:.2f} " | ||
| f"GBytes / second" |
There was a problem hiding this comment.
There are two issues here:
- Using double quotes inside a double-quoted f-string expression is only supported in Python 3.12+. Use single quotes for keys inside double-quoted f-strings for backward compatibility.
- There is a missing space after
Throughput (median):on line 1378, which will cause the printed output to be formatted incorrectly (e.g.,Throughput (median):123.45instead ofThroughput (median): 123.45).
| f"Total bytes: {total_bytes}, Step Time (median): " | |
| f"{average_time_ms_statistics.statistics["p50"]:.2f}, " | |
| f"Step Time (p90): " | |
| f"{average_time_ms_statistics.statistics["p90"]:.2f}, " | |
| f"Throughput (p10): " | |
| f"{gigabytes_per_sec_statistics.statistics["p10"]:.2f} " | |
| f"GBytes / second / device, " | |
| f"Throughput (median): " | |
| f"Throughput (median):" | |
| f"{gigabytes_per_sec_statistics.statistics["p50"]:.2f} " | |
| f"GBytes / second / device, " | |
| f"Throughput (p90): " | |
| f"{gigabytes_per_sec_statistics.statistics["p90"]:.2f} " | |
| f"GBytes / second / device, " | |
| f"TotalThroughput (p10): " | |
| f"{gigabytes_per_sec_all_devices_statistics.statistics["p10"]:.2f} " | |
| f"GBytes / second, " | |
| f"TotalThroughput (median): " | |
| f"{gigabytes_per_sec_all_devices_statistics.statistics["p50"]:.2f} " | |
| f"GBytes / second, " | |
| f"TotalThroughput (p90): " | |
| f"{gigabytes_per_sec_all_devices_statistics.statistics["p90"]:.2f} " | |
| f"GBytes / second" | |
| f"Total bytes: {total_bytes}, Step Time (median): " | |
| f"{average_time_ms_statistics.statistics['p50']:.2f}, " | |
| f"Throughput (median): " | |
| f"{gigabytes_per_sec_statistics.statistics['p50']:.2f} " | |
| f"GBytes / second / device, " | |
| f"TotalThroughput (median): " | |
| f"{gigabytes_per_sec_all_devices_statistics.statistics['p50']:.2f} " | |
| f"GBytes / second" |
|
The code change doesn't align with the PR title, could you double check? |
|
We will be rolling the PR forward in the next release of CHS. |
No description provided.