File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
dpctl/tensor/libtensor/include/utils Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -76,14 +76,21 @@ template <typename T> void validate_type_for_device(const sycl::device &d)
76
76
if (!d.has (sycl::aspect::fp64)) {
77
77
throw std::runtime_error (" Device " +
78
78
d.get_info <sycl::info::device::name>() +
79
- " does not support type 'double'" );
79
+ " does not support type 'float64'" );
80
+ }
81
+ }
82
+ else if constexpr (std::is_same_v<T, std::complex<double >>) {
83
+ if (!d.has (sycl::aspect::fp64)) {
84
+ throw std::runtime_error (" Device " +
85
+ d.get_info <sycl::info::device::name>() +
86
+ " does not support type 'complex128'" );
80
87
}
81
88
}
82
89
else if constexpr (std::is_same_v<T, sycl::half>) {
83
90
if (!d.has (sycl::aspect::fp16)) {
84
91
throw std::runtime_error (" Device " +
85
92
d.get_info <sycl::info::device::name>() +
86
- " does not support type 'half '" );
93
+ " does not support type 'float16 '" );
87
94
}
88
95
}
89
96
}
You can’t perform that action at this time.
0 commit comments