Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SYCL][Joint Matrix] Relax matrix_combinations error handling #12866

Merged
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions sycl/source/detail/device_info.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ struct get_device_info_impl<
std::vector<ext::oneapi::experimental::matrix::combination>,
ext::oneapi::experimental::info::device::matrix_combinations> {
static std::vector<ext::oneapi::experimental::matrix::combination>
get(const DeviceImplPtr &Dev) {
get(const DeviceImplPtr &Dev) try {
using namespace ext::oneapi::experimental::matrix;
using namespace ext::oneapi::experimental;
backend CurrentBackend = Dev->getBackend();
Expand Down Expand Up @@ -850,10 +850,7 @@ struct get_device_info_impl<
for (const auto &Item : NvidiaArchNumbs)
if (Item.second == arch)
return Item.first;
throw sycl::exception(
make_error_code(errc::runtime),
"The current device architecture is not supported by "
"sycl_ext_oneapi_matrix.");
return 0.f;
};
float ComputeCapability = GetArchNum(DeviceArch);
std::vector<combination> sm_70_combinations = {
Expand Down Expand Up @@ -922,6 +919,11 @@ struct get_device_info_impl<
return sm_70_combinations;
}
return {};
} catch (sycl::exception &e) {
if (e.code() != errc::runtime) {
std::rethrow_exception(std::make_exception_ptr(e));
}
return {};
}
};

Expand Down
Loading