@@ -115,7 +115,6 @@ class DevicePool {
115
115
static std::vector<ITEX_GPUDevice> devices;
116
116
117
117
std::call_once (init_device_flag, []() {
118
- std::vector<ITEX_GPUDevice> root_devices;
119
118
// Get root device list from platform list.
120
119
auto platform_list = sycl::platform::get_platforms ();
121
120
for (const auto & platform : platform_list) {
@@ -131,43 +130,12 @@ class DevicePool {
131
130
auto device_list = platform.get_devices ();
132
131
for (const auto & device : device_list) {
133
132
if (device.is_gpu ()) {
134
- root_devices .push_back (device);
133
+ devices .push_back (device);
135
134
}
136
135
}
137
136
}
138
137
}
139
138
140
- if (TileAsDevice ()) {
141
- // If ITEX_TILE_AS_DEVICE is true.
142
- // Create sub devices from root devices:
143
- // If succ, add sub devices into devices list
144
- // If fail, add root devices into devices list
145
- constexpr auto partition_by_affinity =
146
- sycl::info::partition_property::partition_by_affinity_domain;
147
- constexpr auto next_partitionable =
148
- sycl::info::partition_affinity_domain::next_partitionable;
149
- for (const auto & root_device : root_devices) {
150
- std::vector<ITEX_GPUDevice> sub_devices;
151
- auto max_sub_devices =
152
- root_device
153
- .get_info <sycl::info::device::partition_max_sub_devices>();
154
- if (max_sub_devices == 0 ) {
155
- ITEX_LOG (INFO) << " number of sub-devices is zero, expose root "
156
- " device." ;
157
- devices.push_back (root_device);
158
- } else {
159
- sub_devices = root_device.create_sub_devices <partition_by_affinity>(
160
- next_partitionable);
161
- devices.insert (devices.end (), sub_devices.begin (),
162
- sub_devices.end ());
163
- }
164
- }
165
- } else {
166
- // If ITEX_TILE_AS_DEVICE is false.
167
- // Only set root device as device list.
168
- devices = std::move (root_devices);
169
- }
170
-
171
139
size_t num_device = devices.size ();
172
140
173
141
if (num_device <= 0 ) {
0 commit comments