feat: add benchmark for flash_infer vs flash_mla

This commit is contained in:
zhengsize
2025-02-24 22:34:22 +08:00
parent bcb90f2afd
commit 4da4dbd303
2 changed files with 533 additions and 0 deletions

19
benchmark/visualize.py Normal file
View File

@@ -0,0 +1,19 @@
import matplotlib.pyplot as plt
import pandas as pd
file_path = 'all_perf.csv'
df = pd.read_csv(file_path)
names = df['name'].unique()
for name in names:
subset = df[df['name'] == name]
plt.plot(subset['seqlen'], subset['bw'], label=name)
plt.title('bandwidth')
plt.xlabel('seqlen')
plt.ylabel('bw (GB/s)')
plt.legend()
plt.savefig('bandwidth_vs_seqlen.png')