diff options
author | Cedric Nugteren <web@cedricnugteren.nl> | 2018-05-27 18:38:47 +0200 |
---|---|---|
committer | Cedric Nugteren <web@cedricnugteren.nl> | 2018-05-27 18:38:47 +0200 |
commit | 01d254c0b09549bb7921d1c777d1d53042c5d466 (patch) | |
tree | 9737466294b6e91c5b8e1dd0d12d38f0b8b252c1 /src/routines | |
parent | 53198121acae87ed4e212f63579f3f5259a80bf3 (diff) |
Added a check to return 'NotImplemented' error code in case of systems with < 16 LWGS for TSRV and TRSM
Diffstat (limited to 'src/routines')
-rw-r--r-- | src/routines/level2/xtrsv.cpp | 5 | ||||
-rw-r--r-- | src/routines/level3/xtrsm.cpp | 5 | ||||
-rw-r--r-- | src/routines/levelx/xinvert.cpp | 5 |
3 files changed, 15 insertions, 0 deletions
diff --git a/src/routines/level2/xtrsv.cpp b/src/routines/level2/xtrsv.cpp index c474db4c..5d2ddf54 100644 --- a/src/routines/level2/xtrsv.cpp +++ b/src/routines/level2/xtrsv.cpp @@ -87,6 +87,11 @@ void Xtrsv<T>::DoTrsv(const Layout layout, const Triangle triangle, // Makes sure all dimensions are larger than zero if (n == 0) { throw BLASError(StatusCode::kInvalidDimension); } + // Some parts of this kernel are not tunable and thus require some minimal OpenCL properties + if (device_.MaxWorkGroupSize() < 16) { // minimum of total local work size of 16 + throw RuntimeErrorCode(StatusCode::kNotImplemented); + } + // Tests the matrix and vector TestMatrixA(n, n, a_buffer, a_offset, a_ld); TestVectorX(n, b_buffer, b_offset, b_inc); diff --git a/src/routines/level3/xtrsm.cpp b/src/routines/level3/xtrsm.cpp index 255e1cca..905660ff 100644 --- a/src/routines/level3/xtrsm.cpp +++ b/src/routines/level3/xtrsm.cpp @@ -78,6 +78,11 @@ void Xtrsm<T>::TrsmColMajor(const Side side, const Triangle triangle, // Makes sure all dimensions are larger than zero if ((m == 0) || (n == 0)) { throw BLASError(StatusCode::kInvalidDimension); } + // Some parts of this kernel are not tunable and thus require some minimal OpenCL properties + if (device_.MaxWorkGroupSize() < 16) { // minimum of total local work size of 16 + throw RuntimeErrorCode(StatusCode::kNotImplemented); + } + // Computes the k dimension. This is based on whether or not matrix is A (on the left) // or B (on the right) in the Xgemm routine. const auto k = (side == Side::kLeft) ? m : n; diff --git a/src/routines/levelx/xinvert.cpp b/src/routines/levelx/xinvert.cpp index d851e0b9..65a28d73 100644 --- a/src/routines/levelx/xinvert.cpp +++ b/src/routines/levelx/xinvert.cpp @@ -49,6 +49,11 @@ void Xinvert<T>::InvertMatrixDiagonalBlocks(const Layout layout, const Triangle throw BLASError(StatusCode::kInvalidDimension); } + // Some parts of this kernel are not tunable and thus require some minimal OpenCL properties + if (device_.MaxWorkGroupSize() < 16) { // minimum of total local work size of 16 + throw RuntimeErrorCode(StatusCode::kNotImplemented); + } + // Helper variables const auto internal_block_size = static_cast<size_t>(db_["INTERNAL_BLOCK_SIZE"]); assert(internal_block_size == 16); |