summaryrefslogtreecommitdiff
path: root/test/routines/level3/xsymm.hpp
diff options
context:
space:
mode:
authorCedric Nugteren <web@cedricnugteren.nl>2017-04-10 22:54:14 +0200
committerCedric Nugteren <web@cedricnugteren.nl>2017-04-10 22:54:14 +0200
commit6b625f8915ce0596d65187bd3a8eb47e91a0084e (patch)
treeed16d34e567e52667f74131ff09f0673619dd661 /test/routines/level3/xsymm.hpp
parent22b3ea9256bd197da3cd320560c14e5f3bd7fb86 (diff)
Added reference implementations for performance-testing against cuBLAS
Diffstat (limited to 'test/routines/level3/xsymm.hpp')
-rw-r--r--test/routines/level3/xsymm.hpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/routines/level3/xsymm.hpp b/test/routines/level3/xsymm.hpp
index 704a8f9e..4888091b 100644
--- a/test/routines/level3/xsymm.hpp
+++ b/test/routines/level3/xsymm.hpp
@@ -127,6 +127,20 @@ class TestXsymm {
}
#endif
+ // Describes how to run the cuBLAS routine (for correctness/performance comparison)
+ #ifdef CLBLAST_REF_CUBLAS
+ static StatusCode RunReference3(const Arguments<T> &args, BuffersCUDA<T> &buffers, Queue &) {
+ auto status = cublasXsymm(args.layout,
+ convertToCUBLAS(args.side),
+ convertToCUBLAS(args.triangle),
+ args.m, args.n, args.alpha,
+ 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);
+ if (status == CUBLAS_STATUS_SUCCESS) { return StatusCode::kSuccess; } else { return StatusCode::kUnknownError; }
+ }
+ #endif
+
// Describes how to download the results of the computation (more importantly: which buffer)
static std::vector<T> DownloadResult(const Arguments<T> &args, Buffers<T> &buffers, Queue &queue) {
std::vector<T> result(args.c_size, static_cast<T>(0));