summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2022-01-14 16:12:38 +0000
committerYann Herklotz <git@yannherklotz.com>2022-01-14 16:12:38 +0000
commitb91543cdbab6b676261458418e8e3b2e18d70010 (patch)
treebf7c4097323f36c49d9b6b14fa17e60a73a8db16
parentfa72b7f4ab3f9f3da6dbb683db5eb8396dfab9a4 (diff)
downloadfccm22_rsvhls-b91543cdbab6b676261458418e8e3b2e18d70010.tar.gz
fccm22_rsvhls-b91543cdbab6b676261458418e8e3b2e18d70010.zip
Add partial graph
-rw-r--r--data/slice-ratio.csv56
-rw-r--r--data/time-ratio.csv56
-rw-r--r--scripts/gen-data.rkt17
-rw-r--r--verified_resource_sharing.tex77
4 files changed, 130 insertions, 76 deletions
diff --git a/data/slice-ratio.csv b/data/slice-ratio.csv
index 39ba37a..824e5cd 100644
--- a/data/slice-ratio.csv
+++ b/data/slice-ratio.csv
@@ -1,28 +1,28 @@
-vericert,vericert-fun
-1.532967,0.694505
-2.442761,0.473064
-1.393443,0.727459
-1.474654,0.606759
-1.570388,0.543689
-1.345946,0.745946
-1.309859,0.848592
-1.571644,0.736048
-1.635406,0.545838
-1.067164,0.748134
-1.484444,1.071111
-1.764471,0.93014
-1.183544,0.628165
-1.468132,1.389011
-1.339048,1.068571
-1.491525,0.664407
-1.58838,0.783961
-1.478424,0.510319
-1.673529,1.473529
-1.401508,0.509896
-1.504412,0.960294
-1.288889,0
-1.496855,0.643082
-4.135104,1.055427
-2.317143,0.888571
-1.908894,0.678959
-1.267769,0.545455 \ No newline at end of file
+benchmark,vericert,vericert-fun
+cholesky,1.532967,0.694505
+mvt,2.442761,0.473064
+trmm,1.393443,0.727459
+gemm,1.474654,0.606759
+durbin,1.570388,0.543689
+atas,1.345946,0.745946
+trisolv,1.309859,0.848592
+symm,1.571644,0.736048
+2mm,1.635406,0.545838
+covariance,1.067164,0.748134
+jacobi-1d,1.484444,1.071111
+gemver,1.764471,0.93014
+doitgen,1.183544,0.628165
+nussinov,1.468132,1.389011
+jacobi-2d,1.339048,1.068571
+lu,1.491525,0.664407
+ludcmp,1.58838,0.783961
+bicg,1.478424,0.510319
+heat-3d,1.673529,1.473529
+3mm,1.401508,0.509896
+fdtd-2d,1.504412,0.960294
+seidel-2d,1.288889,0
+syr2k,1.496855,0.643082
+adi,4.135104,1.055427
+floyd-warshall,2.317143,0.888571
+gesummv,1.908894,0.678959
+syrk,1.267769,0.545455 \ No newline at end of file
diff --git a/data/time-ratio.csv b/data/time-ratio.csv
index 68cb8d5..4f174b1 100644
--- a/data/time-ratio.csv
+++ b/data/time-ratio.csv
@@ -1,28 +1,28 @@
-vericert,vericert-fun
-2.874567,2.890138
-2.064507,2.024059
-2.018529,2.057718
-2.553546,2.644371
-1.629528,1.458129
-2.649152,2.652406
-2.244284,2.22325
-3.184623,3.075592
-3.212696,3.000344
-1.846985,1.8659
-2.0846,2.063738
-2.683782,2.7166
-2.336773,2.349229
-1.86928,1.918754
-2.75994,2.70762
-2.692454,2.883045
-2.848325,2.737868
-2.470766,2.540274
-5.976952,5.805205
-2.288145,2.387671
-4.783038,4.749155
-2.630884,0.0001
-3.996176,4.078228
-4.190279,3.776937
-2.90839,2.85629
-2.716611,2.79227
-2.805196,2.907335
+benchmark,vericert,vericert-fun
+cholesky,2.874567,2.890138
+mvt,2.064507,2.024059
+trmm,2.018529,2.057718
+gemm,2.553546,2.644371
+durbin,1.629528,1.458129
+atas,2.649152,2.652406
+trisolv,2.244284,2.22325
+symm,3.184623,3.075592
+2mm,3.212696,3.000344
+covariance,1.846985,1.8659
+jacobi-1d,2.0846,2.063738
+gemver,2.683782,2.7166
+doitgen,2.336773,2.349229
+nussinov,1.86928,1.918754
+jacobi-2d,2.75994,2.70762
+lu,2.692454,2.883045
+ludcmp,2.848325,2.737868
+bicg,2.470766,2.540274
+heat-3d,5.976952,5.805205
+3mm,2.288145,2.387671
+fdtd-2d,4.783038,4.749155
+seidel-2d,2.630884,0
+syr2k,3.996176,4.078228
+adi,4.190279,3.776937
+floyd-warshall,2.90839,2.85629
+gesummv,2.716611,2.79227
+syrk,2.805196,2.907335 \ No newline at end of file
diff --git a/scripts/gen-data.rkt b/scripts/gen-data.rkt
index 072af6d..0410bc6 100644
--- a/scripts/gen-data.rkt
+++ b/scripts/gen-data.rkt
@@ -27,6 +27,9 @@
(define (get-row lst n)
(map (lambda (x) (string->number (nth x n))) lst))
+(define (get-row-string lst n)
+ (map (lambda (x) (nth x n)) lst))
+
(define (get-slice lst) (get-row lst 2))
(define (get-delay lst) (get-row lst 9))
(define (get-cycles lst) (get-row lst 10))
@@ -52,18 +55,20 @@
(define time-ratio (open-output-file "./data/time-ratio.csv"))
(display (table->string
- (cons '("vericert" "vericert-fun") (for/list
- ([i time-ratio-vericert-full-inlining]
+ (cons '("benchmark" "vericert" "vericert-fun") (for/list
+ ([b (get-row-string bambu-results 0)]
+ [i time-ratio-vericert-full-inlining]
[j time-ratio-vericert-fun])
- (list i j))))
+ (list b i j))))
time-ratio)
(close-output-port time-ratio)
(define slice-ratio (open-output-file "./data/slice-ratio.csv"))
(display (table->string
- (cons '("vericert" "vericert-fun") (for/list
- ([i slice-ratio-vericert-full-inlining]
+ (cons '("benchmark" "vericert" "vericert-fun") (for/list
+ ([b (get-row-string bambu-results 0)]
+ [i slice-ratio-vericert-full-inlining]
[j slice-ratio-vericert-fun])
- (list i j))))
+ (list b i j))))
slice-ratio)
(close-output-port slice-ratio)
diff --git a/verified_resource_sharing.tex b/verified_resource_sharing.tex
index d9c5a4d..1fc5db7 100644
--- a/verified_resource_sharing.tex
+++ b/verified_resource_sharing.tex
@@ -9,6 +9,7 @@
\usepackage{tabu}
\usepackage{tikz}
\usepackage{pgfplots}
+\usepackage{pgfplotstable}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{hyperref}
@@ -20,6 +21,9 @@
\usepackage{tikz-timing}
\usetikzlibrary{fit}
\usetikzlibrary{decorations.pathreplacing}
+\usetikzlibrary{shapes,calc,arrows.meta}
+\usetikzlibrary{pgfplots.groupplots}
+\pgfplotsset{compat=1.16}
\usepackage{listings}
\lstset{
@@ -414,21 +418,66 @@ We now compare the performance of the hardware generated by \vericertfun{} again
Figure~\ref{fig:results} summarises our results. The x-axis shows the impact of resource sharing on the speed of the hardware (as calculated by the cycle count divided by fmax); we see that all the data points lie very close to 1, which suggests no significant impact. On average the cycle count increases by 0.7\%; this modest increase is in line with expectations because our translation introduces an extra state per function call. The impact on fmax is similarly minimal, ranging between a 1.5\% increase and a 3.1\% decrease (0.2\% decrease on average).
+\pgfplotstableread[col sep=comma]{data/time-ratio.csv}{\divtimingtable}
+\pgfplotstableread[col sep=comma]{data/slice-ratio.csv}{\divslicetable}
+\definecolor{vericertcol}{HTML}{66C2A5}
+\definecolor{legupnooptcol}{HTML}{FC8D62}
+\definecolor{legupnooptnochaincol}{HTML}{8DA0CB}
+\newcommand\backgroundbar[2][5]{\draw[draw=none, fill=black!#1] (axis cs:#2*2+0.5,0.1) rectangle
+ (axis cs:1+#2*2+0.5,300);}
+\newcommand\legup{Bambu}
+
\begin{figure}
-RESULTS GRAPH HERE.\par
-RESULTS GRAPH HERE.\par
-RESULTS GRAPH HERE.\par
-RESULTS GRAPH HERE.\par
-RESULTS GRAPH HERE.\par
-RESULTS GRAPH HERE.\par
-RESULTS GRAPH HERE.\par
-RESULTS GRAPH HERE.\par
-RESULTS GRAPH HERE.\par
-RESULTS GRAPH HERE.\par
-RESULTS GRAPH HERE.\par
-RESULTS GRAPH HERE.\par
-RESULTS GRAPH HERE.\par
-\caption{Impact of resource sharing on the speed and area usage of generated hardware.}
+ \begin{tikzpicture}
+ \begin{groupplot}[
+ group style={
+ group name=my plots,
+ group size=1 by 2,
+ xlabels at=edge bottom,
+ xticklabels at=edge bottom,
+ vertical sep=5pt,
+ },
+ ymode=log,
+ ybar=0.4pt,
+ width=1\textwidth,
+ height=0.4\textwidth,
+ /pgf/bar width=3pt,
+ legend pos=south east,
+ log ticks with fixed point,
+ xticklabels from table={\divtimingtable}{benchmark},
+ legend style={nodes={scale=0.7, transform shape}},
+ x tick label style={rotate=90,anchor=east,font=\footnotesize},
+ legend columns=-1,
+ xtick=data,
+ enlarge x limits={abs=0.5},
+ ylabel style={font=\footnotesize},
+ xtick style={draw=none},
+ ]
+
+ \nextgroupplot[ymin=0.8,ymax=300,ylabel={Execution time relative to \legup{}}]
+ \pgfplotsinvokeforeach{0,...,12}{%
+ \backgroundbar{#1}}
+ \backgroundbar[10]{13}
+ \addplot+[vericertcol] table [x expr=\coordindex,y=vericert,col sep=comma] from \divtimingtable;
+ \addplot+[legupnooptcol] table [x expr=\coordindex,y=vericert-fun,col sep=comma] from \divtimingtable;
+ \draw (axis cs:-1,1) -- (axis cs:28,1);
+ % JW: redraw axis border which has been partially covered by the grey bars
+ \draw (axis cs:-0.5,0.8) rectangle (axis cs:27.5,300);
+
+ \nextgroupplot[ymin=0.3,ymax=10,ylabel={Area relative to \legup{}}]
+ \pgfplotsinvokeforeach{0,...,12}{%
+ \backgroundbar{#1}}
+ \backgroundbar[10]{13}
+ \addplot+[vericertcol] table [x expr=\coordindex,y=vericert,col sep=comma] from \divslicetable;
+ \addplot+[legupnooptcol] table [x expr=\coordindex,y=vericert-fun,col sep=comma] from \divslicetable;
+ \draw (axis cs:-1,1) -- (axis cs:28,1);
+ % JW: redraw axis border which has been partially covered by the grey bars
+ \draw (axis cs:-0.5,0.3) rectangle (axis cs:27.5,10);
+
+ \legend{\vericert{},vericert-fun};
+ \end{groupplot}
+ \end{tikzpicture}
+ \caption{Performance of \vericert{} compared to \legup{}, with division and modulo operations enabled. The top graph compares the execution times and the bottom graph compares the area of the generated designs. In both cases, the performance of \vericert{}, \legup{} without LLVM optimisations and without operation chaining, and \legup{} without LLVM optimisations is compared against default \legup{}.}
\label{fig:results}
\end{figure}