문제

How can I install OpenCL drivers under Cygwin?

For example, OpenCL under linux normally checks the /etc/OpenCL/vendors list for links to ICD drivers (e.g. on Linux, nvidia.icd references libnvidia-opencl.so.1), but since Cygwin doesn't have any Nvidia or OpenCL package, I'm assuming I'll have to set the links up manually.

I do have the Windows Nvidia CUDA dev kit installed on the same machine, but it's not obvious whether one of those files should be the one to link to.

[Note that I've already built the OpenCL loader implementation libopencl.a from coprthr, so that part is done - it's just figuring out how to reference the ICD]

도움이 되었습니까?

해결책

To compile a C/C++ OpenCL program on Windows using Cygwin or MinGW you need to:

  • Make sure the OpenCL headers are on the include path. You can download them here.
  • Link against a static OpenCL library (libopencl.a), which you already have.

To run the program, it needs to find the dynamic OpenCL library DLL. The NVidia driver usually installs it at C:\Windows\System32.

This works for me.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top