Added a check to return 'NotImplemented' error code in case of systems with < 16 LWGS for TSRV and TRSM

pull/287/head
Cedric Nugteren 2018-05-27 18:38:47 +02:00
parent 53198121ac
commit 01d254c0b0
3 changed files with 15 additions and 0 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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);