Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 309945 - x11-drivers/nvidia-drivers: OpenCL support
Summary: x11-drivers/nvidia-drivers: OpenCL support
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Doug Goldstein (RETIRED)
URL: http://forums.nvidia.com/index.php?sh...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-17 14:09 UTC by Reuben Martin
Modified: 2010-03-25 01:07 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Ebuild w/ patches (nvidia-cuda-drivers-ebuild-195.17.tar.bz2,6.88 KB, application/octet-stream)
2010-03-17 14:10 UTC, Reuben Martin
Details
OpenCL C++ bindings (cl.hpp,217.77 KB, text/plain)
2010-03-17 14:11 UTC, Reuben Martin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Reuben Martin 2010-03-17 14:09:29 UTC
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
Comment 1 Reuben Martin 2010-03-17 14:10:18 UTC
Created attachment 224005 [details]
Ebuild w/ patches
Comment 2 Reuben Martin 2010-03-17 14:11:12 UTC
Created attachment 224007 [details]
OpenCL C++ bindings
Comment 3 Doug Goldstein (RETIRED) gentoo-dev 2010-03-24 13:52:37 UTC
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.
Comment 4 Doug Goldstein (RETIRED) gentoo-dev 2010-03-24 17:29:08 UTC
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? 
Comment 5 Reuben Martin 2010-03-24 22:33:41 UTC
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.

Comment 6 Michal Januszewski (RETIRED) gentoo-dev 2010-03-24 22:58:38 UTC
(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.
Comment 7 Reuben Martin 2010-03-25 01:07:59 UTC
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.