@@ -48,8 +48,10 @@ int main() {
48
48
assert (sycl::get_native<sycl::backend::opencl>(
49
49
SubDevicesEq[0 ].get_info <info::device::parent_device>()) ==
50
50
sycl::get_native<sycl::backend::opencl>(dev));
51
- } catch (feature_not_supported) {
52
- // okay skip it
51
+ } catch (const sycl::exception &e) {
52
+ if (e.code () != sycl::errc::feature_not_supported)
53
+ std::rethrow_exception (std::current_exception ());
54
+ // otherwise okay skip it
53
55
}
54
56
55
57
try {
@@ -65,8 +67,10 @@ int main() {
65
67
assert (SubDevicesByCount[0 ]
66
68
.get_info <info::device::partition_type_property>() ==
67
69
info::partition_property::partition_by_counts);
68
- } catch (feature_not_supported) {
69
- // okay skip it
70
+ } catch (const sycl::exception &e) {
71
+ if (e.code () != sycl::errc::feature_not_supported)
72
+ std::rethrow_exception (std::current_exception ());
73
+ // otherwise okay skip it
70
74
}
71
75
72
76
try {
@@ -88,8 +92,10 @@ int main() {
88
92
<< " sub-subdevices from subdevice 0 using partition by numa "
89
93
" affinity domain scheme."
90
94
<< std::endl;
91
- } catch (feature_not_supported) {
92
- // okay skip it
95
+ } catch (const sycl::exception &e) {
96
+ if (e.code () != sycl::errc::feature_not_supported)
97
+ std::rethrow_exception (std::current_exception ());
98
+ // otherwise okay skip it
93
99
}
94
100
95
101
try {
@@ -99,8 +105,10 @@ int main() {
99
105
std::cout << " Created " << SubDevicesDomainL4.size ()
100
106
<< " subdevices using partition by L4 cache domain scheme."
101
107
<< std::endl;
102
- } catch (feature_not_supported) {
103
- // okay skip it
108
+ } catch (const sycl::exception &e) {
109
+ if (e.code () != sycl::errc::feature_not_supported)
110
+ std::rethrow_exception (std::current_exception ());
111
+ // otherwise okay skip it
104
112
}
105
113
106
114
try {
@@ -110,8 +118,10 @@ int main() {
110
118
std::cout << " Created " << SubDevicesDomainL3.size ()
111
119
<< " subdevices using partition by L3 cache domain scheme."
112
120
<< std::endl;
113
- } catch (feature_not_supported) {
114
- // okay skip it
121
+ } catch (const sycl::exception &e) {
122
+ if (e.code () != sycl::errc::feature_not_supported)
123
+ std::rethrow_exception (std::current_exception ());
124
+ // otherwise okay skip it
115
125
}
116
126
117
127
try {
@@ -121,8 +131,10 @@ int main() {
121
131
std::cout << " Created " << SubDevicesDomainL2.size ()
122
132
<< " subdevices using partition by L2 cache domain scheme."
123
133
<< std::endl;
124
- } catch (feature_not_supported) {
125
- // okay skip it
134
+ } catch (const sycl::exception &e) {
135
+ if (e.code () != sycl::errc::feature_not_supported)
136
+ std::rethrow_exception (std::current_exception ());
137
+ // otherwise okay skip it
126
138
}
127
139
128
140
try {
@@ -132,8 +144,10 @@ int main() {
132
144
std::cout << " Created " << SubDevicesDomainL1.size ()
133
145
<< " subdevices using partition by L1 cache domain scheme."
134
146
<< std::endl;
135
- } catch (feature_not_supported) {
136
- // okay skip it
147
+ } catch (const sycl::exception &e) {
148
+ if (e.code () != sycl::errc::feature_not_supported)
149
+ std::rethrow_exception (std::current_exception ());
150
+ // otherwise okay skip it
137
151
}
138
152
139
153
try {
@@ -154,8 +168,10 @@ int main() {
154
168
<< " sub-subdevices from subdevice 0 using partition by next "
155
169
" partitionable domain scheme."
156
170
<< std::endl;
157
- } catch (feature_not_supported) {
158
- // okay skip it
171
+ } catch (const sycl::exception &e) {
172
+ if (e.code () != sycl::errc::feature_not_supported)
173
+ std::rethrow_exception (std::current_exception ());
174
+ // otherwise okay skip it
159
175
}
160
176
}
161
177
} catch (exception e) {
0 commit comments