cancel
Showing results for 
Search instead for 
Did you mean: 

OpenCL

tzachi_cohen
Staff
Staff

OpenCL with no X-server on Linux

Hi All,

I don't know if this little documented feature was discussed here before.

In case it hasn't it is worth mentioning:

Due legacy considerations the AMD OpenCL software stack was bound to graphics and users had to enable the X-server in order to enjoy compute.

This is no longer completely true!!

In recent drivers it is possible to use AMD OpenCL when the X-server is down as long as you have root privileges.

(just type 'sudo clinfo' when the X-server is down to see the list of available devices) . This feature is called "console mode".

If the X-server is up then business is as usuall, users have to define an X-display for the GPU (sudo aticonfig --initial --adapter=all) in order to use it for compute.

0 Kudos
Reply
9 Replies
milesrdz
Adept I

Re: OpenCL with no X-server on Linux

Running the OpenCL program as root certainly got the card without a display connected to run properly (instead of falling back to the CPU).

Are there plans to make it so that you don't need root privileges?

0 Kudos
Reply
nou
Exemplar

Re: OpenCL with no X-server on Linux

yes they are working to get OpenCL working without Xserver.

0 Kudos
Reply
himanshu_gautam
Grandmaster

Re: OpenCL with no X-server on Linux

Hi tzachi,

Thanks for sharing this information. And I do confirm that the information is correct. Anyways can you please point to the little documentation you found it in. I could not find it in release notes.

0 Kudos
Reply
yurtesen
Miniboss

Re: OpenCL with no X-server on Linux

Himanshu:

AMD Catalyst™ 13.4 Proprietary Linux Graphics Driver Release Notes

-> OpenCL Console Mode Support


What I am wondering is why does it require being root? (which would make this feature basically useless). Is it possible to change some device permissions to allow access from any user? (I assume the problem is some device permissions?)

0 Kudos
Reply
garywinush
Journeyman III

Re: OpenCL with no X-server on Linux

Thank you.

0 Kudos
Reply
himanshu_gautam
Grandmaster

Re: OpenCL with no X-server on Linux

This doesn't mean that you should have root permissions.

What exactly you wanted to say here. For which command execution you needed root permission?

0 Kudos
Reply
yurtesen
Miniboss

Re: OpenCL with no X-server on Linux

Hi Himanshu,


Tzachi Cohen clearly said "it is possible to use AMD OpenCL when the X-server is down as long as you have root privileges." So it means you need to be root to run OpenCL programs if the X server is down. Am I understanding this wrong?


Thanks,

Evren

0 Kudos
Reply
himanshu_gautam
Grandmaster

Re: OpenCL with no X-server on Linux


Yes you are correct, root permissions are required to run opencl programs when x-server is down. But what i meant is no where it is mentioned in the documents.

0 Kudos
Reply
yurtesen
Miniboss

Re: OpenCL with no X-server on Linux

Well, it is little bit mentioned in cat 13.4 release notes, and I tried this and it works! I am able to access to GPU as root when X is not running. But programs are not able to read GPU temps etc. as far as I can tell. But the question is what device do I have to make read/write to get everybody to access the GPU? I am about to build a small GPU cluster and well it would be sad to use nvidia cards to avoid running X I think?