summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2022-01-14 16:04:54 +0000
committerYann Herklotz <git@yannherklotz.com>2022-01-14 16:04:54 +0000
commitfccdbc2a164fcd324a401ae328b1ac31dad95af9 (patch)
tree69b9791a247968c951431e34bf209d0ea11825ad
parent17784589e22e617401208b30782ca38c0a08e6d1 (diff)
downloadfccm22_rsvhls-fccdbc2a164fcd324a401ae328b1ac31dad95af9.tar.gz
fccm22_rsvhls-fccdbc2a164fcd324a401ae328b1ac31dad95af9.zip
Add slice-ratio and time-ratio
-rw-r--r--data/bambu-area.csv4
-rw-r--r--data/slice-ratio.csv28
-rw-r--r--data/time-ratio.csv28
-rw-r--r--scripts/gen-data.rkt69
4 files changed, 127 insertions, 2 deletions
diff --git a/data/bambu-area.csv b/data/bambu-area.csv
index 1377a2a..1baaa76 100644
--- a/data/bambu-area.csv
+++ b/data/bambu-area.csv
@@ -3,7 +3,7 @@ cholesky,1357,910,2071,3080,8,0,3,0.148,9.509,432503
mvt,689,594,1442,1616,8,0,6,0.145,8.79,36958
trmm,628,488,1113,1460,3,0,3,0.135,8.396,42642
gemm,803,651,1568,1882,5,0,6,0.138,7.924,88052
-durbin,566,412,921,1414,3,0,6,0.15,9.202,FALSE
+durbin,566,412,921,1414,3,0,6,0.15,9.202,7454
atas,456,370,806,1119,6,0,3,0.146,7.608,22628
trisolv,345,284,698,844,6,0,3,0.143,7.151,9468
symm,894,663,1617,1949,5,0,6,0.138,8.335,50392
@@ -19,7 +19,7 @@ ludcmp,1728,1222,2363,4177,11,0,3,0.164,9.881,458706
bicg,614,533,1285,1397,8,0,9,0.142,7.78,30060
heat-3d,818,680,1439,2151,4,0,3,0.145,9.172,50107
3mm,1293,1061,2209,3244,8,0,6,0.161,9.383,126860
-fdtd-2d,856,680,1525,2195,7,0,3,0.143,8.552,FALSE
+fdtd-2d,856,680,1525,2195,7,0,3,0.143,8.552,101407
seidel-2d,521,405,954,1133,4,0,3,0.143,8.638,172996
syr2k,825,636,1582,1829,6,0,9,0.138,7.783,76378
adi,1057,866,1775,2770,4,0,9,0.152,9.584,218309
diff --git a/data/slice-ratio.csv b/data/slice-ratio.csv
new file mode 100644
index 0000000..39ba37a
--- /dev/null
+++ b/data/slice-ratio.csv
@@ -0,0 +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
diff --git a/data/time-ratio.csv b/data/time-ratio.csv
new file mode 100644
index 0000000..68cb8d5
--- /dev/null
+++ b/data/time-ratio.csv
@@ -0,0 +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
diff --git a/scripts/gen-data.rkt b/scripts/gen-data.rkt
new file mode 100644
index 0000000..072af6d
--- /dev/null
+++ b/scripts/gen-data.rkt
@@ -0,0 +1,69 @@
+#lang racket
+
+(require racket/match)
+(require racket/list)
+(require racket/file)
+
+(require threading)
+
+(require csv-reading)
+(require csv-writing)
+
+(define (parse-csv f)
+ (let* ([exec-csv (open-input-file f)]
+ [report (csv->list exec-csv)])
+ (close-input-port exec-csv)
+ report))
+
+(define (nth lst idx)
+ (cond ((empty? lst) empty) ; more effiecent than (= (length lst) 0)
+ ((= idx 0) (first lst))
+ (else (nth (rest lst) (- idx 1)))))
+
+(define bambu-results (cdr (parse-csv "./data/bambu-area.csv")))
+(define vericert-full-inlining (cdr (parse-csv "./data/vericert-full-inlining.csv")))
+(define vericert-fun (cdr (parse-csv "./data/vericert-fun.csv")))
+
+(define (get-row lst n)
+ (map (lambda (x) (string->number (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))
+
+(define (get-relative lst1 lst2)
+ (for/list ([i lst1] [j lst2]) (/ i j)))
+
+(define (mul-lists lst1 lst2) (for/list ([i lst1] [j lst2]) (* i j)))
+
+(define slice-ratio-vericert-fun
+ (get-relative (get-slice vericert-fun) (get-slice bambu-results)))
+
+(define slice-ratio-vericert-full-inlining
+ (get-relative (get-slice vericert-full-inlining) (get-slice bambu-results)))
+
+(define time-ratio-vericert-fun
+ (get-relative (mul-lists (get-delay vericert-fun) (get-cycles vericert-fun))
+ (mul-lists (get-delay bambu-results) (get-cycles bambu-results))))
+
+(define time-ratio-vericert-full-inlining
+ (get-relative (mul-lists (get-delay vericert-full-inlining) (get-cycles vericert-full-inlining))
+ (mul-lists (get-delay bambu-results) (get-cycles bambu-results))))
+
+(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]
+ [j time-ratio-vericert-fun])
+ (list 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]
+ [j slice-ratio-vericert-fun])
+ (list i j))))
+ slice-ratio)
+(close-output-port slice-ratio)