Skip to content

Commit f64c81a

Browse files
authored
[SYCL][E2E][Subdevice] Reduce run time of test subdevice_pi.cpp (intel#16341)
On intel cpu device, the number of subdevices was the same as cpu count. The number could be large on a server. In `shared` subtest, all subdevices belong to the same context and device program is built for every subdevice. Device code compilation may take long time. This PR reduces test time from 10s to 0.4s on 160-core ICX. When device sanitizer is enabled, test time is reduced from ~10min to 14s.
1 parent dec8c40 commit f64c81a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sycl/test-e2e/Basic/subdevice_pi.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@ static std::vector<device> partition_affinity(device dev) {
3939
}
4040

4141
static std::vector<device> partition_equally(device dev) {
42+
auto maxUnits = dev.get_info<info::device::max_compute_units>();
4243
std::vector<device> subdevices =
43-
dev.create_sub_devices<info::partition_property::partition_equally>(1);
44+
dev.create_sub_devices<info::partition_property::partition_equally>(
45+
maxUnits / 2);
4446

4547
return subdevices;
4648
}

0 commit comments

Comments
 (0)