9
9
1) if partition_equally is supported, then we check that the correct
10
10
invalid errc is returned if more than max_compute_units are requested
11
11
12
- 2) [info::device::partition_properties]: returns the partition properties
13
- supported by this SYCL device; a vector of info::partition_property. If this
14
- SYCL device cannot be partitioned into at least two sub devices then the
15
- returned vector **must be empty**.
16
-
17
- 3) [create_sub_devices()]: If the SYCL device
18
- does not support info::partition_property::partition_by_affinity_domain or the
12
+ 2) If the SYCL device does not support info::partition_property::partition_by_affinity_domain or the
19
13
SYCL device does not support the info::partition_affinity_domain provided, an
20
14
exception with the **feature_not_supported error code must be thrown**.
21
15
*/
@@ -60,7 +54,7 @@ int main() {
60
54
61
55
auto dev = cl::sycl::device (cl::sycl::default_selector ());
62
56
63
- // check exceed max_compute_units
57
+ // 1 - check exceed max_compute_units
64
58
cl::sycl::info::partition_property partitionEqually =
65
59
cl::sycl::info::partition_property::partition_equally;
66
60
if (supports_partition_property (dev, partitionEqually)) {
@@ -84,11 +78,11 @@ int main() {
84
78
}
85
79
}
86
80
81
+ // 2 - check affinity
87
82
cl::sycl::info::partition_property partitionProperty =
88
83
cl::sycl::info::partition_property::partition_by_affinity_domain;
89
84
cl::sycl::info::partition_affinity_domain affinityDomain =
90
85
cl::sycl::info::partition_affinity_domain::next_partitionable;
91
-
92
86
if (supports_partition_property (dev, partitionProperty)) {
93
87
if (supports_affinity_domain (dev, partitionProperty, affinityDomain)) {
94
88
auto subDevices = dev.create_sub_devices <
0 commit comments