-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot_tile.py
More file actions
63 lines (49 loc) · 1.19 KB
/
plot_tile.py
File metadata and controls
63 lines (49 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
"""plot.py
Python script for plotting performance experiment results
"""
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
# color palette
PAL = "muted"
# Set Matplotlib to use pgfplots as a backend
#mpl.use("pgf")
# Matplotlib config for generating LaTeX
# Read in the results data
df = pd.read_csv(
"output/random_tiles.csv",
sep=",",
names=["kernel", "length", "gflops" ],
)
multi_kernels = {
"soft_dtw_tiled": "tiled",
#"softdtw_cuda_stencil_multi": "stencil",
#"softdtw_cuda_diagonal_multi": "diagonal",
# "soft_dtw_tiled_multi": "tiled",
}
df_multi = (
df[df.kernel.isin(multi_kernels)]
.groupby(["kernel", "length"])[["gflops"]]
.mean()
.reset_index()
)
df_multi.kernel = df_multi.kernel.apply(lambda x: multi_kernels.get(x))
plot_multi = sns.lineplot(
data=df_multi,
x="length",
y="gflops",
style="kernel",
hue="kernel",
markers=True,
dashes=False,
ci=None,
palette=PAL,
)
plot_multi.set_xlabel("lenght(millions)")
plot_multi.set_ylabel("GFLOP/s")
plot_multi.set_ylim(0)
# plt.savefig("fig/plot_multi.png")
plt.savefig("fig/plot_tiled.png")
plt.clf()