Skip to content

Commit bc3f79a

Browse files
[SYCL][Doc][E2E] Align intel device query spec with backend queries (#21378)
Backend queries return maximum values, slices/subslices/EUs/threads are not guaranteed to be distributed evenly.
1 parent 88642a3 commit bc3f79a

File tree

3 files changed

+19
-27
lines changed

3 files changed

+19
-27
lines changed

sycl/doc/extensions/supported/sycl_ext_intel_device_info.asciidoc

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,8 @@ if (dev.has(aspect::ext_intel_gpu_eu_count)) {
242242
=== Intel GPU Number of Slices
243243

244244
This extension adds the following device aspect and information descriptor,
245-
which allow an application to query the number of slices on an Intel GPU.
245+
which allow an application to query the maximum number of slices on an Intel
246+
GPU.
246247

247248
==== New device aspect
248249

@@ -274,8 +275,8 @@ struct gpu_slices {
274275

275276
_Remarks:_ Template parameter to `device::get_info`.
276277

277-
_Returns:_ The number of slices. If the device is a subdevice, then the number
278-
of slices in the subdevice is returned.
278+
_Returns:_ The maximum number of slices. If the device is a subdevice, then the
279+
maximum number of slices in the subdevice is returned.
279280

280281
_Throws:_ An `exception` with the `errc::feature_not_supported` error code if
281282
the device does not have `aspect::ext_intel_gpu_slices`.
@@ -294,8 +295,8 @@ if (dev.has(aspect::ext_intel_gpu_slices)) {
294295
=== Intel GPU Number of Subslices per Slice
295296

296297
This extension adds the following device aspect and information descriptor,
297-
which allow an application to query the number of subslices per slice on an
298-
Intel GPU.
298+
which allow an application to query the maximum number of subslices per slice
299+
on an Intel GPU.
299300

300301
==== New device aspect
301302

@@ -327,8 +328,9 @@ struct gpu_subslices_per_slice {
327328

328329
_Remarks:_ Template parameter to `device::get_info`.
329330

330-
_Returns:_ The number of subslices per slice. If the device is a subdevice,
331-
then the number of subslices per slice in the subdevice is returned.
331+
_Returns:_ The maximum number of subslices per slice. If the device is a
332+
subdevice, then the maximum number of subslices per slice in the subdevice is
333+
returned.
332334

333335
_Throws:_ An `exception` with the `errc::feature_not_supported` error code if
334336
the device does not have `aspect::ext_intel_gpu_subslices_per_slice`.
@@ -347,8 +349,8 @@ if (dev.has(aspect::ext_intel_gpu_subslices_per_slice)) {
347349
=== Intel GPU Number of Execution Units (EUs) per Subslice
348350

349351
This extension adds the following device aspect and information descriptor,
350-
which allow an application to query the number of EUs per subslice on an Intel
351-
GPU.
352+
which allow an application to query the maximum number of EUs per subslice on
353+
an Intel GPU.
352354

353355
==== New device aspect
354356

@@ -380,8 +382,9 @@ struct gpu_eu_count_per_subslice {
380382

381383
_Remarks:_ Template parameter to `device::get_info`.
382384

383-
_Returns:_ The number of EUs in a subslice. If the device is a subdevice, then
384-
the number of EUs per subslice in the subdevice is returned.
385+
_Returns:_ The maximum number of EUs in a subslice. If the device is a
386+
subdevice, then the maximum number of EUs per subslice in the subdevice is
387+
returned.
385388

386389
_Throws:_ An `exception` with the `errc::feature_not_supported` error code if
387390
the device does not have `aspect::ext_intel_gpu_eu_count_per_subslice`.
@@ -509,8 +512,8 @@ if (dev.has(aspect::ext_intel_device_info_uuid)) {
509512
Missing before version 3 of this extension.
510513

511514
This extension adds the following device aspect and information descriptor,
512-
which allow an application to query the number of hardware threads per EU on an
513-
Intel GPU.
515+
which allow an application to query the maximum number of hardware threads per
516+
EU on an Intel GPU.
514517

515518
==== New device aspect
516519

@@ -542,8 +545,9 @@ struct gpu_hw_threads_per_eu {
542545

543546
_Remarks:_ Template parameter to `device::get_info`.
544547

545-
_Returns:_ The number of hardware threads in EU. If the device is a subdevice,
546-
then the number of hardware threads per EU in the subdevice is returned.
548+
_Returns:_ The maximum number of hardware threads in EU. If the device is a
549+
subdevice, then the maximum number of hardware threads per EU in the subdevice
550+
is returned.
547551

548552
_Throws:_ An `exception` with the `errc::feature_not_supported` error code if
549553
the device does not have `aspect::ext_intel_gpu_hw_threads_per_eu`.

sycl/test-e2e/Basic/intel-ext-device.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,6 @@ int main(int argc, char **argv) {
9696
long m = dev.get_info<ext::intel::info::device::max_mem_bandwidth>();
9797
std::cout << "Maximum memory bandwidth = " << m << std::endl;
9898
}
99-
// This is the only data we can verify.
100-
if (totalEUs != numSlices * numSubslices * numEUsPerSubslice) {
101-
std::cout << "Error: EU Count is incorrect!" << std::endl;
102-
std::cout << "Failed!" << std::endl;
103-
return 1;
104-
}
10599
if (dev.has(aspect::ext_intel_free_memory)) {
106100
auto TotalMemory = dev.get_info<info::device::global_mem_size>();
107101
auto FreeMemory =

sycl/test-e2e/DeprecatedFeatures/deprecated_intel_ext_device.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,6 @@ int main(int argc, char **argv) {
9595
long m = dev.get_info<info::device::ext_intel_max_mem_bandwidth>();
9696
std::cout << "Maximum memory bandwidth = " << m << std::endl;
9797
}
98-
// This is the only data we can verify.
99-
if (totalEUs != numSlices * numSubslices * numEUsPerSubslice) {
100-
std::cout << "Error: EU Count is incorrect!" << std::endl;
101-
std::cout << "Failed!" << std::endl;
102-
return 1;
103-
}
10498
} // SYCL_EXT_INTEL_DEVICE_INFO
10599
std::cout << std::endl;
106100
}

0 commit comments

Comments
 (0)