@@ -674,10 +674,7 @@ struct get_device_info_impl<
674
674
if (Item.first == arch)
675
675
return Item.second ;
676
676
}
677
- throw sycl::exception (
678
- make_error_code (errc::runtime),
679
- " The current device architecture is not supported by "
680
- " sycl_ext_oneapi_device_architecture." );
677
+ return ext::oneapi::experimental::architecture::unknown;
681
678
};
682
679
uint32_t DeviceIp;
683
680
Dev->getPlugin ()->call <PiApiKind::piDeviceGetInfo>(
@@ -693,10 +690,7 @@ struct get_device_info_impl<
693
690
if (std::string_view (Item.first ) == arch)
694
691
return Item.second ;
695
692
}
696
- throw sycl::exception (
697
- make_error_code (errc::runtime),
698
- " The current device architecture is not supported by "
699
- " sycl_ext_oneapi_device_architecture." );
693
+ return ext::oneapi::experimental::architecture::unknown;
700
694
};
701
695
size_t ResultSize = 0 ;
702
696
Dev->getPlugin ()->call <PiApiKind::piDeviceGetInfo>(
@@ -727,21 +721,7 @@ struct get_device_info_impl<
727
721
return MapArchIDToArchName (DeviceIp);
728
722
} // else is not needed
729
723
// TODO: add support of other architectures by extending with else if
730
- // Generating a user-friendly error message
731
- std::string DeviceStr;
732
- if (Dev->is_gpu ())
733
- DeviceStr = " GPU" ;
734
- else if (Dev->is_cpu ())
735
- DeviceStr = " CPU" ;
736
- else if (Dev->is_accelerator ())
737
- DeviceStr = " accelerator" ;
738
- // else if not needed
739
- std::stringstream ErrorMessage;
740
- ErrorMessage
741
- << " sycl_ext_oneapi_device_architecture feature is not supported on "
742
- << DeviceStr << " device with sycl::backend::" << CurrentBackend
743
- << " backend." ;
744
- throw sycl::exception (make_error_code (errc::runtime), ErrorMessage.str ());
724
+ return ext::oneapi::experimental::architecture::unknown;
745
725
}
746
726
};
747
727
0 commit comments