Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit a794ded

Browse files
authored
[SYCL] Add a test for HW threads per EU device_info query (#606)
Spec update: intel/llvm#4876 Implementation: intel/llvm#4901 Signed-off-by: Dmitry Sidorov <[email protected]>
1 parent fd7323c commit a794ded

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

SYCL/Basic/intel-ext-device.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ int main(int argc, char **argv) {
4040
int numSlices = 0;
4141
int numSubslices = 0;
4242
int numEUsPerSubslice = 0;
43+
int numHWThreadsPerEU = 0;
4344
for (const auto &dev : plt.get_devices()) {
4445
std::cout << "Platform #" << pltCount++ << ":" << std::endl;
4546
if (dev.has(aspect::gpu)) {
@@ -90,6 +91,12 @@ int main(int argc, char **argv) {
9091
std::cout << "Number of EUs per subslice = " << numEUsPerSubslice
9192
<< std::endl;
9293
}
94+
if (dev.has(aspect::ext_intel_gpu_hw_threads_per_eu)) {
95+
numHWThreadsPerEU =
96+
dev.get_info<info::device::ext_intel_gpu_hw_threads_per_eu>();
97+
std::cout << "Number of HW threads per EU = " << numHWThreadsPerEU
98+
<< std::endl;
99+
}
93100
if (dev.has(aspect::ext_intel_max_mem_bandwidth)) {
94101
// not supported yet
95102
long m =

0 commit comments

Comments
 (0)