作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我是 SYCL、OpenCL 和 GPU 编程的新手。我在 SYCL 中阅读了有关设备选择器的信息,发现了以下四个:
- 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.
我运行了computecpp_info
来查找设备:
$ /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
因此,GeForce GTX 750 Ti
和 Intel(R) HD Graphics
设备是 GPU 设备,Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
是 CPU 设备。这里的主机设备
怎么样?
如果我选择 host_selector
,我的 SYCL 代码
将在哪里运行?
最佳答案
在 SYCL 中,有主机设备和 OpenCL 设备的概念。 OpenCL 设备是任何支持 OpenCL 的设备,例如 Intel GPU、AMD GPU、支持 OpenCL 的 FPGA 等。
另一方面,主机设备是运行 OpenCL 设备的设备。本质上,它是您的 cpu,它控制所有连接的支持 OpenCL 的设备,并且本身不使用 OpenCL。有时,一些 CPU 供应商提供 OpenCL 驱动程序,使您也可以在 CPU 上运行 OpenCL。在这种情况下,主机设备和 OpenCL 设备共享相同的硬件组件。
就您而言,英特尔为 CPU 和 GPU 提供了 OpenCL 实现,因此您的所有设备都支持 OpenCL。即使您没有 OpenCL 设备,主机设备也存在
我还想指出,ComputeCpp 包含对 NVidia 的实验性支持,因此您可以在其上运行 SYCL,但不能保证
关于opencl - SYCL设备选择器中的host_selector是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50714019/
我是一名优秀的程序员,十分优秀!