- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was wondering if there is a way, when I run a sycl program with a cpu_selector to get if I'm using it as single core or multi core ?
Using sycl::info::device::max_compute_units. Here's a minimal example:
#include <CL/sycl.hpp> #include <iostream> int main(){ sycl::device d = sycl::cpu_selector().select_device(); std::cout << d.get_info<sycl::info::device::max_compute_units>() << std::endl; }
On my machine (which has 8 physical cores & 16 hardware threads), this returns 16. Which as the function name suggests this is max value.
So how could I know if my application is running al those 16 threads or 4 threads ? Maybe 2 cores ?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for posting on Intel communities.
You can use the Hotspots Views in Intel® VTune™ Profiler tool to gather information about the number of cores, number of threads, and determine whether your application is utilizing a single core or multiple cores.
Please refer to the below link for further details,
https://www.intel.com/content/www/us/en/docs/vtune-profiler/user-guide/2023-0/hotspots-view.html
If you still face any issues, please let us know.
Thanks & Regards,
Vankudothu Vaishnavi.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We have not heard back from you.
Has the information provided above helped? If yes, could you please confirm whether we can close this thread from our end?
Thanks & Regards,
Vankudothu Vaishnavi.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We assume that your issue is resolved. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.
Thanks & Regards,
Vankudothu Vaishnavi.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page