summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/correctness/testblas.hpp2
-rw-r--r--test/performance/client.cpp2
-rw-r--r--test/performance/client.hpp2
-rw-r--r--test/routines/level1/xamax.hpp2
-rw-r--r--test/routines/level1/xasum.hpp2
-rw-r--r--test/routines/level1/xaxpy.hpp2
-rw-r--r--test/routines/level1/xcopy.hpp2
-rw-r--r--test/routines/level1/xdot.hpp2
-rw-r--r--test/routines/level1/xdotc.hpp2
-rw-r--r--test/routines/level1/xdotu.hpp2
-rw-r--r--test/routines/level1/xnrm2.hpp2
-rw-r--r--test/routines/level1/xscal.hpp2
-rw-r--r--test/routines/level1/xswap.hpp2
-rw-r--r--test/routines/level2/xgbmv.hpp2
-rw-r--r--test/routines/level2/xgemv.hpp2
-rw-r--r--test/routines/level2/xger.hpp2
-rw-r--r--test/routines/level2/xgerc.hpp2
-rw-r--r--test/routines/level2/xgeru.hpp2
-rw-r--r--test/routines/level2/xhbmv.hpp2
-rw-r--r--test/routines/level2/xhemv.hpp2
-rw-r--r--test/routines/level2/xher.hpp2
-rw-r--r--test/routines/level2/xher2.hpp2
-rw-r--r--test/routines/level2/xhpmv.hpp2
-rw-r--r--test/routines/level2/xhpr.hpp2
-rw-r--r--test/routines/level2/xhpr2.hpp2
-rw-r--r--test/routines/level2/xsbmv.hpp2
-rw-r--r--test/routines/level2/xspmv.hpp2
-rw-r--r--test/routines/level2/xspr.hpp2
-rw-r--r--test/routines/level2/xspr2.hpp2
-rw-r--r--test/routines/level2/xsymv.hpp2
-rw-r--r--test/routines/level2/xsyr.hpp2
-rw-r--r--test/routines/level2/xsyr2.hpp2
-rw-r--r--test/routines/level2/xtbmv.hpp2
-rw-r--r--test/routines/level2/xtpmv.hpp2
-rw-r--r--test/routines/level2/xtrmv.hpp2
-rw-r--r--test/routines/level2/xtrsv.hpp2
-rw-r--r--test/routines/level3/xgemm.hpp39
-rw-r--r--test/routines/level3/xhemm.hpp2
-rw-r--r--test/routines/level3/xher2k.hpp2
-rw-r--r--test/routines/level3/xherk.hpp2
-rw-r--r--test/routines/level3/xsymm.hpp2
-rw-r--r--test/routines/level3/xsyr2k.hpp2
-rw-r--r--test/routines/level3/xsyrk.hpp2
-rw-r--r--test/routines/level3/xtrmm.hpp2
-rw-r--r--test/routines/level3/xtrsm.hpp2
-rw-r--r--test/routines/levelx/xaxpybatched.hpp2
-rw-r--r--test/routines/levelx/xgemmbatched.hpp2
-rw-r--r--test/routines/levelx/xim2col.hpp2
-rw-r--r--test/routines/levelx/xinvert.hpp2
-rw-r--r--test/routines/levelx/xomatcopy.hpp2
50 files changed, 77 insertions, 60 deletions
diff --git a/test/correctness/testblas.hpp b/test/correctness/testblas.hpp
index 4e02fd28..54b2d6f8 100644
--- a/test/correctness/testblas.hpp
+++ b/test/correctness/testblas.hpp
@@ -350,7 +350,7 @@ size_t RunTests(int argc, char *argv[], const bool silent, const std::string &na
for (auto &dilation_h: dilation_hs) { r_args.dilation_h = dilation_h;
for (auto &dilation_w: dilation_ws) { r_args.dilation_w = dilation_w;
for (auto &batch_count: batch_counts) { r_args.batch_count = batch_count;
- C::SetSizes(r_args);
+ C::SetSizes(r_args, tester.queue_);
regular_test_vector.push_back(r_args);
}
}
diff --git a/test/performance/client.cpp b/test/performance/client.cpp
index 8b18b9a9..83088223 100644
--- a/test/performance/client.cpp
+++ b/test/performance/client.cpp
@@ -214,7 +214,7 @@ void Client<T,U>::PerformanceTest(Arguments<U> &args, const SetMetric set_sizes)
while(true) {
// Sets the buffer sizes (routine-specific)
- set_sizes(args);
+ set_sizes(args, queue);
// Populates input host matrices with random data
std::vector<T> x_source(args.x_size);
diff --git a/test/performance/client.hpp b/test/performance/client.hpp
index 0b6176c8..eb224976 100644
--- a/test/performance/client.hpp
+++ b/test/performance/client.hpp
@@ -48,7 +48,7 @@ class Client {
using Reference1 = std::function<StatusCode(const Arguments<U>&, Buffers<T>&, Queue&)>;
using Reference2 = std::function<StatusCode(const Arguments<U>&, BuffersHost<T>&, Queue&)>;
using Reference3 = std::function<StatusCode(const Arguments<U>&, BuffersCUDA<T>&, Queue&)>;
- using SetMetric = std::function<void(Arguments<U>&)>;
+ using SetMetric = std::function<void(Arguments<U>&, Queue&)>;
using GetMetric = std::function<size_t(const Arguments<U>&)>;
// The constructor
diff --git a/test/routines/level1/xamax.hpp b/test/routines/level1/xamax.hpp
index d74807c9..71c1a0ec 100644
--- a/test/routines/level1/xamax.hpp
+++ b/test/routines/level1/xamax.hpp
@@ -47,7 +47,7 @@ class TestXamax {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.x_size = GetSizeX(args);
args.scalar_size = GetSizeImax(args);
}
diff --git a/test/routines/level1/xasum.hpp b/test/routines/level1/xasum.hpp
index 573f1223..62ff895d 100644
--- a/test/routines/level1/xasum.hpp
+++ b/test/routines/level1/xasum.hpp
@@ -47,7 +47,7 @@ class TestXasum {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.x_size = GetSizeX(args);
args.scalar_size = GetSizeAsum(args);
}
diff --git a/test/routines/level1/xaxpy.hpp b/test/routines/level1/xaxpy.hpp
index 7491a9e8..16d21324 100644
--- a/test/routines/level1/xaxpy.hpp
+++ b/test/routines/level1/xaxpy.hpp
@@ -48,7 +48,7 @@ class TestXaxpy {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.x_size = GetSizeX(args);
args.y_size = GetSizeY(args);
}
diff --git a/test/routines/level1/xcopy.hpp b/test/routines/level1/xcopy.hpp
index 58abdbf4..ddef8529 100644
--- a/test/routines/level1/xcopy.hpp
+++ b/test/routines/level1/xcopy.hpp
@@ -47,7 +47,7 @@ class TestXcopy {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.x_size = GetSizeX(args);
args.y_size = GetSizeY(args);
}
diff --git a/test/routines/level1/xdot.hpp b/test/routines/level1/xdot.hpp
index 229d18c9..b668b2df 100644
--- a/test/routines/level1/xdot.hpp
+++ b/test/routines/level1/xdot.hpp
@@ -50,7 +50,7 @@ class TestXdot {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.x_size = GetSizeX(args);
args.y_size = GetSizeY(args);
args.scalar_size = GetSizeDot(args);
diff --git a/test/routines/level1/xdotc.hpp b/test/routines/level1/xdotc.hpp
index 9a1dc33a..8ef2a9b8 100644
--- a/test/routines/level1/xdotc.hpp
+++ b/test/routines/level1/xdotc.hpp
@@ -50,7 +50,7 @@ class TestXdotc {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.x_size = GetSizeX(args);
args.y_size = GetSizeY(args);
args.scalar_size = GetSizeDot(args);
diff --git a/test/routines/level1/xdotu.hpp b/test/routines/level1/xdotu.hpp
index 4b2c7647..cabdf274 100644
--- a/test/routines/level1/xdotu.hpp
+++ b/test/routines/level1/xdotu.hpp
@@ -50,7 +50,7 @@ class TestXdotu {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.x_size = GetSizeX(args);
args.y_size = GetSizeY(args);
args.scalar_size = GetSizeDot(args);
diff --git a/test/routines/level1/xnrm2.hpp b/test/routines/level1/xnrm2.hpp
index f3a789b5..22973e1b 100644
--- a/test/routines/level1/xnrm2.hpp
+++ b/test/routines/level1/xnrm2.hpp
@@ -47,7 +47,7 @@ class TestXnrm2 {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.x_size = GetSizeX(args);
args.scalar_size = GetSizeNrm2(args);
}
diff --git a/test/routines/level1/xscal.hpp b/test/routines/level1/xscal.hpp
index 95038032..34a3d7cf 100644
--- a/test/routines/level1/xscal.hpp
+++ b/test/routines/level1/xscal.hpp
@@ -45,7 +45,7 @@ class TestXscal {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.x_size = GetSizeX(args);
}
diff --git a/test/routines/level1/xswap.hpp b/test/routines/level1/xswap.hpp
index 58310698..61711872 100644
--- a/test/routines/level1/xswap.hpp
+++ b/test/routines/level1/xswap.hpp
@@ -47,7 +47,7 @@ class TestXswap {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.x_size = GetSizeX(args);
args.y_size = GetSizeY(args);
}
diff --git a/test/routines/level2/xgbmv.hpp b/test/routines/level2/xgbmv.hpp
index 7c198e5d..13fcb137 100644
--- a/test/routines/level2/xgbmv.hpp
+++ b/test/routines/level2/xgbmv.hpp
@@ -58,7 +58,7 @@ class TestXgbmv {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.a_size = GetSizeA(args);
args.x_size = GetSizeX(args);
args.y_size = GetSizeY(args);
diff --git a/test/routines/level2/xgemv.hpp b/test/routines/level2/xgemv.hpp
index 780e2976..56372ad8 100644
--- a/test/routines/level2/xgemv.hpp
+++ b/test/routines/level2/xgemv.hpp
@@ -58,7 +58,7 @@ class TestXgemv {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.a_size = GetSizeA(args);
args.x_size = GetSizeX(args);
args.y_size = GetSizeY(args);
diff --git a/test/routines/level2/xger.hpp b/test/routines/level2/xger.hpp
index 9c5e2e40..85e987cb 100644
--- a/test/routines/level2/xger.hpp
+++ b/test/routines/level2/xger.hpp
@@ -54,7 +54,7 @@ class TestXger {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.a_size = GetSizeA(args);
args.x_size = GetSizeX(args);
args.y_size = GetSizeY(args);
diff --git a/test/routines/level2/xgerc.hpp b/test/routines/level2/xgerc.hpp
index 5f58b65d..49200b22 100644
--- a/test/routines/level2/xgerc.hpp
+++ b/test/routines/level2/xgerc.hpp
@@ -54,7 +54,7 @@ class TestXgerc {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.a_size = GetSizeA(args);
args.x_size = GetSizeX(args);
args.y_size = GetSizeY(args);
diff --git a/test/routines/level2/xgeru.hpp b/test/routines/level2/xgeru.hpp
index fea3932c..67f9f510 100644
--- a/test/routines/level2/xgeru.hpp
+++ b/test/routines/level2/xgeru.hpp
@@ -54,7 +54,7 @@ class TestXgeru {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.a_size = GetSizeA(args);
args.x_size = GetSizeX(args);
args.y_size = GetSizeY(args);
diff --git a/test/routines/level2/xhbmv.hpp b/test/routines/level2/xhbmv.hpp
index 0ccd69b7..4ee9c066 100644
--- a/test/routines/level2/xhbmv.hpp
+++ b/test/routines/level2/xhbmv.hpp
@@ -52,7 +52,7 @@ class TestXhbmv {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.a_size = GetSizeA(args);
args.x_size = GetSizeX(args);
args.y_size = GetSizeY(args);
diff --git a/test/routines/level2/xhemv.hpp b/test/routines/level2/xhemv.hpp
index 053bc2dc..b1fb0bee 100644
--- a/test/routines/level2/xhemv.hpp
+++ b/test/routines/level2/xhemv.hpp
@@ -52,7 +52,7 @@ class TestXhemv {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.a_size = GetSizeA(args);
args.x_size = GetSizeX(args);
args.y_size = GetSizeY(args);
diff --git a/test/routines/level2/xher.hpp b/test/routines/level2/xher.hpp
index 745df43f..ec183f7a 100644
--- a/test/routines/level2/xher.hpp
+++ b/test/routines/level2/xher.hpp
@@ -49,7 +49,7 @@ class TestXher {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<U> &args) {
+ static void SetSizes(Arguments<U> &args, Queue&) {
args.a_size = GetSizeA(args);
args.x_size = GetSizeX(args);
}
diff --git a/test/routines/level2/xher2.hpp b/test/routines/level2/xher2.hpp
index 794e9a1e..5f442ca4 100644
--- a/test/routines/level2/xher2.hpp
+++ b/test/routines/level2/xher2.hpp
@@ -52,7 +52,7 @@ class TestXher2 {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.a_size = GetSizeA(args);
args.x_size = GetSizeX(args);
args.y_size = GetSizeY(args);
diff --git a/test/routines/level2/xhpmv.hpp b/test/routines/level2/xhpmv.hpp
index 157272d3..00f32244 100644
--- a/test/routines/level2/xhpmv.hpp
+++ b/test/routines/level2/xhpmv.hpp
@@ -52,7 +52,7 @@ class TestXhpmv {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.ap_size = GetSizeAP(args);
args.x_size = GetSizeX(args);
args.y_size = GetSizeY(args);
diff --git a/test/routines/level2/xhpr.hpp b/test/routines/level2/xhpr.hpp
index a3bc60d1..1e9bbe29 100644
--- a/test/routines/level2/xhpr.hpp
+++ b/test/routines/level2/xhpr.hpp
@@ -49,7 +49,7 @@ class TestXhpr {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<U> &args) {
+ static void SetSizes(Arguments<U> &args, Queue&) {
args.ap_size = GetSizeAP(args);
args.x_size = GetSizeX(args);
}
diff --git a/test/routines/level2/xhpr2.hpp b/test/routines/level2/xhpr2.hpp
index 1aa6cc54..433a5a93 100644
--- a/test/routines/level2/xhpr2.hpp
+++ b/test/routines/level2/xhpr2.hpp
@@ -52,7 +52,7 @@ class TestXhpr2 {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.ap_size = GetSizeAP(args);
args.x_size = GetSizeX(args);
args.y_size = GetSizeY(args);
diff --git a/test/routines/level2/xsbmv.hpp b/test/routines/level2/xsbmv.hpp
index 51d6441e..12f1ca60 100644
--- a/test/routines/level2/xsbmv.hpp
+++ b/test/routines/level2/xsbmv.hpp
@@ -52,7 +52,7 @@ class TestXsbmv {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.a_size = GetSizeA(args);
args.x_size = GetSizeX(args);
args.y_size = GetSizeY(args);
diff --git a/test/routines/level2/xspmv.hpp b/test/routines/level2/xspmv.hpp
index f3089836..a8db7a7b 100644
--- a/test/routines/level2/xspmv.hpp
+++ b/test/routines/level2/xspmv.hpp
@@ -52,7 +52,7 @@ class TestXspmv {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.ap_size = GetSizeAP(args);
args.x_size = GetSizeX(args);
args.y_size = GetSizeY(args);
diff --git a/test/routines/level2/xspr.hpp b/test/routines/level2/xspr.hpp
index d76de610..af17b8cd 100644
--- a/test/routines/level2/xspr.hpp
+++ b/test/routines/level2/xspr.hpp
@@ -49,7 +49,7 @@ class TestXspr {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.ap_size = GetSizeAP(args);
args.x_size = GetSizeX(args);
}
diff --git a/test/routines/level2/xspr2.hpp b/test/routines/level2/xspr2.hpp
index 5ce82a52..b615aca7 100644
--- a/test/routines/level2/xspr2.hpp
+++ b/test/routines/level2/xspr2.hpp
@@ -52,7 +52,7 @@ class TestXspr2 {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.ap_size = GetSizeAP(args);
args.x_size = GetSizeX(args);
args.y_size = GetSizeY(args);
diff --git a/test/routines/level2/xsymv.hpp b/test/routines/level2/xsymv.hpp
index 2a70756d..9c418f88 100644
--- a/test/routines/level2/xsymv.hpp
+++ b/test/routines/level2/xsymv.hpp
@@ -52,7 +52,7 @@ class TestXsymv {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.a_size = GetSizeA(args);
args.x_size = GetSizeX(args);
args.y_size = GetSizeY(args);
diff --git a/test/routines/level2/xsyr.hpp b/test/routines/level2/xsyr.hpp
index 02aad990..73818727 100644
--- a/test/routines/level2/xsyr.hpp
+++ b/test/routines/level2/xsyr.hpp
@@ -49,7 +49,7 @@ class TestXsyr {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.a_size = GetSizeA(args);
args.x_size = GetSizeX(args);
}
diff --git a/test/routines/level2/xsyr2.hpp b/test/routines/level2/xsyr2.hpp
index 492a9d2d..8cdfb305 100644
--- a/test/routines/level2/xsyr2.hpp
+++ b/test/routines/level2/xsyr2.hpp
@@ -52,7 +52,7 @@ class TestXsyr2 {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.a_size = GetSizeA(args);
args.x_size = GetSizeX(args);
args.y_size = GetSizeY(args);
diff --git a/test/routines/level2/xtbmv.hpp b/test/routines/level2/xtbmv.hpp
index 587676ca..8e1e7610 100644
--- a/test/routines/level2/xtbmv.hpp
+++ b/test/routines/level2/xtbmv.hpp
@@ -48,7 +48,7 @@ class TestXtbmv {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.a_size = GetSizeA(args);
args.x_size = GetSizeX(args);
}
diff --git a/test/routines/level2/xtpmv.hpp b/test/routines/level2/xtpmv.hpp
index 02f334a2..b28fbf65 100644
--- a/test/routines/level2/xtpmv.hpp
+++ b/test/routines/level2/xtpmv.hpp
@@ -48,7 +48,7 @@ class TestXtpmv {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.ap_size = GetSizeAP(args);
args.x_size = GetSizeX(args);
}
diff --git a/test/routines/level2/xtrmv.hpp b/test/routines/level2/xtrmv.hpp
index 4f2dd582..4f4e3a55 100644
--- a/test/routines/level2/xtrmv.hpp
+++ b/test/routines/level2/xtrmv.hpp
@@ -48,7 +48,7 @@ class TestXtrmv {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.a_size = GetSizeA(args);
args.x_size = GetSizeX(args);
}
diff --git a/test/routines/level2/xtrsv.hpp b/test/routines/level2/xtrsv.hpp
index 81508236..52adad38 100644
--- a/test/routines/level2/xtrsv.hpp
+++ b/test/routines/level2/xtrsv.hpp
@@ -48,7 +48,7 @@ class TestXtrsv {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.a_size = GetSizeA(args);
args.x_size = GetSizeX(args);
}
diff --git a/test/routines/level3/xgemm.hpp b/test/routines/level3/xgemm.hpp
index fe8cf7b9..4cfa9c83 100644
--- a/test/routines/level3/xgemm.hpp
+++ b/test/routines/level3/xgemm.hpp
@@ -37,7 +37,8 @@ class TestXgemm {
kArgAOffset, kArgBOffset, kArgCOffset,
kArgAlpha, kArgBeta};
}
- static std::vector<std::string> BuffersIn() { return {kBufMatA, kBufMatB, kBufMatC}; }
+ static std::vector<std::string> BuffersIn() { return {kBufMatA, kBufMatB, kBufMatC,
+ kBufMatAP}; } // used as temp buffer
static std::vector<std::string> BuffersOut() { return {kBufMatC}; }
// Describes how to obtain the sizes of the buffers
@@ -60,10 +61,33 @@ class TestXgemm {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue &queue) {
args.a_size = GetSizeA(args);
args.b_size = GetSizeB(args);
args.c_size = GetSizeC(args);
+
+ // Optionally (V != 0) enforces indirect (V == 1) or direct (V == 2) kernels
+ if (V != 0) {
+ const auto device = queue.GetDevice();
+ const auto switch_threshold = (V == 1) ? size_t{0} : size_t{4096}; // large enough for tests
+ const auto override_status = OverrideParameters(device(), "GemmRoutine", PrecisionValue<T>(),
+ {{"XGEMM_MIN_INDIRECT_SIZE", switch_threshold}});
+ if (override_status != StatusCode::kSuccess) { }
+ }
+
+ // Sets the size of the temporary buffer (optional argument to GEMM)
+ auto temp_buffer_size = size_t{0};
+ #ifdef OPENCL_API
+ auto queue_plain = queue();
+ GemmTempBufferSize<T>(args.layout, args.a_transpose, args.b_transpose, args.m, args.n, args.k,
+ args.a_offset, args.a_ld, args.b_offset, args.b_ld, args.c_offset, args.c_ld,
+ &queue_plain, temp_buffer_size);
+ #elif CUDA_API
+ GemmTempBufferSize<T>(args.layout, args.a_transpose, args.b_transpose, args.m, args.n, args.k,
+ args.a_offset, args.a_ld, args.b_offset, args.b_ld, args.c_offset, args.c_ld,
+ queue.GetDevice()(), temp_buffer_size);
+ #endif
+ args.ap_size = (temp_buffer_size + sizeof(T)) / sizeof(T); // + sizeof(T) to prevent zero
}
// Describes what the default values of the leading dimensions of the matrices are
@@ -83,13 +107,6 @@ class TestXgemm {
// Describes how to run the CLBlast routine
static StatusCode RunRoutine(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
- if (V != 0) {
- const auto device = queue.GetDevice();
- const auto switch_threshold = (V == 1) ? size_t{0} : size_t{1024 * 1024 * 1024}; // large enough for tests
- const auto override_status = OverrideParameters(device(), "GemmRoutine", PrecisionValue<T>(),
- {{"XGEMM_MIN_INDIRECT_SIZE", switch_threshold}});
- if (override_status != StatusCode::kSuccess) { return override_status; }
- }
#ifdef OPENCL_API
auto queue_plain = queue();
auto event = cl_event{};
@@ -98,7 +115,7 @@ class TestXgemm {
buffers.a_mat(), args.a_offset, args.a_ld,
buffers.b_mat(), args.b_offset, args.b_ld, args.beta,
buffers.c_mat(), args.c_offset, args.c_ld,
- &queue_plain, &event);
+ &queue_plain, &event, buffers.ap_mat()); // temp buffer
if (status == StatusCode::kSuccess) { clWaitForEvents(1, &event); clReleaseEvent(event); }
#elif CUDA_API
auto status = Gemm(args.layout, args.a_transpose, args.b_transpose,
@@ -106,7 +123,7 @@ class TestXgemm {
buffers.a_mat(), args.a_offset, args.a_ld,
buffers.b_mat(), args.b_offset, args.b_ld, args.beta,
buffers.c_mat(), args.c_offset, args.c_ld,
- queue.GetContext()(), queue.GetDevice()());
+ queue.GetContext()(), queue.GetDevice()(), buffers.ap_mat()); // temp buffer
cuStreamSynchronize(queue());
#endif
return status;
diff --git a/test/routines/level3/xhemm.hpp b/test/routines/level3/xhemm.hpp
index 3b70d3f1..13e685b9 100644
--- a/test/routines/level3/xhemm.hpp
+++ b/test/routines/level3/xhemm.hpp
@@ -60,7 +60,7 @@ class TestXhemm {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.a_size = GetSizeA(args);
args.b_size = GetSizeB(args);
args.c_size = GetSizeC(args);
diff --git a/test/routines/level3/xher2k.hpp b/test/routines/level3/xher2k.hpp
index 6c4e12f1..a8ca4d46 100644
--- a/test/routines/level3/xher2k.hpp
+++ b/test/routines/level3/xher2k.hpp
@@ -58,7 +58,7 @@ class TestXher2k {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<U> &args) {
+ static void SetSizes(Arguments<U> &args, Queue&) {
args.a_size = GetSizeA(args);
args.b_size = GetSizeB(args);
args.c_size = GetSizeC(args);
diff --git a/test/routines/level3/xherk.hpp b/test/routines/level3/xherk.hpp
index c1bb7a0b..3fe14cb2 100644
--- a/test/routines/level3/xherk.hpp
+++ b/test/routines/level3/xherk.hpp
@@ -52,7 +52,7 @@ class TestXherk {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<U> &args) {
+ static void SetSizes(Arguments<U> &args, Queue&) {
args.a_size = GetSizeA(args);
args.c_size = GetSizeC(args);
}
diff --git a/test/routines/level3/xsymm.hpp b/test/routines/level3/xsymm.hpp
index 90cc1888..837e45d8 100644
--- a/test/routines/level3/xsymm.hpp
+++ b/test/routines/level3/xsymm.hpp
@@ -60,7 +60,7 @@ class TestXsymm {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.a_size = GetSizeA(args);
args.b_size = GetSizeB(args);
args.c_size = GetSizeC(args);
diff --git a/test/routines/level3/xsyr2k.hpp b/test/routines/level3/xsyr2k.hpp
index 6b29aff7..bf9f3fbf 100644
--- a/test/routines/level3/xsyr2k.hpp
+++ b/test/routines/level3/xsyr2k.hpp
@@ -58,7 +58,7 @@ class TestXsyr2k {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.a_size = GetSizeA(args);
args.b_size = GetSizeB(args);
args.c_size = GetSizeC(args);
diff --git a/test/routines/level3/xsyrk.hpp b/test/routines/level3/xsyrk.hpp
index b7782176..23dcf12f 100644
--- a/test/routines/level3/xsyrk.hpp
+++ b/test/routines/level3/xsyrk.hpp
@@ -52,7 +52,7 @@ class TestXsyrk {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.a_size = GetSizeA(args);
args.c_size = GetSizeC(args);
}
diff --git a/test/routines/level3/xtrmm.hpp b/test/routines/level3/xtrmm.hpp
index 62d0f573..51377a16 100644
--- a/test/routines/level3/xtrmm.hpp
+++ b/test/routines/level3/xtrmm.hpp
@@ -52,7 +52,7 @@ class TestXtrmm {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.a_size = GetSizeA(args);
args.b_size = GetSizeB(args);
}
diff --git a/test/routines/level3/xtrsm.hpp b/test/routines/level3/xtrsm.hpp
index 9ce1f09c..66c8f415 100644
--- a/test/routines/level3/xtrsm.hpp
+++ b/test/routines/level3/xtrsm.hpp
@@ -53,7 +53,7 @@ class TestXtrsm {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.a_size = GetSizeA(args);
args.b_size = GetSizeB(args);
}
diff --git a/test/routines/levelx/xaxpybatched.hpp b/test/routines/levelx/xaxpybatched.hpp
index e9715f4e..9a09b47f 100644
--- a/test/routines/levelx/xaxpybatched.hpp
+++ b/test/routines/levelx/xaxpybatched.hpp
@@ -51,7 +51,7 @@ class TestXaxpyBatched {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.x_size = GetSizeX(args);
args.y_size = GetSizeY(args);
diff --git a/test/routines/levelx/xgemmbatched.hpp b/test/routines/levelx/xgemmbatched.hpp
index 2a8bd9d4..e237a018 100644
--- a/test/routines/levelx/xgemmbatched.hpp
+++ b/test/routines/levelx/xgemmbatched.hpp
@@ -71,7 +71,7 @@ class TestXgemmBatched {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.a_size = GetSizeA(args);
args.b_size = GetSizeB(args);
args.c_size = GetSizeC(args);
diff --git a/test/routines/levelx/xim2col.hpp b/test/routines/levelx/xim2col.hpp
index e90537fa..092e251d 100644
--- a/test/routines/levelx/xim2col.hpp
+++ b/test/routines/levelx/xim2col.hpp
@@ -62,7 +62,7 @@ public:
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.a_size = GetSizeA(args);
args.b_size = GetSizeB(args);
}
diff --git a/test/routines/levelx/xinvert.hpp b/test/routines/levelx/xinvert.hpp
index b8503029..126856ac 100644
--- a/test/routines/levelx/xinvert.hpp
+++ b/test/routines/levelx/xinvert.hpp
@@ -149,7 +149,7 @@ class TestXinvert {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.a_size = GetSizeA(args);
args.b_size = GetSizeB(args);
}
diff --git a/test/routines/levelx/xomatcopy.hpp b/test/routines/levelx/xomatcopy.hpp
index 477d6da6..ea35dbe2 100644
--- a/test/routines/levelx/xomatcopy.hpp
+++ b/test/routines/levelx/xomatcopy.hpp
@@ -104,7 +104,7 @@ class TestXomatcopy {
}
// Describes how to set the sizes of all the buffers
- static void SetSizes(Arguments<T> &args) {
+ static void SetSizes(Arguments<T> &args, Queue&) {
args.a_size = GetSizeA(args);
args.b_size = GetSizeB(args);
}