summaryrefslogtreecommitdiff
path: root/scripts/graphs/xsyrk.r
blob: 4ab46c9f299127eccbf999a832dac1c5d368e238 (plain)
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
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)

# ==================================================================================================