如何在cygwin中为英特尔GPU设置opencl

发布于 2025-01-22 09:27:35 字数 1443 浏览 3 评论 0原文

我有一台带有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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦幻之岛 2025-01-29 09:27:35

我认为不可能使用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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文