aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h
diff options
context:
space:
mode:
authorGravatar Luke Iwanski <luke@codeplay.com>2017-03-15 19:26:08 +0000
committerGravatar Luke Iwanski <luke@codeplay.com>2017-03-15 19:26:08 +0000
commitc06861d15e16a8f6241d4e409ef0136f3277350f (patch)
tree606d5b1fc18526ddbcb06f88b66cf1abcffcc0e0 /unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h
parentf499fe9496e7c5e6f70d4bdcfb6ed9088795431a (diff)
Fixes bug in get_sycl_supported_devices() that was reporting unsupported Intel CPU on AMD platform - causing timeouts in that configuration
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h')
-rw-r--r--unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h b/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h
index ed21d7b56..e9c3dc0a0 100644
--- a/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h
+++ b/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h
@@ -76,13 +76,16 @@ EIGEN_STRONG_INLINE auto get_sycl_supported_devices()->decltype(cl::sycl::device
std::vector<cl::sycl::device>::iterator it =devices.begin();
while(it!=devices.end()) {
///FIXME: Currently there is a bug in amd cpu OpenCL
- auto s= (*it).template get_info<cl::sycl::info::device::name>();
- std::transform(s.begin(), s.end(), s.begin(), ::tolower);
- if((*it).is_cpu() && s.find("amd")!=std::string::npos && s.find("apu") == std::string::npos){ // remove amd cpu as it is not supported by computecpp allow APUs
- it=devices.erase(it);
+ auto name = (*it).template get_info<cl::sycl::info::device::name>();
+ std::transform(name.begin(), name.end(), name.begin(), ::tolower);
+ auto vendor = (*it).template get_info<cl::sycl::info::device::vendor>();
+ std::transform(vendor.begin(), vendor.end(), vendor.begin(), ::tolower);
+
+ if((*it).is_cpu() && vendor.find("amd")!=std::string::npos && vendor.find("apu") == std::string::npos){ // remove amd cpu as it is not supported by computecpp allow APUs
+ it = devices.erase(it);
//FIXME: currently there is a bug in intel gpu driver regarding memory allignment issue.
- }else if((*it).is_gpu() && s.find("intel")!=std::string::npos){
- it=devices.erase(it);
+ }else if((*it).is_gpu() && name.find("intel")!=std::string::npos){
+ it = devices.erase(it);
}
else{
++it;