How do I test OpenCL on GPU when logged in remotely on Mac?

泄露秘密 提交于 2019-12-03 12:12:18

I expect the GPU resource is owned by the desktop session (which is always present, even if to show the login screen), which is why it is not available to remote sessions. Forcing the issue by changing permissions is subverting the system and is bound to lead to problems.

Have you tried running Screen Sharing to remotely access the Mac rather than ssh? That way you can run the app on the desktop as normal, and see your results (potentially with some latency, depending on your network connection).

On Windows, it seems that remote access to the GPU might not be possible, according to this forum thread.

That post is about Windows not Mac, and thus does not directly address this question. As no one has provided any answers yet, so this is the most relevant information I have found so far.

I had the same issue under Ubuntu until I found this post: http://dhruba.name/2012/11/09/opencl-cookbook-running-remote-multi-gpu-opencl-computations-over-ssh-on-ubuntu-or-debian-using-amd-catalyst-drivers/

What worked for me was this line:

export COMPUTE=:0

After I typed that on the remote ssh login, clinfo correctly displayed both my devices (CPU and GPU)

What's the status of the machine when you're trying to ssh to it? With my macs, if only the login screen is showing, I can't ssh to it, and if my user account is logged in at the desktop, then a program invoked by ssh can access the gpu. I haven't tried to create a new user account on my machine yet. You may want to set up auto-login for your account and then just require a password to wake from screensaver. That should give you acceptable security and still ensure that your user account has access to the GPU.

Ryan

Have you tried VNC? I know I need to use VNC to use the GPU on windows machines in the past. Remote desktop on Windows just won't work as it uses your local graphics card.

Have you tried being logged in locally AND remotely, at the same time? If the issue is that GPU ownership is tied to the local GUI console user, and you must access remotely via ssh, this should work; provided the computer will not be used by another user, displacing your local login.

Try using sudo. The GPU is just another device to the operating system.

Just yesterday I have logged in to my work computer (OS X 10.8.2) via SSH and opencl programm has worked well with GPU. I think, there is only one reason of your problem -- insufficient rights to access GPU hardware. Try to login as user with Administrator rights or run your programm via sudo.

OK, I don't know Jack about Snow Leopard or OpenCL, but...

I've heard that the Mac desktop is bases on a version of XWindows. In that case, this article: http://developer.amd.com/support/KnowledgeBase/Lists/KnowledgeBase/DispForm.aspx?ID=19 which discusses "how to modify the security settings to allow the remote session access to the X server running on the system". might be helpfull.

Since that article is about ATI Stream applications (instead of OpenCL) and Linux (instead of MacOS) it might not be helpfull, but take a look and judge for yourself.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!