I am newbie in SYCL, OpenCL and GPU programming. I read about the device selector in the SYCL and found the following four:
- default_selector : Devices selected by heuristics of the system. If no OpenCL device is found then it defaults to the SYCL host device.
- gpu_selector : Select devices according to device type info::device::device_type::gpu from all the available OpenCL devices. If no OpenCL GPU device is found the selector fails.
- cpu_selector : Select devices according to device type info::device::device_type::cpu from all the available devices and heuristics. If no OpenCL CPU device is found the selector fails.
- host_selector : Selects the SYCL host CPU device that does not require an OpenCL runtime.
I ran computecpp_info
to find the devices are:
$ /usr/local/computecpp/bin/computecpp_info
/usr/local/computecpp/bin/computecpp_info: /usr/local/cuda-8.0/lib64/libOpenCL.so.1: no version information available (required by /usr/local/computecpp/bin/computecpp_info)
/usr/local/computecpp/bin/computecpp_info: /usr/local/cuda-8.0/lib64/libOpenCL.so.1: no version information available (required by /usr/local/computecpp/bin/computecpp_info)
********************************************************************************
ComputeCpp Info (CE 0.7.0)
********************************************************************************
Toolchain information:
GLIBC version: 2.19
GLIBCXX: 20150426
This version of libstdc++ is supported.
********************************************************************************
Device Info:
Discovered 3 devices matching:
platform : <any>
device type : <any>
--------------------------------------------------------------------------------
Device 0:
Device is supported : NO - Device does not support SPIR
CL_DEVICE_NAME : GeForce GTX 750 Ti
CL_DEVICE_VENDOR : NVIDIA Corporation
CL_DRIVER_VERSION : 384.111
CL_DEVICE_TYPE : CL_DEVICE_TYPE_GPU
--------------------------------------------------------------------------------
Device 1:
Device is supported : UNTESTED - Device not tested on this OS
CL_DEVICE_NAME : Intel(R) HD Graphics
CL_DEVICE_VENDOR : Intel(R) Corporation
CL_DRIVER_VERSION : r5.0.63503
CL_DEVICE_TYPE : CL_DEVICE_TYPE_GPU
--------------------------------------------------------------------------------
Device 2:
Device is supported : YES - Tested internally by Codeplay Software Ltd.
CL_DEVICE_NAME : Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
CL_DEVICE_VENDOR : Intel(R) Corporation
CL_DRIVER_VERSION : 1.2.0.475
CL_DEVICE_TYPE : CL_DEVICE_TYPE_CPU
If you encounter problems when using any of these OpenCL devices, please consult
this website for known issues:
https://computecpp.codeplay.com/releases/v0.7.0/platform-support-notes
So, GeForce GTX 750 Ti
and Intel(R) HD Graphics
devices are GPU devices and Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
is CPU devices. What's about host devices
here?
If I select host_selector
, where my SYCL code
would run?