如何在cygwin中为英特尔GPU设置opencl
我有一台带有Intel(R)HD图形520 GPU
的笔记本电脑。我添加了opencl
开发人员软件包中cygwin
。在c上github
。它是针对Apple
,因此我修改了Makefile,以使用适当的标题和设置GCC
。现在,代码编译并执行良好(创建的BMP文件):
$ ./mandelbrot.exe
Device 0: GenuineIntel pthread-Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz
我有两个问题:
#1。如何将Intel GPU添加到/etc/opencl/vendors
列表中?我尝试从Intel网站安装Windows OS 和Intel Graphics Technology驱动程序包
opencl应用程序的Intel CPU运行时,但是我不知道在哪里可以找到适当的<代码> opencl
dll i可以指向intel.idc
文件。
#2。在/etc/opencl/vendors
中,我找到了pocl.icd
文件指向cygpocl-2.dll
。我认为这是Pthread库。但是在我看来,尽管我有4个核心,但它仅运行一个线程。我应该进行任何修改以在多个线程中运行它吗?我调试了代码,似乎只有一个设备,因此仅在一个线程上运行。在初始化函数中,它设置了用于处理最终BMP设备搅动器的device_work_size
属性。但是,由于只有一个设备,因此整个BMP通过一次运行(一个clenqueuendrangekernel
>> clenqueuereadbuffer 被调用)。
更新
我已经安装了 Intel(R)图形 - Windows* DCH驱动程序。它安装了图形驱动程序。我找到了intelocl64.dll(AS /cygdrive/c/program文件(x86)/common Files/intel/intel/intel/intel libries/intel64/intelocl64.dll
)。我将整个路径放入/etc/opencl/vendors/intel.icd
文件中。到目前为止,一切都很好。现在它甚至找不到pthread设备... bah ...
I have a Laptop with Intel(R) HD Graphics 520 GPU
in it. I added OpenCL
developer package to Cygwin
. I have found a small Mandelbrot-set calculator program for OpenCL
in C on GitHub
. It is for Apple
, so I modified the Makefile to use the proper headers and settings for gcc
. Now the code compiles and executes nicely (bmp file created):
$ ./mandelbrot.exe
Device 0: GenuineIntel pthread-Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz
I have two questions:
#1. How can I add (if it is possible) the Intel GPU to the /etc/OpenCL/vendors
list? I tried to install from Intel site the Intel CPU runtime for OpenCL Applications for Windows OS
and Intel Graphics Technology driver package
, but I do not know where can I find the proper OpenCL
dll I can point in the intel.idc
file.
#2. In /etc/OpenCL/vendors
I have found a pocl.icd
file pointing to cygpocl-2.dll
. I assume this is the pthread library. But it seems to me it is running only a single thread, although I have 4 cores. Should I do any modification to run it in multiple threads? I debugged the code and it seems that as there are only one device found, so it runs only on one thread. In the initialization function it sets the device_work_size
property for processing a stirp per device of the final bmp. But as there is only one device, the whole bmp is processed by one run (one clEnqueueNDRangeKernel
and one clEnqueueReadBuffer
is called).
UPDATE
I have installed Intel(R) Graphics – Windows* DCH Drivers. It installed graphics drivers. I have found the intelocl64.dll (as /cygdrive/c/Program Files (x86)/Common Files/Intel/Shared Libraries/intel64/intelocl64.dll
). I put this whole path into /etc/OpenCL/vendors/intel.icd
file. So far, so good. Now it cannot even find pthread device... Bah...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为不可能使用Cygwin的GPU。我建议您构建本机Windows二进制(例如,使用Visual Studio或Intel DPC ++)或使用WSL。请参阅 https://github.com/intel.com/intel/compute-compute-runtime/blob-blob /master/wsl.md 是否有要求。
I don't think it is possible to use the GPU from cygwin. I would recommend to either build a native Windows binary (e.g. with Visual Studio or Intel DPC++) or use WSL. See https://github.com/intel/compute-runtime/blob/master/WSL.md for requirements.