- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What is the difference between SyCL host device and CPU in the device selection:
cl::sycl::info::device_type::cpu
cl::sycl::info::device_type::host
I'm getting difference performance (timing) results when running my workload depending on which device I have chosen. I thought the host device is in fact CPU and both should behave exactly the same.
Thanks and regards,
Tomasz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Tomasz
Although host_selector and cpu_selector both select the CPU hardware there is a small difference between them.
When you are using cpu_selector then your code runs on CPU hardware with OpenCL as backend. So the CPU act as an OpenCL device here.
Whereas, when you are using host_selector then it bypasses the OnenCL backend and runs directly on CPU hardware. To run your codes using host_selector you don't need to have OpenCL drivers and it is always available, whereas to run your codes on any OpenCL devices (CPU, GPU, FPGA, any accelerator that supports OpenCL).
As the HOST device is independent and always available, The host device provides a guarantee that device code can always be run (no dependence on accelerator hardware) and has a few primary uses:
- Development of Device code
- Debugging of Device code
- Backup
For more information on this please refer to the Data-Parallel C++ Book by James Reinders (Page 35)
You can download the free E-book here: https://link.springer.com/book/10.1007/978-1-4842-5574-2
Have a Good day!
Thanks & Regards
Goutham
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Tomasz
Although host_selector and cpu_selector both select the CPU hardware there is a small difference between them.
When you are using cpu_selector then your code runs on CPU hardware with OpenCL as backend. So the CPU act as an OpenCL device here.
Whereas, when you are using host_selector then it bypasses the OnenCL backend and runs directly on CPU hardware. To run your codes using host_selector you don't need to have OpenCL drivers and it is always available, whereas to run your codes on any OpenCL devices (CPU, GPU, FPGA, any accelerator that supports OpenCL).
As the HOST device is independent and always available, The host device provides a guarantee that device code can always be run (no dependence on accelerator hardware) and has a few primary uses:
- Development of Device code
- Debugging of Device code
- Backup
For more information on this please refer to the Data-Parallel C++ Book by James Reinders (Page 35)
You can download the free E-book here: https://link.springer.com/book/10.1007/978-1-4842-5574-2
Have a Good day!
Thanks & Regards
Goutham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Tomasz
Thanks for the confirmation!
As this issue has been resolved, we will no longer respond to this thread.
If you require any additional assistance from Intel, please start a new thread.
Any further interaction in this thread will be considered community only.
Have a Good day.
Thanks & Regards
Goutham
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page