Files
wehub-resource-sync ec436095dd
Book-CI / test (macos-latest) (push) Has been cancelled
Book-CI / test (ubuntu-latest) (push) Has been cancelled
Book-CI / test (windows-latest) (push) Has been cancelled
Release Fake Tag / publish (push) Has been cancelled
Deploy / deploy (macos-latest) (push) Has been cancelled
Deploy / deploy (ubuntu-latest) (push) Has been cancelled
Deploy / deploy (windows-latest) (push) Has been cancelled
Release to PyPI / Build & publish sglang-kt (push) Has been cancelled
Release to PyPI / Build kt-kernel (Python 3.11) (push) Has been cancelled
Release to PyPI / Build kt-kernel (Python 3.12) (push) Has been cancelled
Release to PyPI / Publish kt-kernel to PyPI (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:30:03 +08:00

20 lines
543 B
Python

import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
# 读取数据
file_path = 'data.txt' # 替换为你的文件路径
df = pd.read_csv(file_path, sep=r'\s+', names=['m', 'n', 'tflops'])
# 创建数据透视表,行为 m,列为 n,值为 tflops
pivot_table = df.pivot_table(index='m', columns='n', values='tflops')
# 画热力图
plt.figure(figsize=(10, 8))
sns.heatmap(pivot_table, annot=True, fmt=".2f", cmap='viridis')
plt.title('TFLOPS Heatmap')
plt.xlabel('n')
plt.ylabel('m')
plt.tight_layout()
plt.show()