Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "AMMBench"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 0.1.3
PROJECT_NUMBER = 0.1.4

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
6 changes: 4 additions & 2 deletions benchmark/config.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
key,value,type
aRow,100,U64
aRow,10000,U64
aCol,1000,U64
bCol,500,U64
aReduce,10,U64
sketchDimension,25,U64
ptFile,torchscripts/FDAMM.pt,String
threads,16,U64
ptFile,torchscripts/RAWMM.pt,String
8 changes: 8 additions & 0 deletions benchmark/results/threads/MM/10/config_threads10.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
key,value,type
aRow,10000,U64
aCol,1000,U64
bCol,500,U64
aReduce,10,U64
sketchDimension,25,U64
threads,10,U64
ptFile,torchscripts/RAWMM.pt,String
8 changes: 8 additions & 0 deletions benchmark/results/threads/MM/12/config_threads12.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
key,value,type
aRow,10000,U64
aCol,1000,U64
bCol,500,U64
aReduce,10,U64
sketchDimension,25,U64
threads,12,U64
ptFile,torchscripts/RAWMM.pt,String
8 changes: 8 additions & 0 deletions benchmark/results/threads/MM/14/config_threads14.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
key,value,type
aRow,10000,U64
aCol,1000,U64
bCol,500,U64
aReduce,10,U64
sketchDimension,25,U64
threads,14,U64
ptFile,torchscripts/RAWMM.pt,String
8 changes: 8 additions & 0 deletions benchmark/results/threads/MM/16/config_threads16.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
key,value,type
aRow,10000,U64
aCol,1000,U64
bCol,500,U64
aReduce,10,U64
sketchDimension,25,U64
threads,16,U64
ptFile,torchscripts/RAWMM.pt,String
8 changes: 8 additions & 0 deletions benchmark/results/threads/MM/2/config_threads2.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
key,value,type
aRow,10000,U64
aCol,1000,U64
bCol,500,U64
aReduce,10,U64
sketchDimension,25,U64
threads,2,U64
ptFile,torchscripts/RAWMM.pt,String
8 changes: 8 additions & 0 deletions benchmark/results/threads/MM/4/config_threads4.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
key,value,type
aRow,10000,U64
aCol,1000,U64
bCol,500,U64
aReduce,10,U64
sketchDimension,25,U64
threads,4,U64
ptFile,torchscripts/RAWMM.pt,String
8 changes: 8 additions & 0 deletions benchmark/results/threads/MM/6/config_threads6.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
key,value,type
aRow,10000,U64
aCol,1000,U64
bCol,500,U64
aReduce,10,U64
sketchDimension,25,U64
threads,6,U64
ptFile,torchscripts/RAWMM.pt,String
8 changes: 8 additions & 0 deletions benchmark/results/threads/MM/8/config_threads8.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
key,value,type
aRow,10000,U64
aCol,1000,U64
bCol,500,U64
aReduce,10,U64
sketchDimension,25,U64
threads,8,U64
ptFile,torchscripts/RAWMM.pt,String
125 changes: 125 additions & 0 deletions benchmark/scripts/scanACol/OoOCommon.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
import csv
import numpy as np
import matplotlib.pyplot as plt
import itertools as it
import os

import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import pylab
from matplotlib.font_manager import FontProperties
from matplotlib.ticker import LogLocator, LinearLocator
import os
import pandas as pd
import sys
import matplotlib.ticker as mtick

OPT_FONT_NAME = 'Helvetica'
TICK_FONT_SIZE = 22
LABEL_FONT_SIZE = 28
LEGEND_FONT_SIZE = 30
LABEL_FP = FontProperties(style='normal', size=LABEL_FONT_SIZE)
LEGEND_FP = FontProperties(style='normal', size=LEGEND_FONT_SIZE)
TICK_FP = FontProperties(style='normal', size=TICK_FONT_SIZE)

