Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
Address PR comments
Browse files Browse the repository at this point in the history
Add exception to properly handle not supported combination of hardware
and operator.
Add `cl` namespace to keep compatibility with adaptiveCpp in the current
implementation.
  • Loading branch information
s-Nick committed May 15, 2024
1 parent 6a91a46 commit a626b95
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/interface/blas2/backend/default.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,13 @@ typename sb_handle_t::event_t _trsv(
const auto device = sb_handle.get_queue().get_device();
if (device.is_gpu()) {
const std::string vendor =
device.template get_info<sycl::info::device::vendor>();
device.template get_info<cl::sycl::info::device::vendor>();
if (vendor.find("Intel") == vendor.npos) {
return blas::internal::_trsv_impl<32, 4, uplo, trn, diag>(
sb_handle, _N, _mA, _lda, _vx, _incx, _dependencies);
} else {
std::cout << "Trsv operator currently not supported on Intel GPUs\n";
return {};
throw std::runtime_error(
"Trsv operator currently not supported on Intel GPUs");
}
} else {
return blas::internal::_trsv_impl<4, 2, uplo, trn, diag>(
Expand All @@ -167,14 +167,14 @@ typename sb_handle_t::event_t _tbsv(
const typename sb_handle_t::event_t& _dependencies) {
const auto device = sb_handle.get_queue().get_device();
const std::string vendor =
device.template get_info<sycl::info::device::vendor>();
device.template get_info<cl::sycl::info::device::vendor>();
if (device.is_gpu()) {
if (vendor.find("Intel") == vendor.npos) {
return blas::internal::_tbsv_impl<32, 4, uplo, trn, diag>(
sb_handle, _N, _K, _mA, _lda, _vx, _incx, _dependencies);
} else {
std::cout << "Tbsv operator currently not supported on Intel GPUs\n";
return {};
throw std::runtime_error(
"Tbsv operator currently not supported on Intel GPUs");
}
} else {
return blas::internal::_tbsv_impl<4, 2, uplo, trn, diag>(
Expand All @@ -194,14 +194,14 @@ typename sb_handle_t::event_t _tpsv(
increment_t _incx, const typename sb_handle_t::event_t& _dependencies) {
const auto device = sb_handle.get_queue().get_device();
const std::string vendor =
device.template get_info<sycl::info::device::vendor>();
device.template get_info<cl::sycl::info::device::vendor>();
if (device.is_gpu()) {
if (vendor.find("Intel") == vendor.npos) {
return blas::internal::_tpsv_impl<32, 4, uplo, trn, diag>(
sb_handle, _N, _mA, _vx, _incx, _dependencies);
} else {
std::cout << "Tpsv operator currently not supported on Intel GPUs\n";
return {};
throw std::runtime_error(
"Tpsv operator currently not supported on Intel GPUs");
}
} else {
return blas::internal::_tpsv_impl<4, 2, uplo, trn, diag>(
Expand Down

0 comments on commit a626b95

Please sign in to comment.