This bug report is to try to get things moving for OpenCL on nvidia. In order to build apps using OpenCL on a system with an Nvidia based GPU, you need to install the nvidia_cuda_sdk package >= 3.0 beta. Unfortunately, for OpenCl, this does not work with any of the current nvidia-drivers. The drivers installed need to have propper cuda / OpenCL support. The nvidia-driver that pairs up with the 3.0 beta sdk / toolkit is cuda-drivers-195.17. I've tried it and it does work, however it is very unstable. (The composite extension is dog slow with this driver, and I've had a few lockups running OpenCL apps) Attatched is an ebuild that was posted on Nvidia's forums to build the cuda-drivers. Also attatching a cl.hpp file needed to compile C++ apps with OpenCL which is not included with any of the packages. If you're looking for an OpenCL app to test it with, I've been trying to get LuxRender's new OpenCL based raytracing to work. Compiles and runs so far, but locks up. People on Ubuntu systems seem to do alright with it. http://www.luxrender.net/wiki/index.php?title=Luxrender_and_OpenCL Reproducible: Always
Created attachment 224005 [details] Ebuild w/ patches
Created attachment 224007 [details] OpenCL C++ bindings
Don't submit tarballs into bugzilla. That's a sure fire way to not get them looked at. Break out all your different files and when changing an ebuild always provide a diff.
According to nvidia-drivers-195.36.15, which are in the tree claim to support OpenCL 1.0 and CUDA 3.0.1. So my question is, is this actually relevant?
The ebuild installs an nivida-drivers package that is different from the standard ones installed from Gentoo ebuilds some how. The file it downloads is not called "NVIDIA-Linux..." but rather "cudadriver..." It's the only driver I've been able to install that responds to anything OpenCL. All other drivers cause an error: "OpenCL ERROR: clGetPlatformIDs(-1001)" Including the current 195.36.15 version. Some people have reported CUDA does work. But OpenCL does not. I found the ebuild at the nvidia forum where I found other people with similar problems: http://forums.nvidia.com/index.php?showtopic=160071 Perhaps OpenCL support is still in the works and it's just a matter of waiting for proper support. The SDK / Toolkit should no longer be required. The drivers provide the OpenCL include files needed, except for the cl.hpp file for C++ bindings.
(In reply to comment #5) The 195.36.15 official drivers (NVIDIA.., not cudadriver..) support OpenCL just fine. The OpenCL error you mentioned was probably caused by the missing /etc/OpenCL/vendors/nvidia.icd file, which I think is now fixed in the nvidia-drivers ebuild in Portage.
You're right. :P I had that driver already but it didn't include those files. Re-emerging fixed it. That only leaves the cl.hpp file. That's needed to compile C++ apps using OpenCL. It is a file distributed by the Khronos Group. Not sure where it should go.