MARKERS = (['*', '|', 'v', "^", "", "h", "<", ">", "+", "d", "<", "|", "", "+", "_"])
# you may want to change the color map for different figures
COLOR_MAP = (
'#B03A2E', '#2874A6', '#239B56', '#7D3C98', '#FFFFFF', '#F1C40F', '#F5CBA7', '#82E0AA', '#AEB6BF', '#AA4499')
# you may want to change the patterns for different figures
PATTERNS = (["////", "o", "", "||", "-", "//", "\\", "o", "O", "////", ".", "|||", "o", "---", "+", "\\\\", "*"])
LABEL_WEIGHT = 'bold'
LINE_COLORS = COLOR_MAP
LINE_WIDTH = 3.0
MARKER_SIZE = 15.0
MARKER_FREQUENCY = 1000


def editConfig(src, dest, key, value):
df = pd.read_csv(src, header=None)
rowIdx = 0
idxt = 0
for cell in df[0]:
# print(cell)
if (cell == key):
rowIdx = idxt
break
idxt = idxt + 1
df[1][rowIdx] = str(value)
df.to_csv(dest, index=False, header=False)


def readConfig(src, key):
df = pd.read_csv(src, header=None)
rowIdx = 0
idxt = 0
for cell in df[0]:
# print(cell)
if (cell == key):
rowIdx = idxt
break
idxt = idxt + 1
return df[1][rowIdx]


def draw2yLine(NAME, Com, R1, R2, l1, l2, m1, m2, fname):
fig, ax1 = plt.subplots(figsize=(10, 6.4))
lines = [None] * 2
# ax1.set_ylim(0, 1)
print(Com)
print(R1)
lines[0], = ax1.plot(Com, R1, color=LINE_COLORS[0], \
linewidth=LINE_WIDTH, marker=MARKERS[0], \
markersize=MARKER_SIZE
#
)

# plt.show()
ax1.set_ylabel(m1, fontproperties=LABEL_FP)
ax1.set_xlabel(NAME, fontproperties=LABEL_FP)
# ax1.set_xticklabels(ax1.get_xticklabels()) # 设置共用的x轴
plt.xticks(rotation=0, size=TICK_FONT_SIZE)
plt.yticks(rotation=0, size=TICK_FONT_SIZE)
plt.rcParams['axes.unicode_minus'] = False # 用来正常显示负号
ax2 = ax1.twinx()

# ax2.set_ylabel('latency/us')
# ax2.set_ylim(0, 0.5)
lines[1], = ax2.plot(Com, R2, color=LINE_COLORS[1], \
linewidth=LINE_WIDTH, marker=MARKERS[1], \
markersize=MARKER_SIZE)

ax2.set_ylabel(m2, fontproperties=LABEL_FP)
# ax2.vlines(192000, min(R2)-1, max(R2)+1, colors = "GREEN", linestyles = "dashed",label='total L1 size')
# plt.grid(axis='y', color='gray')

# style = dict(size=10, color='black')
# ax2.hlines(tset, 0, x2_list[len(x2_list)-1]+width, colors = "r", linestyles = "dashed",label="tset")
# ax2.text(4, tset, "$T_{set}$="+str(tset)+"us", ha='right', **style)

# plt.xlabel('batch', fontproperties=LABEL_FP)

# plt.xscale('log')
# figure.xaxis.set_major_locator(LinearLocator(5))
ax1.yaxis.set_major_locator(LinearLocator(5))
ax2.yaxis.set_major_locator(LinearLocator(5))
ax1.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1f'))
ax2.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1f'))
ax1.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1f'))
ax2.yaxis.set_major_formatter(mtick.FormatStrFormatter('%.1f'))
plt.legend(lines,
[l1, l2],
prop=LEGEND_FP,
loc='upper center',
ncol=1,
bbox_to_anchor=(0.55, 1.3
), shadow=False,
columnspacing=0.1,
frameon=True, borderaxespad=-1.5, handlelength=1.2,
handletextpad=0.1,
labelspacing=0.1)
plt.yticks(rotation=0, size=TICK_FONT_SIZE)
plt.tight_layout()

plt.savefig(fname + ".pdf")
Loading