diff options
Diffstat (limited to 'test/routines/level3/xtrsm.hpp')
-rw-r--r-- | test/routines/level3/xtrsm.hpp | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/test/routines/level3/xtrsm.hpp b/test/routines/level3/xtrsm.hpp index de5b307d..d63c9d79 100644 --- a/test/routines/level3/xtrsm.hpp +++ b/test/routines/level3/xtrsm.hpp @@ -16,18 +16,9 @@ #ifndef CLBLAST_TEST_ROUTINES_XTRSM_H_ #define CLBLAST_TEST_ROUTINES_XTRSM_H_ -#include <vector> -#include <string> - +#include "test/routines/common.hpp" #include "test/routines/level3/xtrsm_data.hpp" -#ifdef CLBLAST_REF_CLBLAS - #include "test/wrapper_clblas.hpp" -#endif -#ifdef CLBLAST_REF_CBLAS - #include "test/wrapper_cblas.hpp" -#endif - namespace clblast { // ================================================================================================= @@ -139,6 +130,21 @@ class TestXtrsm { } #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 = cublasXtrsm(reinterpret_cast<cublasHandle_t>(args.cublas_handle), args.layout, + convertToCUBLAS(args.side), + convertToCUBLAS(args.triangle), + convertToCUBLAS(args.a_transpose), + convertToCUBLAS(args.diagonal), + args.m, args.n, args.alpha, + buffers.a_mat, args.a_offset, args.a_ld, + buffers.b_mat, args.b_offset, args.b_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.b_size, static_cast<T>(0)); |