cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

arwnz
Adept I

Linux OpenCL Console Mode: Execute code as user

In April 2013 AMD officially released Catalyst 13.4 for Linux with OpenCL Console Mode Support:

AMD Catalyst™ 13.4 Proprietary Linux Graphics Driver Release Notes

Console mode does not detect my HD 5000 Series GPU unless I run OpenCL code as root. Only a CPU device is found when the code is run with user permissions. This is expected: OpenCL Console Mode Support in Catalyst 13.4

"yes. It works only with root privileges."

Is there an update to when root privileges will no longer be required?

In the meantime, is there a way to minimise how much of the application actually runs as root? I'd like to avoid trashing kernel memory/corrupting my operating system when testing code.

Tags (4)
0 Likes
6 Replies
nou
Exemplar

Re: Linux OpenCL Console Mode: Execute code as user

arwnz
Adept I

Re: Linux OpenCL Console Mode: Execute code as user

Thanks nou. I've confirmed that the patch works so long as the user is not running X via an NVIDIA GPU.

To be precise, AMD OpenCL programs run on the AMD GPU as a user from a virtual console before X has been started. If I switch to another virtual console, log in and start X then clinfo or text-based AMD OpenCL sample programs like ConstantBandwidth segfault when switching back to the original virtual console. If I log out of X and switch back to the original virtual console then the OpenCL programs run correctly again.

AMD does not appear to have decoupled OpenCL from X. Thus a text-based program like clinfo still links in libX11 and finds the current user is running X and segfaults trying to integrate with X (which in my case is linked with the nvidia binary blob instead of the supported fglrx module).

Another user that has not started X can still run AMD OpenCL programs regardless of the other user currently running X.

Until AMD decouples OpenCL from X I do not believe I will be able to run AMD OpenCL and NVIDIA CUDA on an NVIDIA GLX stack from within the same binary. The patch does make changing permissions on /dev/ati/* viable, so I could limit access to the AMD GPU to a specific user that is not running X. The non-X user could receive commands from the X-user to process data "sent" in shared memory, which is plausibly a zero-copy solution with the added latency of an inter-process command protocol.

Any update from AMD on decoupling OpenCL from X?

0 Likes
nou
Exemplar

Re: Linux OpenCL Console Mode: Execute code as user

arwnz
Adept I

Re: Linux OpenCL Console Mode: Execute code as user

Question is, will AMD drop support for the HD 5000 and 6000 series before fixing this? I hope AMD does the honourable thing and backports fixes to OpenCL 1.2.

Ominously the new AMD OpenCL 2.0 Driver omits support for AMD Radeon™ HD 6000 Series and ATI Radeon™ HD 5000 Series GPUs.

0 Likes
nou
Exemplar

Re: Linux OpenCL Console Mode: Execute code as user

well I think they don't list them because they not support opencl 2.0 on that GPU. not because they drop support for them. at least that is what I hope for.

0 Likes
mdriftmeyer
Adept II

Re: Linux OpenCL Console Mode: Execute code as user


arwnz wrote:



Question is, will AMD drop support for the HD 5000 and 6000 series before fixing this? I hope AMD does the honourable thing and backports fixes to OpenCL 1.2.



Ominously the new AMD OpenCL 2.0 Driver omits support for AMD Radeon™ HD 6000 Series and ATI Radeon™ HD 5000 Series GPUs.



Seriously? I'm more interested in the fact that R 280 and 270s aren't listed. Complaining about HD 6k and 5k is rich seeing as the necessary requirements for CUDA have drastically increased of late within Blender (CUDA 6.5 for Trunk). You won't find many CUDA 5.x+ based supported cards on this list:

CUDA GPUs

The fact that the state of OpenCL on Blender is severely outdated [something I wouldn't expect seeing as most Devs have Intel based iGPU systems, never mind the discrete GPGPUs] and we are to believe the sole reason is AMD's not pulling their weight.

I'd be interested in people testing OpenCL against Wayland and if the same design flaws that are X that you have experienced presently are still residing in Wayland or not. X is on the way out and XWayland will cover the legacy end. GNOME 3.16 will be Wayland, by default, on Linux and KDE 5 [Kwin 5.1 with kwin_wayland and kwin_x11: An Update on kwin_wayland | Martin's Blog] obviously will fully support it.

Also with respect to the lack of OpenCL 2.0 support from Nvidia seems more questions should be posed to the use of a mixed system of Radeon and Nvidia cards.

0 Likes