mirror of
https://github.com/deepseek-ai/FlashMLA
synced 2025-06-26 18:15:54 +00:00
fix(benchmark): store 'compare' and 'one' perf results in csv files and visualize them
This commit is contained in:
@@ -1,7 +1,17 @@
|
||||
import argparse
|
||||
|
||||
import matplotlib.pyplot as plt
|
||||
import pandas as pd
|
||||
|
||||
file_path = 'all_perf.csv'
|
||||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser(description='Visualize benchmark results')
|
||||
parser.add_argument('--file', type=str, default='all_perf.csv',
|
||||
help='Path to the CSV file with benchmark results (default: all_perf.csv)')
|
||||
return parser.parse_args()
|
||||
|
||||
args = parse_args()
|
||||
file_path = args.file
|
||||
|
||||
df = pd.read_csv(file_path)
|
||||
|
||||
@@ -16,4 +26,4 @@ plt.xlabel('seqlen')
|
||||
plt.ylabel('bw (GB/s)')
|
||||
plt.legend()
|
||||
|
||||
plt.savefig('bandwidth_vs_seqlen.png')
|
||||
plt.savefig(f'{file_path.split(".")[0].split("/")[-1]}_bandwidth_vs_seqlen.png')
|
||||
Reference in New Issue
Block a user