Skip to content

Commit

Permalink
Rename function to match better its effect
Browse files Browse the repository at this point in the history
  • Loading branch information
s-Nick committed Jun 28, 2024
1 parent 936fe3b commit 1d7efb9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
9 changes: 7 additions & 2 deletions include/portblas_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,14 @@ inline bool is_malloc_shared(sb_handle_t &sb_handle, const containerT _rs) {
}
}

/*
@brief Check device and throw unsupported exception if Intel discrete GPU
@param sb_handle portBLAS handler
@param operator_name unsupported operator name
*/
template <typename sb_handle_t>
inline void check_intel_gpu_support(const sb_handle_t &sb_handle,
std::string &&operator_name) {
inline void throw_unsupported_intel_dGPU(const sb_handle_t &sb_handle,
std::string &&operator_name) {
const auto device = sb_handle.get_queue().get_device();
if (device.is_gpu()) {
const std::string vendor =
Expand Down
6 changes: 3 additions & 3 deletions src/interface/blas2_interface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,7 @@ typename sb_handle_t::event_t inline _trsv(
sb_handle_t& sb_handle, char _Uplo, char _trans, char _Diag, index_t _N,
container_t0 _mA, index_t _lda, container_t1 _vx, increment_t _incx,
const typename sb_handle_t::event_t& _dependencies) {
helper::check_intel_gpu_support(sb_handle, "trsv");
helper::throw_unsupported_intel_dGPU(sb_handle, "trsv");
INST_UPLO_TRANS_DIAG(blas::trsv::backend::_trsv, sb_handle, _N, _mA, _lda,
_vx, _incx, _dependencies)
}
Expand Down Expand Up @@ -1419,7 +1419,7 @@ typename sb_handle_t::event_t _tbsv(
sb_handle_t& sb_handle, char _Uplo, char _trans, char _Diag, index_t _N,
index_t _K, container_t0 _mA, index_t _lda, container_t1 _vx,
increment_t _incx, const typename sb_handle_t::event_t& _dependencies) {
helper::check_intel_gpu_support(sb_handle, "tbsv");
helper::throw_unsupported_intel_dGPU(sb_handle, "tbsv");
INST_UPLO_TRANS_DIAG(blas::tbsv::backend::_tbsv, sb_handle, _N, _K, _mA, _lda,
_vx, _incx, _dependencies)
}
Expand All @@ -1440,7 +1440,7 @@ typename sb_handle_t::event_t _tpsv(
sb_handle_t& sb_handle, char _Uplo, char _trans, char _Diag, index_t _N,
container_t0 _mA, container_t1 _vx, increment_t _incx,
const typename sb_handle_t::event_t& _dependencies) {
helper::check_intel_gpu_support(sb_handle, "tpsv");
helper::throw_unsupported_intel_dGPU(sb_handle, "tpsv");
INST_UPLO_TRANS_DIAG(blas::tpsv::backend::_tpsv, sb_handle, _N, _mA, _vx,
_incx, _dependencies)
}
Expand Down

0 comments on commit 1d7efb9

Please sign in to comment.