diff options
author | CNugteren <web@cedricnugteren.nl> | 2015-06-14 12:05:30 +0200 |
---|---|---|
committer | CNugteren <web@cedricnugteren.nl> | 2015-06-14 12:05:30 +0200 |
commit | 7776323cb40d2712cabef58fd3cefb4ddd3aa1bc (patch) | |
tree | f008f68f9513d7cdfd2999c9ebeaaec423cd6759 /test/performance/graphs | |
parent | 294a3e3d410c87ffcc7fc550e09b6d45c71a0af8 (diff) |
Added GEMV performance-graph script
Diffstat (limited to 'test/performance/graphs')
-rw-r--r-- | test/performance/graphs/common.r | 1 | ||||
-rw-r--r-- | test/performance/graphs/xgemv.r | 83 |
2 files changed, 84 insertions, 0 deletions
diff --git a/test/performance/graphs/common.r b/test/performance/graphs/common.r index 4572e559..e310b811 100644 --- a/test/performance/graphs/common.r +++ b/test/performance/graphs/common.r @@ -82,6 +82,7 @@ main <- function(routine_name, precision, test_names, test_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=" ")) result_string <- system2(command=executable, args=arguments, stdout=TRUE) # Reads the result into a dataframe diff --git a/test/performance/graphs/xgemv.r b/test/performance/graphs/xgemv.r new file mode 100644 index 00000000..a4e7a834 --- /dev/null +++ b/test/performance/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, 1, 16, 256, num_runs, precision)), + list(c(256+1, 256+1, 1, 1, 1, 16, 256, num_runs, precision)), + list(c(2*kilo, 2*kilo, 1, 1, 1, 16, 1, num_runs, precision)), + list(c(256, 256, 1, 1, 0, 16, 256, num_runs, precision)), + list(c(256+1, 256+1, 1, 1, 0, 16, 256, num_runs, precision)), + list( + c(2*kilo, 2*kilo, 1, 1, 1, 1, 0, num_runs, precision), + c(2*kilo, 2*kilo, 2, 1, 1, 1, 0, num_runs, precision), + c(2*kilo, 2*kilo, 4, 1, 1, 1, 0, num_runs, precision), + c(2*kilo, 2*kilo, 8, 1, 1, 1, 0, num_runs, precision), + c(2*kilo, 2*kilo, 1, 2, 1, 1, 0, num_runs, precision), + c(2*kilo, 2*kilo, 1, 4, 1, 1, 0, num_runs, precision), + c(2*kilo, 2*kilo, 1, 8, 1, 1, 0, num_runs, precision), + c(2*kilo, 2*kilo, 2, 2, 1, 1, 0, num_runs, precision), + c(2*kilo, 2*kilo, 4, 4, 1, 1, 0, num_runs, precision), + c(2*kilo, 2*kilo, 8, 8, 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)", + "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 |