-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathspmv-gflops-nnz.plot.jsonata
56 lines (53 loc) · 1.37 KB
/
spmv-gflops-nnz.plot.jsonata
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
(
"Select the system name and executor to show the results for:";
$system := "V100";
$executor := "cuda";
$data := content[dataset.system=$system and dataset.executor=$executor];
$lib := $contains($executor, "cuda") ? "cusp" : "hipsp";
$turn_format := function ($str, $lib) {
$replace($str, /sparselib|splib|cusp|hipsp/, $lib)
};
$formats := ["coo", "csr", "ell", "hybrid", "sellp",
$turn_format("splib_coo", $lib),
$turn_format("splib_csr", $lib),
$turn_format("splib_ell", $lib),
$turn_format("splib_hybrid", $lib)];
$getColor := function($num_colors, $id) {
"hsl(" & $floor(360 * $id / $num_colors) & ",40%,55%)"
};
$plot_data := $formats~>$map(function($v, $i) {{
"label": $v,
"data": $data.{
"x": problem.nonzeros,
"y": 2 * problem.nonzeros / (spmv~>$lookup($v)).time
},
"backgroundColor": $formats~>$count()~>$getColor($i)
}});
{
"type": "scatter",
"data": { "datasets": $plot_data },
"options": {
"title": {
"display": true,
"text": "Performance vs Nonzero Count"
},
"tooltips": {
"mode": "index",
"intersect": true
},
"scales": {
"xAxes": [{
"type": "logarithmic",
"scaleLabel": {
"display": true,
"labelString": "#nonzeros"
}
}],
"yAxes": [{ "scaleLabel": {
"display": true,
"labelString": "GFLOP/s"
}}]
}
}
}
)