From b14b8875a3cf9c85e64c7303ca78a909269d9656 Mon Sep 17 00:00:00 2001 From: Dmitry Sidorov Date: Wed, 3 Nov 2021 17:56:08 +0300 Subject: [PATCH] [SYCL] Add a test for HW threads per EU device_info query Spec update: https://github.com/intel/llvm/pull/4876 Implementation: https://github.com/intel/llvm/pull/4901 Signed-off-by: Dmitry Sidorov --- SYCL/Basic/intel-ext-device.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/SYCL/Basic/intel-ext-device.cpp b/SYCL/Basic/intel-ext-device.cpp index 9c922fb122..084b0f7c05 100644 --- a/SYCL/Basic/intel-ext-device.cpp +++ b/SYCL/Basic/intel-ext-device.cpp @@ -40,6 +40,7 @@ int main(int argc, char **argv) { int numSlices = 0; int numSubslices = 0; int numEUsPerSubslice = 0; + int numHWThreadsPerEU = 0; for (const auto &dev : plt.get_devices()) { std::cout << "Platform #" << pltCount++ << ":" << std::endl; if (dev.has(aspect::gpu)) { @@ -90,6 +91,12 @@ int main(int argc, char **argv) { std::cout << "Number of EUs per subslice = " << numEUsPerSubslice << std::endl; } + if (dev.has(aspect::ext_intel_gpu_hw_threads_per_eu)) { + numHWThreadsPerEU = + dev.get_info(); + std::cout << "Number of HW threads per EU = " << numHWThreadsPerEU + << std::endl; + } if (dev.has(aspect::ext_intel_max_mem_bandwidth)) { // not supported yet long m =