summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorCedric Nugteren <web@cedricnugteren.nl>2016-06-27 11:51:57 +0200
committerCedric Nugteren <web@cedricnugteren.nl>2016-06-27 11:51:57 +0200
commit69beca90f47c99019fdcbcf0ebc933abfe3c7266 (patch)
tree6a649117c9bf648f5adb669bd0cb1881b7e45a65 /scripts
parentca386f98832618ae1c4f4a0770c49796896e5211 (diff)
Moved the performance graph scripts to the 'scripts' subfolder
Diffstat (limited to 'scripts')
-rw-r--r--scripts/graphs/common.r199
-rw-r--r--scripts/graphs/xaxpy.r96
-rwxr-xr-xscripts/graphs/xgemm.r94
-rw-r--r--scripts/graphs/xgemv.r83
-rw-r--r--scripts/graphs/xsymm.r94
-rw-r--r--scripts/graphs/xsyr2k.r94
-rw-r--r--scripts/graphs/xsyrk.r94
-rw-r--r--scripts/graphs/xtrmm.r127
8 files changed, 881 insertions, 0 deletions
diff --git a/scripts/graphs/common.r b/scripts/graphs/common.r
new file mode 100644
index 00000000..cd68cf26
--- /dev/null
+++ b/scripts/graphs/common.r
@@ -0,0 +1,199 @@
+
+# ==================================================================================================
+# This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
+# project uses a tab-size of two spaces and a max-width of 100 characters per line.
+#
+# Author(s):
+# Cedric Nugteren <www.cedricnugteren.nl>
+#
+# This file implements the common performance scripts, such as creating a graph.
+#
+# ==================================================================================================
+
+# Colours
+black = "#000000"
+grey = "#888888"
+purplish = "#550077" # [ 85, 0,119] lumi=26
+blueish = "#4765b1" # [ 71,101,177] lumi=100
+redish = "#d67568" # [214,117,104] lumi=136
+greenish = "#9bd4ca" # [155,212,202] lumi=199
+colourset = c(blueish, redish, greenish, purplish)
+
+# Sets the graph markers (circles, triangles, etc.)
+pchs = c(15, 18, 17, 12)
+
+# Other constants
+kilo = 1024
+mega = 1024*1024
+
+# R options
+options("width"=170)
+
+# ==================================================================================================
+
+# Constants
+num_runs <- 4
+devices <- c("-platform","-device")
+options_string <- "-q -no_abbrv -cblas 0"
+library_names <- c("CLBlast", "clBLAS")
+
+# Command-line arguments
+command_line <- commandArgs(trailingOnly=TRUE)
+if (length(command_line) != 2) {
+ print("Usage for device Z on platform Y: Rscript xxxxx.r Y Z")
+ quit()
+}
+platform_id <- command_line[1]
+device_id <- command_line[2]
+
+# Selects the device
+devices_values <- c(platform_id, device_id)
+devices_string <- paste(devices, devices_values, collapse=" ")
+
+# ==================================================================================================
+
+# The main function
+main <- function(routine_name, precision, test_names, test_values,
+ test_xlabels, test_xaxis, metric_gflops) {
+
+ # Names
+ display_name <- toupper(routine_name)
+ if (precision == 16) { display_name <- gsub("^X","H",display_name); }
+ if (precision == 32) { display_name <- gsub("^X","S",display_name); }
+ if (precision == 64) { display_name <- gsub("^X","D",display_name); }
+ if (precision == 3232) { display_name <- gsub("^X","C",display_name); }
+ if (precision == 6464) { display_name <- gsub("^X","Z",display_name); }
+ executable <- paste("./clblast_client_", routine_name, sep="")
+
+ # Configures the outputfile
+ pdf(paste(display_name, ".pdf", sep=""), height=8, width=13)
+ par(mfrow=c(2, 3))
+ par(oma=c(0, 0, 0, 0))
+ par(mar=c(4.6, 4.4, 1.5, 0)) # bottom, left, top, right [c(5.1, 4.1, 4.1, 2.1)]
+ par(mgp=c(2.8, 0.6, 0)) # location of xlab/ylab, tick-mark labels, tick marks [c(3, 1, 0)]
+
+ # Loops over the test-cases
+ for (test_id in 1:length(test_names)) {
+ params_values <- test_values[[test_id]]
+
+ # Loops over the commands within a single list (within a case)
+ for (command_id in 1:length(params_values)) {
+
+ # Runs the client and captures the result
+ params_string <- paste(parameters, params_values[[command_id]], collapse=" ")
+ arguments <- paste(devices_string, params_string, options_string, sep=" ")
+ print(paste("Running", executable, arguments, sep=" "))
+ raw_result_string <- system2(command=executable, args=arguments, stdout=TRUE)
+
+ # Filter the string: only lines containing a ";" can be valid lines
+ result_string <- c()
+ for (line in raw_result_string) {
+ if (grepl(";",line)) {
+ result_string <-
+ c(result_string, line)
+ }
+ }
+
+ # Reads the result into a dataframe
+ command_db <- read.csv(text=result_string, sep=";")
+
+ # Append the results to the final dataframe
+ if (command_id == 1) {
+ db <- command_db
+ } else {
+ db <- rbind(db, command_db)
+ }
+ }
+ print(db)
+
+ # Sets the values on the x-axis and their labels (test dependent)
+ if (is.character(test_xaxis[[test_id]][[1]])) {
+ xdata <- db[,test_xaxis[[test_id]][[1]]]
+ xtics <- xdata
+ log_scale <- test_xaxis[[test_id]][[2]]
+ }
+ else {
+ xdata <- test_xaxis[[test_id]][[1]]
+ xtics <- test_xaxis[[test_id]][[2]]
+ log_scale <- ""
+ }
+
+ # Plots the graph with GFLOPS on the Y-axis
+ if (metric_gflops) {
+ plot_graph(xdata=xdata, ydata=list(db$GFLOPS_1, db$GFLOPS_2), log_setting=log_scale,
+ xmin=min(xdata), xmax=max(xdata),
+ ymin=0, ymax=max(max(db$GFLOPS_1),max(db$GFLOPS_2)),
+ xtics=xtics,
+ xlabel=test_xlabels[[test_id]], ylabel="GFLOPS (higher is better)",
+ graph_title=paste(display_name, test_names[[test_id]], sep=" "),
+ multiple=50, experiment_names=library_names)
+ # Plots the graph with GB/s on the Y-axis
+ } else {
+ plot_graph(xdata=xdata, ydata=list(db$GBs_1, db$GBs_2), log_setting=log_scale,
+ xmin=min(xdata), xmax=max(xdata),
+ ymin=0, ymax=max(max(db$GBs_1),max(db$GBs_2)),
+ xtics=xtics,
+ xlabel=test_xlabels[[test_id]], ylabel="GB/s (higher is better)",
+ graph_title=paste(display_name, test_names[[test_id]], sep=" "),
+ multiple=10, experiment_names=library_names)
+ }
+ }
+}
+
+# ==================================================================================================
+
+# Plots data
+plot_graph <- function(xdata, ydata, log_setting,
+ xmin, xmax, ymin, ymax,
+ xtics, xlabel, ylabel,
+ graph_title,
+ multiple, experiment_names) {
+
+ # Update the ymax to the next multiple of something
+ ymax <- multiple*ceiling(ymax/multiple)
+
+ # Add kilo or mega to the x-labels
+ for (i in 1:length(xtics)) {
+ if (!is.na(as.numeric(xtics[i]))) {
+ if (as.numeric(xtics[i])%%mega == 0) {
+ xtics[i] <- paste(as.character(as.numeric(xtics[i])/mega), "M", sep="")
+ } else if (as.numeric(xtics[i])%%kilo == 0) {
+ xtics[i] <- paste(as.character(as.numeric(xtics[i])/kilo), "K", sep="")
+ }
+ }
+ }
+
+ # Creates an initial graph with axis but without data
+ par(new=F)
+ plot(x=xmin:xmax, y=rep(1, length(xmin:xmax)), log=log_setting,
+ main="", xlab="", ylab="",
+ ylim=c(ymin, ymax), xlim=c(xmin, xmax), axes=F, "n")
+ axis(side=2, las=2)
+ axis(side=1, at=xdata, labels=xtics, las=2)
+ title(xlab=xlabel, line=-1)
+ title(ylab=ylabel, line=2)
+ title(graph_title, line=-2)
+ par(new=T)
+
+ # Loops over all experiments
+ num_experiments <- length(ydata)
+ for (id in 1:num_experiments) {
+
+ # Plots the data for this experiment
+ plot(x=xdata, y=ydata[[id]], log=log_setting,
+ col=colourset[id], pch=pchs[id], lty=1, lwd=1, cex=1,
+ xlab="", ylab="", ylim=c(ymin, ymax), xlim=c(xmin, xmax),
+ axes=F, "b", xpd=T)
+ par(new=T)
+ }
+
+ # Add a legend
+ legend("bottomright", experiment_names,
+ lwd=1, ncol=1, col=colourset, pch=pchs, lty=1, cex=1,
+ bty="n", xpd=T)
+
+ # Done
+ par(new=F)
+}
+
+# ==================================================================================================
diff --git a/scripts/graphs/xaxpy.r b/scripts/graphs/xaxpy.r
new file mode 100644
index 00000000..187590aa
--- /dev/null
+++ b/scripts/graphs/xaxpy.r
@@ -0,0 +1,96 @@
+
+# ==================================================================================================
+# This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
+# project uses a tab-size of two spaces and a max-width of 100 characters per line.
+#
+# Author(s):
+# Cedric Nugteren <www.cedricnugteren.nl>
+#
+# This file implements the performance script for the Xaxpy routine
+#
+# ==================================================================================================
+
+# Includes the common functions
+args <- commandArgs(trailingOnly = FALSE)
+thisfile <- (normalizePath(sub("--file=", "", args[grep("--file=", args)])))
+source(file.path(dirname(thisfile), "common.r"))
+
+# ==================================================================================================
+
+# Settings
+routine_name <- "xaxpy"
+parameters <- c("-n","-incx","-incy",
+ "-num_steps","-step","-runs","-precision")
+precision <- 32
+
+# Sets the names of the test-cases
+test_names <- list(
+ "multiples of 256K",
+ "multiples of 256K (+1)",
+ "around n=1M",
+ "around n=16M",
+ "strides (n=8M)",
+ "powers of 2"
+)
+
+# Defines the test-cases
+test_values <- list(
+ list(c(256*kilo, 1, 1, 16, 256*kilo, num_runs, precision)),
+ list(c(256*kilo+1, 1, 1, 16, 256*kilo, num_runs, precision)),
+ list(c(1*mega, 1, 1, 16, 1, num_runs, precision)),
+ list(c(16*mega, 1, 1, 16, 1, num_runs, precision)),
+ list(
+ c(8*mega, 1, 1, 1, 0, num_runs, precision),
+ c(8*mega, 2, 1, 1, 0, num_runs, precision),
+ c(8*mega, 4, 1, 1, 0, num_runs, precision),
+ c(8*mega, 8, 1, 1, 0, num_runs, precision),
+ c(8*mega, 1, 2, 1, 0, num_runs, precision),
+ c(8*mega, 1, 4, 1, 0, num_runs, precision),
+ c(8*mega, 1, 8, 1, 0, num_runs, precision),
+ c(8*mega, 2, 2, 1, 0, num_runs, precision),
+ c(8*mega, 4, 4, 1, 0, num_runs, precision),
+ c(8*mega, 8, 8, 1, 0, num_runs, precision)
+ ),
+ list(
+ c(32*kilo, 1, 1, 1, 0, num_runs, precision),
+ c(64*kilo, 1, 1, 1, 0, num_runs, precision),
+ c(128*kilo, 1, 1, 1, 0, num_runs, precision),
+ c(256*kilo, 1, 1, 1, 0, num_runs, precision),
+ c(512*kilo, 1, 1, 1, 0, num_runs, precision),
+ c(1*mega, 1, 1, 1, 0, num_runs, precision),
+ c(2*mega, 1, 1, 1, 0, num_runs, precision),
+ c(4*mega, 1, 1, 1, 0, num_runs, precision),
+ c(8*mega, 1, 1, 1, 0, num_runs, precision),
+ c(16*mega, 1, 1, 1, 0, num_runs, precision),
+ c(32*mega, 1, 1, 1, 0, num_runs, precision),
+ c(64*mega, 1, 1, 1, 0, num_runs, precision)
+ )
+)
+
+# Defines the x-labels corresponding to the test-cases
+test_xlabels <- list(
+ "vector sizes (n)",
+ "vector sizes (n)",
+ "vector sizes (n)",
+ "vector sizes (n)",
+ "increments/strides for x and y",
+ "vector sizes (n)"
+)
+
+# Defines the x-axis of the test-cases
+test_xaxis <- list(
+ c("n", ""),
+ c("n", ""),
+ c("n", ""),
+ c("n", ""),
+ list(1:10, c("x1y1", "x2y1", "x4y1", "x8y1", "x1y2", "x1y4", "x1y8", "x2y2", "x4y4", "x8y8")),
+ c("n", "x")
+)
+
+# ==================================================================================================
+
+# Start the script
+main(routine_name=routine_name, precision=precision, test_names=test_names, test_values=test_values,
+ test_xlabels=test_xlabels, test_xaxis=test_xaxis, metric_gflops=FALSE)
+
+# ================================================================================================== \ No newline at end of file
diff --git a/scripts/graphs/xgemm.r b/scripts/graphs/xgemm.r
new file mode 100755
index 00000000..e758f460
--- /dev/null
+++ b/scripts/graphs/xgemm.r
@@ -0,0 +1,94 @@
+
+# ==================================================================================================
+# This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
+# project uses a tab-size of two spaces and a max-width of 100 characters per line.
+#
+# Author(s):
+# Cedric Nugteren <www.cedricnugteren.nl>
+#
+# This file implements the performance script for the Xgemm routine
+#
+# ==================================================================================================
+
+# Includes the common functions
+args <- commandArgs(trailingOnly = FALSE)
+thisfile <- (normalizePath(sub("--file=", "", args[grep("--file=", args)])))
+source(file.path(dirname(thisfile), "common.r"))
+
+# ==================================================================================================
+
+# Settings
+routine_name <- "xgemm"
+parameters <- c("-m","-n","-k","-layout","-transA","-transB",
+ "-num_steps","-step","-runs","-precision")
+precision <- 32
+
+# Sets the names of the test-cases
+test_names <- list(
+ "multiples of 128",
+ "multiples of 128 (+1)",
+ "around m=n=k=512",
+ "around m=n=k=2048",
+ "layouts and transposing (m=n=k=1024)",
+ "powers of 2"
+)
+
+# Defines the test-cases
+test_values <- list(
+ list(c( 128, 128, 128, 102, 111, 111, 16, 128, num_runs, precision)),
+ list(c( 129, 129, 129, 102, 111, 111, 16, 128, num_runs, precision)),
+ list(c( 512, 512, 512, 102, 111, 111, 16, 1, num_runs, precision)),
+ list(c(2048, 2048, 2048, 102, 111, 111, 16, 1, num_runs, precision)),
+ list(
+ c(1024, 1024, 1024, 101, 111, 111, 1, 0, num_runs, precision),
+ c(1024, 1024, 1024, 101, 111, 112, 1, 0, num_runs, precision),
+ c(1024, 1024, 1024, 101, 112, 111, 1, 0, num_runs, precision),
+ c(1024, 1024, 1024, 101, 112, 112, 1, 0, num_runs, precision),
+ c(1024, 1024, 1024, 102, 111, 111, 1, 0, num_runs, precision),
+ c(1024, 1024, 1024, 102, 111, 112, 1, 0, num_runs, precision),
+ c(1024, 1024, 1024, 102, 112, 111, 1, 0, num_runs, precision),
+ c(1024, 1024, 1024, 102, 112, 112, 1, 0, num_runs, precision)
+ ),
+ list(
+ c( 8, 8, 8, 102, 111, 111, 1, 0, num_runs, precision),
+ c( 16, 16, 16, 102, 111, 111, 1, 0, num_runs, precision),
+ c( 32, 32, 32, 102, 111, 111, 1, 0, num_runs, precision),
+ c( 64, 64, 64, 102, 111, 111, 1, 0, num_runs, precision),
+ c( 128, 128, 128, 102, 111, 111, 1, 0, num_runs, precision),
+ c( 256, 256, 256, 102, 111, 111, 1, 0, num_runs, precision),
+ c( 512, 512, 512, 102, 111, 111, 1, 0, num_runs, precision),
+ c(1024, 1024, 1024, 102, 111, 111, 1, 0, num_runs, precision),
+ c(2048, 2048, 2048, 102, 111, 111, 1, 0, num_runs, precision),
+ c(4096, 4096, 4096, 102, 111, 111, 1, 0, num_runs, precision),
+ c(8192, 8192, 8192, 102, 111, 111, 1, 0, num_runs, precision)
+ )
+)
+
+# Defines the x-labels corresponding to the test-cases
+test_xlabels <- list(
+ "matrix sizes (m=n=k)",
+ "matrix sizes (m=n=k)",
+ "matrix sizes (m=n=k)",
+ "matrix sizes (m=n=k)",
+ "layout (row/col), transA (n/y), transB (n/y)",
+ "matrix sizes (m=n=k)"
+)
+
+# Defines the x-axis of the test-cases
+test_xaxis <- list(
+ c("m", ""),
+ c("m", ""),
+ c("m", ""),
+ c("m", ""),
+ list(1:8, c("row,n,n", "row,n,y", "row,y,n", "row,y,y",
+ "col,n,n", "col,n,y", "col,y,n", "col,y,y")),
+ c("m", "x")
+)
+
+# ==================================================================================================
+
+# Start the script
+main(routine_name=routine_name, precision=precision, test_names=test_names, test_values=test_values,
+ test_xlabels=test_xlabels, test_xaxis=test_xaxis, metric_gflops=TRUE)
+
+# ================================================================================================== \ No newline at end of file
diff --git a/scripts/graphs/xgemv.r b/scripts/graphs/xgemv.r
new file mode 100644
index 00000000..9a8040f7
--- /dev/null
+++ b/scripts/graphs/xgemv.r
@@ -0,0 +1,83 @@
+
+# ==================================================================================================
+# This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
+# project uses a tab-size of two spaces and a max-width of 100 characters per line.
+#
+# Author(s):
+# Cedric Nugteren <www.cedricnugteren.nl>
+#
+# This file implements the performance script for the Xgemv routine
+#
+# ==================================================================================================
+
+# Includes the common functions
+args <- commandArgs(trailingOnly = FALSE)
+thisfile <- (normalizePath(sub("--file=", "", args[grep("--file=", args)])))
+source(file.path(dirname(thisfile), "common.r"))
+
+# ==================================================================================================
+
+# Settings
+routine_name <- "xgemv"
+parameters <- c("-n","-m","-incx","-incy","-layout",
+ "-num_steps","-step","-runs","-precision")
+precision <- 32
+
+# Sets the names of the test-cases
+test_names <- list(
+ "multiples of 256",
+ "multiples of 256 (+1)",
+ "around n=m=2K",
+ "multiples of 256 [rotated]",
+ "multiples of 256 (+1) [rotated]",
+ "strides (n=2K)"
+)
+
+# Defines the test-cases
+test_values <- list(
+ list(c(256, 256, 1, 1, 102, 16, 256, num_runs, precision)),
+ list(c(256+1, 256+1, 1, 1, 102, 16, 256, num_runs, precision)),
+ list(c(2*kilo, 2*kilo, 1, 1, 102, 16, 1, num_runs, precision)),
+ list(c(256, 256, 1, 1, 101, 16, 256, num_runs, precision)),
+ list(c(256+1, 256+1, 1, 1, 101, 16, 256, num_runs, precision)),
+ list(
+ c(2*kilo, 2*kilo, 1, 1, 102, 1, 0, num_runs, precision),
+ c(2*kilo, 2*kilo, 2, 1, 102, 1, 0, num_runs, precision),
+ c(2*kilo, 2*kilo, 4, 1, 102, 1, 0, num_runs, precision),
+ c(2*kilo, 2*kilo, 8, 1, 102, 1, 0, num_runs, precision),
+ c(2*kilo, 2*kilo, 1, 2, 102, 1, 0, num_runs, precision),
+ c(2*kilo, 2*kilo, 1, 4, 102, 1, 0, num_runs, precision),
+ c(2*kilo, 2*kilo, 1, 8, 102, 1, 0, num_runs, precision),
+ c(2*kilo, 2*kilo, 2, 2, 102, 1, 0, num_runs, precision),
+ c(2*kilo, 2*kilo, 4, 4, 102, 1, 0, num_runs, precision),
+ c(2*kilo, 2*kilo, 8, 8, 102, 1, 0, num_runs, precision)
+ )
+)
+
+# Defines the x-labels corresponding to the test-cases
+test_xlabels <- list(
+ "vector sizes (n)",
+ "vector sizes (n)",
+ "vector sizes (n)",
+ "vector sizes (n)",
+ "vector sizes (n)",
+ "increments/strides for x and y"
+)
+
+# Defines the x-axis of the test-cases
+test_xaxis <- list(
+ c("n", ""),
+ c("n", ""),
+ c("n", ""),
+ c("n", ""),
+ c("n", ""),
+ list(1:10, c("x1y1", "x2y1", "x4y1", "x8y1", "x1y2", "x1y4", "x1y8", "x2y2", "x4y4", "x8y8"))
+)
+
+# ==================================================================================================
+
+# Start the script
+main(routine_name=routine_name, precision=precision, test_names=test_names, test_values=test_values,
+ test_xlabels=test_xlabels, test_xaxis=test_xaxis, metric_gflops=FALSE)
+
+# ================================================================================================== \ No newline at end of file
diff --git a/scripts/graphs/xsymm.r b/scripts/graphs/xsymm.r
new file mode 100644
index 00000000..a65bb16f
--- /dev/null
+++ b/scripts/graphs/xsymm.r
@@ -0,0 +1,94 @@
+
+# ==================================================================================================
+# This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
+# project uses a tab-size of two spaces and a max-width of 100 characters per line.
+#
+# Author(s):
+# Cedric Nugteren <www.cedricnugteren.nl>
+#
+# This file implements the performance script for the Xsymm routine
+#
+# ==================================================================================================
+
+# Includes the common functions
+args <- commandArgs(trailingOnly = FALSE)
+thisfile <- (normalizePath(sub("--file=", "", args[grep("--file=", args)])))
+source(file.path(dirname(thisfile), "common.r"))
+
+# ==================================================================================================
+
+# Settings
+routine_name <- "xsymm"
+parameters <- c("-m","-n","-layout","-side","-triangle",
+ "-num_steps","-step","-runs","-precision")
+precision <- 32
+
+# Sets the names of the test-cases
+test_names <- list(
+ "multiples of 128",
+ "multiples of 128 (+1)",
+ "around m=n=512",
+ "around m=n=2048",
+ "layouts and side/triangle (m=n=1024)",
+ "powers of 2"
+)
+
+# Defines the test-cases
+test_values <- list(
+ list(c( 128, 128, 102, 111, 111, 16, 128, num_runs, precision)),
+ list(c( 129, 129, 102, 111, 111, 16, 128, num_runs, precision)),
+ list(c( 512, 512, 102, 111, 111, 16, 1, num_runs, precision)),
+ list(c(2048, 2048, 102, 111, 111, 16, 1, num_runs, precision)),
+ list(
+ c(1024, 1024, 101, 111, 111, 1, 0, num_runs, precision),
+ c(1024, 1024, 101, 111, 112, 1, 0, num_runs, precision),
+ c(1024, 1024, 101, 112, 111, 1, 0, num_runs, precision),
+ c(1024, 1024, 101, 112, 112, 1, 0, num_runs, precision),
+ c(1024, 1024, 102, 111, 111, 1, 0, num_runs, precision),
+ c(1024, 1024, 102, 111, 112, 1, 0, num_runs, precision),
+ c(1024, 1024, 102, 112, 111, 1, 0, num_runs, precision),
+ c(1024, 1024, 102, 112, 112, 1, 0, num_runs, precision)
+ ),
+ list(
+ c( 8, 8, 102, 111, 111, 1, 0, num_runs, precision),
+ c( 16, 16, 102, 111, 111, 1, 0, num_runs, precision),
+ c( 32, 32, 102, 111, 111, 1, 0, num_runs, precision),
+ c( 64, 64, 102, 111, 111, 1, 0, num_runs, precision),
+ c( 128, 128, 102, 111, 111, 1, 0, num_runs, precision),
+ c( 256, 256, 102, 111, 111, 1, 0, num_runs, precision),
+ c( 512, 512, 102, 111, 111, 1, 0, num_runs, precision),
+ c(1024, 1024, 102, 111, 111, 1, 0, num_runs, precision),
+ c(2048, 2048, 102, 111, 111, 1, 0, num_runs, precision),
+ c(4096, 4096, 102, 111, 111, 1, 0, num_runs, precision),
+ c(8192, 8192, 102, 111, 111, 1, 0, num_runs, precision)
+ )
+)
+
+# Defines the x-labels corresponding to the test-cases
+test_xlabels <- list(
+ "matrix sizes (m=n)",
+ "matrix sizes (m=n)",
+ "matrix sizes (m=n)",
+ "matrix sizes (m=n)",
+ "layout (row/col), side (l/r), triangle (up/lo)",
+ "matrix sizes (m=n)"
+)
+
+# Defines the x-axis of the test-cases
+test_xaxis <- list(
+ c("m", ""),
+ c("m", ""),
+ c("m", ""),
+ c("m", ""),
+ list(1:8, c("row,l,up", "row,r,up", "row,l,lo", "row,r,lo",
+ "col,l,up", "col,r,up", "col,l,lo", "col,r,lo")),
+ c("m", "x")
+)
+
+# ==================================================================================================
+
+# Start the script
+main(routine_name=routine_name, precision=precision, test_names=test_names, test_values=test_values,
+ test_xlabels=test_xlabels, test_xaxis=test_xaxis, metric_gflops=TRUE)
+
+# ================================================================================================== \ No newline at end of file
diff --git a/scripts/graphs/xsyr2k.r b/scripts/graphs/xsyr2k.r
new file mode 100644
index 00000000..4b2dd4a0
--- /dev/null
+++ b/scripts/graphs/xsyr2k.r
@@ -0,0 +1,94 @@
+
+# ==================================================================================================
+# This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
+# project uses a tab-size of two spaces and a max-width of 100 characters per line.
+#
+# Author(s):
+# Cedric Nugteren <www.cedricnugteren.nl>
+#
+# This file implements the performance script for the Xsyr2k routine
+#
+# ==================================================================================================
+
+# Includes the common functions
+args <- commandArgs(trailingOnly = FALSE)
+thisfile <- (normalizePath(sub("--file=", "", args[grep("--file=", args)])))
+source(file.path(dirname(thisfile), "common.r"))
+
+# ==================================================================================================
+
+# Settings
+routine_name <- "xsyr2k"
+parameters <- c("-n","-k","-layout","-triangle","-transA",
+ "-num_steps","-step","-runs","-precision")
+precision <- 32
+
+# Sets the names of the test-cases
+test_names <- list(
+ "multiples of 128",
+ "multiples of 128 (+1)",
+ "around n=k=512",
+ "around n=k=1536",
+ "layouts and transposing (n=k=1024)",
+ "powers of 2"
+)
+
+# Defines the test-cases
+test_values <- list(
+ list(c( 128, 128, 102, 111, 111, 16, 128, num_runs, precision)),
+ list(c( 129, 129, 102, 111, 111, 16, 128, num_runs, precision)),
+ list(c( 512, 512, 102, 111, 111, 16, 1, num_runs, precision)),
+ list(c(1536, 1536, 102, 111, 111, 16, 1, num_runs, precision)),
+ list(
+ c(1024, 1024, 101, 111, 111, 1, 0, num_runs, precision),
+ c(1024, 1024, 101, 111, 112, 1, 0, num_runs, precision),
+ c(1024, 1024, 101, 112, 111, 1, 0, num_runs, precision),
+ c(1024, 1024, 101, 112, 112, 1, 0, num_runs, precision),
+ c(1024, 1024, 102, 111, 111, 1, 0, num_runs, precision),
+ c(1024, 1024, 102, 111, 112, 1, 0, num_runs, precision),
+ c(1024, 1024, 102, 112, 111, 1, 0, num_runs, precision),
+ c(1024, 1024, 102, 112, 112, 1, 0, num_runs, precision)
+ ),
+ list(
+ c( 8, 8, 102, 111, 111, 1, 0, num_runs, precision),
+ c( 16, 16, 102, 111, 111, 1, 0, num_runs, precision),
+ c( 32, 32, 102, 111, 111, 1, 0, num_runs, precision),
+ c( 64, 64, 102, 111, 111, 1, 0, num_runs, precision),
+ c( 128, 128, 102, 111, 111, 1, 0, num_runs, precision),
+ c( 256, 256, 102, 111, 111, 1, 0, num_runs, precision),
+ c( 512, 512, 102, 111, 111, 1, 0, num_runs, precision),
+ c(1024, 1024, 102, 111, 111, 1, 0, num_runs, precision),
+ c(2048, 2048, 102, 111, 111, 1, 0, num_runs, precision),
+ c(4096, 4096, 102, 111, 111, 1, 0, num_runs, precision),
+ c(8192, 8192, 102, 111, 111, 1, 0, num_runs, precision)
+ )
+)
+
+# Defines the x-labels corresponding to the test-cases
+test_xlabels <- list(
+ "matrix sizes (n=k)",
+ "matrix sizes (n=k)",
+ "matrix sizes (n=k)",
+ "matrix sizes (n=k)",
+ "layout (row/col), triangle (u/l), transA (n/y)",
+ "matrix sizes (n=k)"
+)
+
+# Defines the x-axis of the test-cases
+test_xaxis <- list(
+ c("n", ""),
+ c("n", ""),
+ c("n", ""),
+ c("n", ""),
+ list(1:8, c("row,u,n", "row,u,y", "row,l,n", "row,l,y",
+ "col,u,n", "col,u,y", "col,l,n", "col,l,y")),
+ c("n", "x")
+)
+
+# ==================================================================================================
+
+# Start the script
+main(routine_name=routine_name, precision=precision, test_names=test_names, test_values=test_values,
+ test_xlabels=test_xlabels, test_xaxis=test_xaxis, metric_gflops=TRUE)
+
+# ================================================================================================== \ No newline at end of file
diff --git a/scripts/graphs/xsyrk.r b/scripts/graphs/xsyrk.r
new file mode 100644
index 00000000..4ab46c9f
--- /dev/null
+++ b/scripts/graphs/xsyrk.r
@@ -0,0 +1,94 @@
+
+# ==================================================================================================
+# This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
+# project uses a tab-size of two spaces and a max-width of 100 characters per line.
+#
+# Author(s):
+# Cedric Nugteren <www.cedricnugteren.nl>
+#
+# This file implements the performance script for the Xsyrk routine
+#
+# ==================================================================================================
+
+# Includes the common functions
+args <- commandArgs(trailingOnly = FALSE)
+thisfile <- (normalizePath(sub("--file=", "", args[grep("--file=", args)])))
+source(file.path(dirname(thisfile), "common.r"))
+
+# ==================================================================================================
+
+# Settings
+routine_name <- "xsyrk"
+parameters <- c("-n","-k","-layout","-triangle","-transA",
+ "-num_steps","-step","-runs","-precision")
+precision <- 32
+
+# Sets the names of the test-cases
+test_names <- list(
+ "multiples of 128",
+ "multiples of 128 (+1)",
+ "around n=k=512",
+ "around n=k=2048",
+ "layouts and transposing (n=k=1024)",
+ "powers of 2"
+)
+
+# Defines the test-cases
+test_values <- list(
+ list(c( 128, 128, 102, 111, 111, 16, 128, num_runs, precision)),
+ list(c( 129, 129, 102, 111, 111, 16, 128, num_runs, precision)),
+ list(c( 512, 512, 102, 111, 111, 16, 1, num_runs, precision)),
+ list(c(2048, 2048, 102, 111, 111, 16, 1, num_runs, precision)),
+ list(
+ c(1024, 1024, 101, 111, 111, 1, 0, num_runs, precision),
+ c(1024, 1024, 101, 111, 112, 1, 0, num_runs, precision),
+ c(1024, 1024, 101, 112, 111, 1, 0, num_runs, precision),
+ c(1024, 1024, 101, 112, 112, 1, 0, num_runs, precision),
+ c(1024, 1024, 102, 111, 111, 1, 0, num_runs, precision),
+ c(1024, 1024, 102, 111, 112, 1, 0, num_runs, precision),
+ c(1024, 1024, 102, 112, 111, 1, 0, num_runs, precision),
+ c(1024, 1024, 102, 112, 112, 1, 0, num_runs, precision)
+ ),
+ list(
+ c( 8, 8, 102, 111, 111, 1, 0, num_runs, precision),
+ c( 16, 16, 102, 111, 111, 1, 0, num_runs, precision),
+ c( 32, 32, 102, 111, 111, 1, 0, num_runs, precision),
+ c( 64, 64, 102, 111, 111, 1, 0, num_runs, precision),
+ c( 128, 128, 102, 111, 111, 1, 0, num_runs, precision),
+ c( 256, 256, 102, 111, 111, 1, 0, num_runs, precision),
+ c( 512, 512, 102, 111, 111, 1, 0, num_runs, precision),
+ c(1024, 1024, 102, 111, 111, 1, 0, num_runs, precision),
+ c(2048, 2048, 102, 111, 111, 1, 0, num_runs, precision),
+ c(4096, 4096, 102, 111, 111, 1, 0, num_runs, precision),
+ c(8192, 8192, 102, 111, 111, 1, 0, num_runs, precision)
+ )
+)
+
+# Defines the x-labels corresponding to the test-cases
+test_xlabels <- list(
+ "matrix sizes (n=k)",
+ "matrix sizes (n=k)",
+ "matrix sizes (n=k)",
+ "matrix sizes (n=k)",
+ "layout (row/col), triangle (u/l), transA (n/y)",
+ "matrix sizes (n=k)"
+)
+
+# Defines the x-axis of the test-cases
+test_xaxis <- list(
+ c("n", ""),
+ c("n", ""),
+ c("n", ""),
+ c("n", ""),
+ list(1:8, c("row,u,n", "row,u,y", "row,l,n", "row,l,y",
+ "col,u,n", "col,u,y", "col,l,n", "col,l,y")),
+ c("n", "x")
+)
+
+# ==================================================================================================
+
+# Start the script
+main(routine_name=routine_name, precision=precision, test_names=test_names, test_values=test_values,
+ test_xlabels=test_xlabels, test_xaxis=test_xaxis, metric_gflops=TRUE)
+
+# ================================================================================================== \ No newline at end of file
diff --git a/scripts/graphs/xtrmm.r b/scripts/graphs/xtrmm.r
new file mode 100644
index 00000000..c2faaa8b
--- /dev/null
+++ b/scripts/graphs/xtrmm.r
@@ -0,0 +1,127 @@
+
+# ==================================================================================================
+# This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
+# project uses a tab-size of two spaces and a max-width of 100 characters per line.
+#
+# Author(s):
+# Cedric Nugteren <www.cedricnugteren.nl>
+#
+# This file implements the performance script for the Xtrmm routine
+#
+# ==================================================================================================
+
+# Includes the common functions
+args <- commandArgs(trailingOnly = FALSE)
+thisfile <- (normalizePath(sub("--file=", "", args[grep("--file=", args)])))
+source(file.path(dirname(thisfile), "common.r"))
+
+# ==================================================================================================
+
+# Settings
+routine_name <- "xtrmm"
+parameters <- c("-m","-n","-layout","-side","-triangle","-transA","-diagonal",
+ "-num_steps","-step","-runs","-precision")
+precision <- 32
+
+# Sets the names of the test-cases
+test_names <- list(
+ "multiples of 128",
+ "multiples of 128 (+1)",
+ "around m=n=512",
+ "around m=n=2048",
+ "layouts and side/triangle (m=n=1024)",
+ "powers of 2"
+)
+
+# Defines the test-cases
+test_values <- list(
+ list(c( 128, 128, 102, 141, 121, 111, 131, 16, 128, num_runs, precision)),
+ list(c( 129, 129, 102, 141, 121, 111, 131, 16, 128, num_runs, precision)),
+ list(c( 512, 512, 102, 141, 121, 111, 131, 16, 1, num_runs, precision)),
+ list(c(2048, 2048, 102, 141, 121, 111, 131, 16, 1, num_runs, precision)),
+ list(
+ c(1024, 1024, 101, 141, 121, 111, 131, 1, 0, num_runs, precision),
+ c(1024, 1024, 101, 141, 121, 111, 132, 1, 0, num_runs, precision),
+ c(1024, 1024, 101, 141, 121, 112, 131, 1, 0, num_runs, precision),
+ c(1024, 1024, 101, 141, 121, 112, 132, 1, 0, num_runs, precision),
+ c(1024, 1024, 101, 141, 122, 111, 131, 1, 0, num_runs, precision),
+ c(1024, 1024, 101, 141, 122, 111, 132, 1, 0, num_runs, precision),
+ c(1024, 1024, 101, 141, 122, 112, 131, 1, 0, num_runs, precision),
+ c(1024, 1024, 101, 141, 122, 112, 132, 1, 0, num_runs, precision),
+
+ c(1024, 1024, 101, 142, 121, 111, 131, 1, 0, num_runs, precision),
+ c(1024, 1024, 101, 142, 121, 111, 132, 1, 0, num_runs, precision),
+ c(1024, 1024, 101, 142, 121, 112, 131, 1, 0, num_runs, precision),
+ c(1024, 1024, 101, 142, 121, 112, 132, 1, 0, num_runs, precision),
+ c(1024, 1024, 101, 142, 122, 111, 131, 1, 0, num_runs, precision),
+ c(1024, 1024, 101, 142, 122, 111, 132, 1, 0, num_runs, precision),
+ c(1024, 1024, 101, 142, 122, 112, 131, 1, 0, num_runs, precision),
+ c(1024, 1024, 101, 142, 122, 112, 132, 1, 0, num_runs, precision),
+
+ c(1024, 1024, 102, 141, 121, 111, 131, 1, 0, num_runs, precision),
+ c(1024, 1024, 102, 141, 121, 111, 132, 1, 0, num_runs, precision),
+ c(1024, 1024, 102, 141, 121, 112, 131, 1, 0, num_runs, precision),
+ c(1024, 1024, 102, 141, 121, 112, 132, 1, 0, num_runs, precision),
+ c(1024, 1024, 102, 141, 122, 111, 131, 1, 0, num_runs, precision),
+ c(1024, 1024, 102, 141, 122, 111, 132, 1, 0, num_runs, precision),
+ c(1024, 1024, 102, 141, 122, 112, 131, 1, 0, num_runs, precision),
+ c(1024, 1024, 102, 141, 122, 112, 132, 1, 0, num_runs, precision),
+
+ c(1024, 1024, 102, 142, 121, 111, 131, 1, 0, num_runs, precision),
+ c(1024, 1024, 102, 142, 121, 111, 132, 1, 0, num_runs, precision),
+ c(1024, 1024, 102, 142, 121, 112, 131, 1, 0, num_runs, precision),
+ c(1024, 1024, 102, 142, 121, 112, 132, 1, 0, num_runs, precision),
+ c(1024, 1024, 102, 142, 122, 111, 131, 1, 0, num_runs, precision),
+ c(1024, 1024, 102, 142, 122, 111, 132, 1, 0, num_runs, precision),
+ c(1024, 1024, 102, 142, 122, 112, 131, 1, 0, num_runs, precision),
+ c(1024, 1024, 102, 142, 122, 112, 132, 1, 0, num_runs, precision)
+ ),
+ list(
+ c( 8, 8, 102, 141, 121, 111, 131, 1, 0, num_runs, precision),
+ c( 16, 16, 102, 141, 121, 111, 131, 1, 0, num_runs, precision),
+ c( 32, 32, 102, 141, 121, 111, 131, 1, 0, num_runs, precision),
+ c( 64, 64, 102, 141, 121, 111, 131, 1, 0, num_runs, precision),
+ c( 128, 128, 102, 141, 121, 111, 131, 1, 0, num_runs, precision),
+ c( 256, 256, 102, 141, 121, 111, 131, 1, 0, num_runs, precision),
+ c( 512, 512, 102, 141, 121, 111, 131, 1, 0, num_runs, precision),
+ c(1024, 1024, 102, 141, 121, 111, 131, 1, 0, num_runs, precision),
+ c(2048, 2048, 102, 141, 121, 111, 131, 1, 0, num_runs, precision),
+ c(4096, 4096, 102, 141, 121, 111, 131, 1, 0, num_runs, precision),
+ c(8192, 8192, 102, 141, 121, 111, 131, 1, 0, num_runs, precision)
+ )
+)
+
+# Defines the x-labels corresponding to the test-cases
+test_xlabels <- list(
+ "matrix sizes (m=n)",
+ "matrix sizes (m=n)",
+ "matrix sizes (m=n)",
+ "matrix sizes (m=n)",
+ "layout (row/col), side (l/r), triangle (up/lo), transA (n/y), diag (u/nu)",
+ "matrix sizes (m=n)"
+)
+
+# Defines the x-axis of the test-cases
+test_xaxis <- list(
+ c("m", ""),
+ c("m", ""),
+ c("m", ""),
+ c("m", ""),
+ list(1:32, c("row,l,up,n,u", "row,l,up,n,nu", "row,l,up,y,u", "row,l,up,y,nu",
+ "row,r,up,n,u", "row,r,up,n,nu", "row,r,up,y,u", "row,r,up,y,nu",
+ "row,l,lo,n,u", "row,l,lo,n,nu", "row,l,lo,y,u", "row,l,lo,y,nu",
+ "row,r,lo,n,u", "row,r,lo,n,nu", "row,r,lo,y,u", "row,r,lo,y,nu",
+ "col,l,up,n,u", "col,l,up,n,nu", "col,l,up,y,u", "col,l,up,y,nu",
+ "col,r,up,n,u", "col,r,up,n,nu", "col,r,up,y,u", "col,r,up,y,nu",
+ "col,l,lo,n,u", "col,l,lo,n,nu", "col,l,lo,y,u", "col,l,lo,y,nu",
+ "col,r,lo,n,u", "col,r,lo,n,nu", "col,r,lo,y,u", "col,r,lo,y,nu")),
+ c("m", "x")
+)
+
+# ==================================================================================================
+
+# Start the script
+main(routine_name=routine_name, precision=precision, test_names=test_names, test_values=test_values,
+ test_xlabels=test_xlabels, test_xaxis=test_xaxis, metric_gflops=TRUE)
+
+# ================================================================================================== \ No newline at end of file