CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
76 lines
2.7 KiB
Python
76 lines
2.7 KiB
Python
# pip install pandas
|
|
# python -m pip install -U matplotlib
|
|
import matplotlib
|
|
matplotlib.use('Agg')
|
|
import matplotlib.pyplot as plt
|
|
import numpy as np
|
|
import pandas as pd
|
|
import argparse
|
|
import sys
|
|
parser = argparse.ArgumentParser(description='Generate Benchmark plots for the given csv file')
|
|
parser.add_argument('--csv_fp', help='path to the csv file')
|
|
parser.add_argument('--plots_loc', default=max, help='location to write the plots to')
|
|
args = parser.parse_args()
|
|
|
|
if(len(sys.argv) < 2):
|
|
print("Please provide all arguments, csv_fp - path to the csv file and plots_loc - location to store the plots")
|
|
exit(0)
|
|
df = pd.read_csv(args.csv_fp, sep="\t")
|
|
lngth = len(df.columns)
|
|
col = list(df.columns)
|
|
skipcol = col[lngth - 1]
|
|
df = df[df[skipcol].notna()]
|
|
pd.set_option('display.max_columns', None)
|
|
pd.set_option('display.max_rows', 3000)
|
|
|
|
df.columns = df.columns.str.strip()
|
|
|
|
df = df[df[skipcol].str.contains("SKIPPED")==False]
|
|
grouped = df.groupby('Ti_To_Tc')
|
|
|
|
for key, item in grouped:
|
|
df1 = grouped.get_group(key)
|
|
df1 = df1.sort_values(['BlkM', 'BlkK', 'LytA_LytB_LytC_LytD', 'GFlops'])
|
|
|
|
groupMxN = df1.groupby(['BlkM','BlkN'])
|
|
for key1, item1 in groupMxN:
|
|
df2 = groupMxN.get_group(key1)
|
|
|
|
groupK = df2.groupby('BlkK')
|
|
firstK = groupK.get_group(groupK.groups.keys()[0])
|
|
|
|
groupLayout = firstK.groupby('LytA_LytB_LytC_LytD')
|
|
ng = groupLayout.ngroups
|
|
|
|
m, n = key1
|
|
fig, axs = plt.subplots(1, ng, sharex=True, sharey=True)
|
|
fig.suptitle(str(key) + "-" + str(m) + "x" + str(n), fontsize=15)
|
|
|
|
for key2, item2 in groupK:
|
|
dfK = groupK.get_group(key2)
|
|
groupLayout = dfK.groupby('LytA_LytB_LytC_LytD')
|
|
|
|
targets = zip(groupLayout.groups.keys(), axs.flatten())
|
|
|
|
for (key3, ax) in targets:
|
|
dfLayout = groupLayout.get_group(key3)
|
|
|
|
dfLayout["GFlops"] = dfLayout["GFlops"].astype(np.float32)
|
|
dfLayout["Efficiency"] = dfLayout["Efficiency"].astype(np.float32)
|
|
dfLayout = dfLayout.sort_values('GFlops')
|
|
|
|
x = dfLayout["GFlops"]
|
|
y = dfLayout["Efficiency"]
|
|
|
|
ax.plot(np.arange(len(x)), y, label=key2)
|
|
ax.set_xticklabels(x, rotation=30, horizontalalignment='right', fontsize='x-small')
|
|
ax.set_title(key3, loc='center',fontsize='small')
|
|
|
|
handles, labels = ax.get_legend_handles_labels()
|
|
unique = [(h, l) for i, (h, l) in enumerate(zip(handles, labels)) if l not in labels[:i]]
|
|
fig.legend(*zip(*unique), title="BlkK",loc='best')
|
|
|
|
fname = (str(key) + "-" + str(m) + "x" + str(n) + ".png").strip()
|
|
plt.savefig(args.plots_loc+"/"+fname)
|
|
plt.close()
|